Skip to content
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

forge(build): Compiler run successful with warnings: but no warnings log #8548

Closed
2 tasks done
mds1 opened this issue Jul 28, 2024 · 2 comments · Fixed by foundry-rs/compilers#179 or #8583
Closed
2 tasks done
Assignees
Labels
A-compiler Area: compiler C-forge Command: forge Cmd-forge-build Command: forge build T-bug Type: bug
Milestone

Comments

@mds1
Copy link
Collaborator

mds1 commented Jul 28, 2024

Component

Forge

Have you ensured that all of these are up to date?

  • Foundry
  • Foundryup

What version of Foundry are you on?

forge 0.2.0 (bdd1137 2024-07-28T00:21:06.817030000Z)

What command(s) is the bug in?

forge build

Operating System

None

Describe the bug

I haven't been able to create a minimal reproduction of the issue yet, but to reproduce:

  1. Clone https://github.com/ethereum-optimism/optimism
  2. Checkout the ci/solc-check branch (ci: better solc warnings check ethereum-optimism/optimism#11231)
  3. cd packages/contracts-bedrock && forge install
  4. Run forge build --force

The output says Compiler run successful with warnings: but not warnings are logged.

$ forge build --force
[⠒] Compiling...
[⠢] Compiling 394 files with Solc 0.8.15
[⠆] Compiling 138 files with Solc 0.8.25
[⠊] Compiling 16 files with Solc 0.8.19
[⠒] Solc 0.8.19 finished in 1.66s
[⠃] Solc 0.8.25 finished in 11.13s
[⠒] Solc 0.8.15 finished in 221.01s
Compiler run successful with warnings:

We thought this may be ignored_error_codes usage, but in my simpler repro case, adding an entry to ignored_error_codes was working as expected and resulted in Compiler run successful!

We are trying to use --deny-warnings in CI, but can't because this bug causes failure even though no warnings are logged:

$ forge build --force --deny-warnings
[⠒] Compiling...
[⠢] Compiling 138 files with Solc 0.8.25
[⠆] Compiling 394 files with Solc 0.8.15
[⠊] Compiling 16 files with Solc 0.8.19
[⠒] Solc 0.8.19 finished in 1.75s
[⠒] Solc 0.8.25 finished in 11.09s
[⠰] Solc 0.8.15 finished in 223.81s
Error: 
Compiler run failed:

I also took a quick look at the logs from running with RUST_LOG=trace forge build --force but couldn't find anything there

@mds1
Copy link
Collaborator Author

mds1 commented Aug 1, 2024

@mattsse @klkvr can we get a foundry-rs/compilers bump in this repo also? That way we can update our foundry version to get this fix. Reopening the issue until then :)

@mds1 mds1 reopened this Aug 1, 2024
@mattsse
Copy link
Member

mattsse commented Aug 1, 2024

on it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-compiler Area: compiler C-forge Command: forge Cmd-forge-build Command: forge build T-bug Type: bug
Projects
None yet
4 participants