bug: expecting build reproducibility for forge test
, forge build
and forge coverage
#8889
Open
2 tasks done
Labels
A-compiler
Area: compiler
C-forge
Command: forge
Cmd-forge-build
Command: forge build
Cmd-forge-coverage
Command: forge coverage
Cmd-forge-test
Command: forge test
T-bug
Type: bug
T-post-V1
Area: to tackle after V1
Component
Forge
Have you ensured that all of these are up to date?
What version of Foundry are you on?
forge 0.2.0 (27d008f 2024-09-07T11:27:46.212820056Z)
What command(s) is the bug in?
forge test - forge build - forge coverage
Operating System
Linux
Describe the bug
I have a Foundry project which builds, tests and creates test coverage in a docker container based on the latest version of
ghcr.io/foundry-rs/foundry
image.The project is hosted in an internal repository, and I expect that when I run
forge build
then runningforge test
would not recompile the contracts, but in many cases it happens that even if I don't make any change to the contracts source code, other colleagues runningforge test
on their machines have a recompilation even if they are "pre-compiled" and versioned in the repo.This does not happen always, is there a reason behind that?
More over, we noticed that when we run
forge coverage
the recompilation always happens, indeed we have diffs in the compiled contracts. The diffs seems to be in the formatting of the file, btw.Is there a way to have build reproducibility for these 3 commands whatever is the machine we are running them on?
Is the compilation somehow based on the timestamp of the files?
Thanks for your support.
The text was updated successfully, but these errors were encountered: