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

chore: bump foundry-compilers 0.3.9 #7210

Merged
merged 7 commits into from
Feb 22, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 4 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ foundry-wallets = { path = "crates/wallets" }

# solc & compilation utilities
foundry-block-explorers = { version = "0.2.3", default-features = false }
foundry-compilers = { version = "0.3.6", default-features = false }
foundry-compilers = { version = "0.3.8", default-features = false }

## revm
# no default features to avoid c-kzg
Expand Down Expand Up @@ -181,10 +181,7 @@ alloy-rlp = "0.3.3"
solang-parser = "=0.3.3"

## misc
chrono = { version = "0.4", default-features = false, features = [
"clock",
"std",
] }
chrono = { version = "0.4", default-features = false, features = ["clock", "std"] }
color-eyre = "0.6"
derive_more = "0.99"
eyre = "0.6"
Expand Down Expand Up @@ -238,3 +235,5 @@ revm = { git = "https://github.com/bluealloy/revm", branch = "reth_freeze" }
revm-primitives = { git = "https://github.com/bluealloy/revm", branch = "reth_freeze" }
revm-interpreter = { git = "https://github.com/bluealloy/revm", branch = "reth_freeze" }
revm-precompile = { git = "https://github.com/bluealloy/revm", branch = "reth_freeze" }

foundry-compilers = { git = "https://github.com/foundry-rs/compilers", branch = "dani/i-love-solc" }
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

31 changes: 7 additions & 24 deletions crates/forge/tests/cli/cmd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -536,31 +536,10 @@ contract Greeter {
cmd.arg("build");

let output = cmd.stdout_lossy();
assert!(output.contains(
"
Compiler run successful with warnings:
Warning (5667): Warning: Unused function parameter. Remove or comment out the variable name to silence this warning.
",
));
assert!(output.contains("Warning"), "{output}");
});

// Tests that direct import paths are handled correctly
//
// NOTE(onbjerg): Disabled for Windows -- for some reason solc fails with a bogus error message
// here: error[9553]: TypeError: Invalid type for argument in function call. Invalid implicit
// conversion from struct Bar memory to struct Bar memory requested. --> src\Foo.sol:12:22:
// |
// 12 | FooLib.check(b);
// | ^
//
//
//
// error[9553]: TypeError: Invalid type for argument in function call. Invalid implicit conversion
// from contract Foo to contract Foo requested. --> src\Foo.sol:15:23:
// |
// 15 | FooLib.check2(this);
// | ^^^^
#[cfg(not(target_os = "windows"))]
forgetest!(can_handle_direct_imports_into_src, |prj, cmd| {
prj.add_source(
"Foo",
Expand Down Expand Up @@ -1572,8 +1551,12 @@ forgetest_init!(can_install_missing_deps_build, |prj, cmd| {
cmd.arg("build");

let output = cmd.stdout_lossy();
assert!(output.contains("Missing dependencies found. Installing now"), "{}", output);
assert!(output.contains("No files changed, compilation skipped"), "{}", output);
assert!(output.contains("Missing dependencies found. Installing now"), "{output}");

// re-run
let output = cmd.stdout_lossy();
assert!(!output.contains("Missing dependencies found. Installing now"), "{output}");
assert!(output.contains("No files changed, compilation skipped"), "{output}");
});

// checks that extra output works
Expand Down
9 changes: 2 additions & 7 deletions crates/forge/tests/cli/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,7 @@ contract Foo {}
// test to ensure yul optimizer can be set as intended
forgetest!(can_set_yul_optimizer, |prj, cmd| {
prj.add_source(
"Foo",
"foo.sol",
r"
contract Foo {
function bar() public pure {
Expand All @@ -405,12 +405,7 @@ contract Foo {
..Default::default()
};
prj.write_config(config);

assert!(cmd.stdout_lossy().ends_with(
"
Compiler run successful!
",
));
cmd.assert_success();
});

// tests that the lib triple can be parsed
Expand Down
3 changes: 1 addition & 2 deletions crates/forge/tests/fixtures/can_set_yul_optimizer.stderr
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
Error:
Compiler run failed:
Error (6553): SyntaxError: The msize instruction cannot be used when the Yul optimizer is activated because it can change its semantics. Either disable the Yul optimizer or do not use the instruction.
Error (6553): The msize instruction cannot be used when the Yul optimizer is activated because it can change its semantics. Either disable the Yul optimizer or do not use the instruction.
--> src/Foo.sol:6:8:
|
6 | assembly {
| ^ (Relevant source part starts here and spans across multiple lines).


Loading