You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello was just debugging some rather weird issue on foundry and am now wondering if that's expected or not (to me it was not).
When building a project with a rather huge library and using: forge build --sizes on ci
The code will build correctly and yield sth like:
forge build --sizes
[⠊] Compiling...
[⠔] Compiling 123 files with 0.8.10
[⠊] Solc 0.8.10 finished in 16.40s
Compiler run successful (with warnings)
... tableWithSizes
also forge test etc will just work.
That said, while running:
forge build; echo "$?" will yield 0 exit code
forge build --sizes; echo "$?" will yield 1 exit code
I assume the rational here is that in the case of:
Contract
Size (kB)
Margin (kB)
DeployPayloads
102.679
-78.103
I surpassed the limit, so exit code is 1.
That said, building, testing & deploying works just fine as DeployPayloads in this case is a library which is only used in scripts & tests.
edit: Thinking a bit more about this, pretty sure if qualifies as a bug:
it's unexpected that different build commands yield different exit codes
if by intention, scripts & tests & libraries only used in the two should be excluded from this rule as they can(and often do) surpass limits without harm
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello was just debugging some rather weird issue on foundry and am now wondering if that's expected or not (to me it was not).
When building a project with a rather huge library and using:
forge build --sizes
on ciThe code will build correctly and yield sth like:
also
forge test
etc will just work.That said, while running:
forge build; echo "$?"
will yield0
exit codeforge build --sizes; echo "$?"
will yield1
exit codeI assume the rational here is that in the case of:
I surpassed the limit, so exit code is
1
.That said, building, testing & deploying works just fine as
DeployPayloads
in this case is a library which is only used in scripts & tests.edit: Thinking a bit more about this, pretty sure if qualifies as a bug:
Beta Was this translation helpful? Give feedback.
All reactions