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
{{ message }}
This repository was archived by the owner on Apr 20, 2026. It is now read-only.
When using some libraries, the --flatten output will be gigantic as flatten will inline all imports. It would be neat if flatten would detect & remove unused imports.
In addition to what i mentioned above i guess it might make sense to even eliminate unused code in the actually imported files. Not sure sure about this though.
Component
Forge
Describe the feature you would like
When using some libraries, the
--flattenoutput will be gigantic as flatten will inline all imports. It would be neat if flatten would detect & remove unused imports.When using re-export index files like here https://github.com/bgd-labs/aave-address-book/blob/main/src/AaveAddressBook.sol that makes it essentially impossible to use in foundry as the generated code will be unusable long.
Additional context
In addition to what i mentioned above i guess it might make sense to even eliminate unused code in the actually imported files. Not sure sure about this though.