We should avoid adding to these or defining any remappings explicitly, as it makes our project harder for others to use as a dependency. For example, if our project depends on Solmate and so does theirs, we want to avoid our project having some irregular import naming, resolved with a custom remapping, which will conflict with their import naming.
Hey @cruzdanilo! Thanks for the PR, letting foundry figure out the remappings sounds like a great idea! We're in the process of overhauling the CLI and will get back to this PR a bit later.
when
remappings.txt
is absent andfoundry.toml
config doesn't have any remapping, fallback to forge auto-generated remappings.apart from being a good fallback, many developers even prefer this approach. as an example, here is a quote from coinbase solidity style guide:
source: https://github.com/coinbase/solidity-style-guide?tab=readme-ov-file#1-avoid-custom-remappings