foundry build cache is disabled with --build-info (it always rebuilds)
karmacoma-eth opened this issue · comments
Describe the bug
halmos always starts by running forge build --build-info --root . --extra-output storageLayout metadata
We normally rely on forge to decide if a rebuild is necessary or not, however since we added --build-info
it now always rebuilds.
This behavior was changed in foundry-rs/foundry#7358
The reason we added --build-info
is to bring back the AST in the generated artifacts: #255
what we really want is to bring the AST back. AFAIK there are 2 ways to do this:
- the
--ast
option which was added in foundry-rs/foundry#7197 (from Feb 2024) - the
--build-info
which has been there for a long time, which is why we opted for it
Maybe as a workaround we can use --ast
. If we're going to do that:
- either we check the forge version first, and then only add the
--ast
flag if it's in a supported foundry version - or it will fail and we require the users to foundryup
Related issue: foundry-rs/foundry#7379