-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Build-info file's solc output has contracts with absolute paths #7878
Comments
I've encountered this problem while trying to use openzeppelin-foundry-upgrades. It causes to fail with:
|
thanks for flagging @klkvr perhaps this was caused by recent changes in compilers |
From crytic/slither-action#84 (comment)
Maybe something related to the addition of |
Closes foundry-rs/foundry#7878 Removes paths stripping logic from solc implementation, instead we now use `CompilerInput::strip_prefix` and `CompilerOutput::join_all` directly in `compile_*` functions, and only join output paths after writing build info.
Component
Forge
Have you ensured that all of these are up to date?
What version of Foundry are you on?
forge 0.2.0 (2e3c197 2024-05-06T16:01:48.856025000Z)
What command(s) is the bug in?
forge build --build-info
Operating System
macOS (Apple Silicon)
Describe the bug
Recent versions of forge causes solc output's
contracts
paths to use absolute paths, whereas previously they were paths relative to the project root.For example, run:
In
out/build-info/<file>.json
, theinput
section hassources
with paths relative to the project root, e.g.:However in the
output
section,contracts
have absolute paths.This causes a problem for any tooling which tries to match output contracts with their corresponding source inputs.
The text was updated successfully, but these errors were encountered: