Skip to content

Commit

Permalink
chore: bump foundry-compilers 0.3.9 (#7210)
Browse files Browse the repository at this point in the history
* chore: bump foundry-compilers 0.3.8

* chore: update test

* tmp: pin to git

* Revert "chore: update test"

This reverts commit 81b35e6.

* el bumpo

* el fixo

* Reapply "chore: update test"

This reverts commit fff32b2.

---------

Co-authored-by: DaniPopes <57450786+DaniPopes@users.noreply.github.com>
  • Loading branch information
mattsse and DaniPopes authored Feb 22, 2024
1 parent 57815e0 commit 6d5de51
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 40 deletions.
4 changes: 2 additions & 2 deletions Cargo.lock

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

7 changes: 2 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.9", 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
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 @@ -381,7 +381,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 @@ -406,12 +406,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).


0 comments on commit 6d5de51

Please sign in to comment.