-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(forge
): forge build --sizes
collapses non uniques
#9962
fix(forge
): forge build --sizes
collapses non uniques
#9962
Conversation
forge
): forge build --sizes
collapses non unique
forge
): forge build --sizes
collapses non uniqueforge
): forge build --sizes
collapses non uniques
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense. Not sure if we should display path to artifact or actually path to source file, wdyt?
Ah yes, that makes much more sense - fixed in 7e9020c |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm! Don't think there's any implications on json output?
it does not, added test for completeness the only implication is that in the JSON output it would also show with the path in the name {
"Counter (src/Counter.sol)":{
"runtime_size":481,
"init_size":509,
"runtime_margin":24095,
"init_margin":48643
},
"Counter (src/a/Counter.sol)":{
"runtime_size":344,
"init_size":372,
"runtime_margin":24232,
"init_margin":48780
},
"Counter (src/b/Counter.sol)":{
"runtime_size":291,
"init_size":319,
"runtime_margin":24285,
"init_margin":48833
},
"Foo":{
"runtime_size":62,
"init_size":88,
"runtime_margin":24514,
"init_margin":49064
}
} I would classify it as a fix rather than a breaking change, previously it would show just one |
Motivation
Closes: #9961
Previously, because of a flat BTreeMap, we were not preserving path-unique contracts in the
--sizes
tableSolution
Now includes the path, stripped by project root as the unique identifier only in cases where clashing occurs
and with
--json
:PR Checklist