diff --git a/Cargo.lock b/Cargo.lock index 2977c6c9ca909..94b4399376399 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4471,9 +4471,9 @@ dependencies = [ [[package]] name = "foundry-compilers" -version = "0.18.1" +version = "0.18.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "081e5cd31d7f94ca23a88ff9d2a414f0499d24374ab69bb6a50b2b1f4c955f01" +checksum = "4e953daf389ec3f8d82566cfcdadae58ca01b1bf0a7c467b2b03d447971589df" dependencies = [ "alloy-json-abi", "alloy-primitives", @@ -4508,9 +4508,9 @@ dependencies = [ [[package]] name = "foundry-compilers-artifacts" -version = "0.18.1" +version = "0.18.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc590ec3766b4eae5733c2e3e40278164a166523c077171a892cfc8ae30a12e8" +checksum = "f88824bfa6a5c2d7ecd076ba232cf37532af611c764fc27bb74371a91f662c36" dependencies = [ "foundry-compilers-artifacts-solc", "foundry-compilers-artifacts-vyper", @@ -4518,9 +4518,9 @@ dependencies = [ [[package]] name = "foundry-compilers-artifacts-solc" -version = "0.18.1" +version = "0.18.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a46722aa9e5534f89ff53fa083eb626986b6b3dff351de4067dd46e0b02eee41" +checksum = "55273eea0135b2d6e80d8475f660c87c855100999ce6f3e8c065e2fc55b95d7c" dependencies = [ "alloy-json-abi", "alloy-primitives", @@ -4541,9 +4541,9 @@ dependencies = [ [[package]] name = "foundry-compilers-artifacts-vyper" -version = "0.18.1" +version = "0.18.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b609d941469f5f9ceed30cf7e66352a5b646654351f591f54810845cdd7e9a5" +checksum = "19d0254354ec10a7fc3b5a38ea0e6d9c841c35159f9b052e0bd87769e28c00da" dependencies = [ "alloy-json-abi", "alloy-primitives", @@ -4556,9 +4556,9 @@ dependencies = [ [[package]] name = "foundry-compilers-core" -version = "0.18.1" +version = "0.18.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eaa0e5ea0fc2b656291bdc3e67f55789caa4b7297dda8a37563e57ab4f2ab9fd" +checksum = "0773827e62d4eba29b04dff112211c1cadb614352da1cc2d951c33ca446415be" dependencies = [ "alloy-primitives", "cfg-if", diff --git a/Cargo.toml b/Cargo.toml index da548723b4715..a61ed5ca8cbc3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -204,7 +204,7 @@ foundry-linking = { path = "crates/linking" } # solc & compilation utilities foundry-block-explorers = { version = "0.20.0", default-features = false } -foundry-compilers = { version = "0.18.1", default-features = false } +foundry-compilers = { version = "0.18.2", default-features = false } foundry-fork-db = "0.16" solang-parser = { version = "=0.3.9", package = "foundry-solang-parser" } solar-ast = { version = "=0.1.5", default-features = false } diff --git a/crates/forge/tests/cli/config.rs b/crates/forge/tests/cli/config.rs index aa27ba775495c..dd99de3fd281f 100644 --- a/crates/forge/tests/cli/config.rs +++ b/crates/forge/tests/cli/config.rs @@ -663,6 +663,8 @@ forgetest_init!(can_prioritise_closer_lib_remappings, |prj, cmd| { // remapping. // See // Test that +// - single file remapping is properly added, see +// and // - project defined `@openzeppelin/contracts` remapping is added // - library defined `@openzeppelin/contracts-upgradeable` remapping is added // - library defined `@openzeppelin/contracts/upgradeable` remapping is not added as it conflicts @@ -672,6 +674,7 @@ forgetest_init!(can_prioritise_project_remappings, |prj, cmd| { let mut config = cmd.config(); // Add `@utils/` remapping in project config. config.remappings = vec![ + Remapping::from_str("@utils/libraries/Contract.sol=src/Contract.sol").unwrap().into(), Remapping::from_str("@utils/=src/").unwrap().into(), Remapping::from_str("@openzeppelin/contracts=lib/openzeppelin-contracts/").unwrap().into(), ]; @@ -699,6 +702,7 @@ forgetest_init!(can_prioritise_project_remappings, |prj, cmd| { cmd.args(["remappings", "--pretty"]).assert_success().stdout_eq(str![[r#" Global: +- @utils/libraries/Contract.sol=src/Contract.sol - @utils/=src/ - @openzeppelin/contracts/=lib/openzeppelin-contracts/ - @openzeppelin/contracts-upgradeable/=lib/dep1/lib/openzeppelin-upgradeable/