From dccc67d6d25ff72d8bf7a84a840388c0949d1778 Mon Sep 17 00:00:00 2001 From: 0xrusowsky <0xrusowsky@proton.me> Date: Mon, 30 Jun 2025 09:22:24 +0200 Subject: [PATCH 1/3] chore: bump solar --- CHANGELOG.md | 18 ++++++++++++++++++ Cargo.toml | 18 ++++++++++++------ crates/artifacts/vyper/src/settings.rs | 5 ++++- crates/compilers/src/cache/iface.rs | 2 +- crates/compilers/src/resolver/parse.rs | 2 +- crates/compilers/tests/project.rs | 2 +- 6 files changed, 37 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4f73847e3..90fded93b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,8 +5,26 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [0.17.4](https://github.com/foundry-rs/compilers/releases/tag/v0.17.4) - 2025-06-30 + +### Bug Fixes + +- Fix typos in comments and variable names across solc-related modules ([#286](https://github.com/foundry-rs/compilers/issues/286)) + +### Dependencies + +- Bump vyper to 0.4.3 which adds support for `prague` ([#285](https://github.com/foundry-rs/compilers/issues/285)) + +### Miscellaneous Tasks + +- Upstreamed `strip_bytecode_placeholders` from foundry ([#287](https://github.com/foundry-rs/compilers/issues/287)) + ## [0.17.3](https://github.com/foundry-rs/compilers/releases/tag/v0.17.3) - 2025-06-14 +### Miscellaneous Tasks + +- Release 0.17.3 + ### Other - Revert "fix: implement proper serde handling for unknown AST node typ… ([#284](https://github.com/foundry-rs/compilers/issues/284)) diff --git a/Cargo.toml b/Cargo.toml index d2277f869..2c01ce136 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -4,7 +4,7 @@ resolver = "2" [workspace.package] authors = ["Foundry Maintainers"] -version = "0.17.3" +version = "0.17.4" rust-version = "1.87" readme = "README.md" license = "MIT OR Apache-2.0" @@ -36,11 +36,11 @@ redundant-lifetimes = "warn" all = "warn" [workspace.dependencies] -foundry-compilers = { path = "crates/compilers", version = "0.17.3" } -foundry-compilers-artifacts = { path = "crates/artifacts/artifacts", version = "0.17.3" } -foundry-compilers-artifacts-solc = { path = "crates/artifacts/solc", version = "0.17.3" } -foundry-compilers-artifacts-vyper = { path = "crates/artifacts/vyper", version = "0.17.3" } -foundry-compilers-core = { path = "crates/core", version = "0.17.3" } +foundry-compilers = { path = "crates/compilers", version = "0.17.4" } +foundry-compilers-artifacts = { path = "crates/artifacts/artifacts", version = "0.17.4" } +foundry-compilers-artifacts-solc = { path = "crates/artifacts/solc", version = "0.17.4" } +foundry-compilers-artifacts-vyper = { path = "crates/artifacts/vyper", version = "0.17.4" } +foundry-compilers-core = { path = "crates/core", version = "0.17.4" } alloy-json-abi = { version = "1.0", features = ["serde_json"] } alloy-primitives = { version = "1.0", features = ["serde", "rand"] } @@ -68,3 +68,9 @@ futures-util = "0.3" tokio = { version = "1.35", features = ["rt-multi-thread"] } snapbox = "0.6.9" + +[patch.crates-io] +solar-parse = { git = "https://github.com/paradigmxyz/solar", branch = "main" } +solar-sema = { git = "https://github.com/paradigmxyz/solar", branch = "main" } +# solar-ast = { git = "https://github.com/paradigmxyz/solar", branch = "main" } +# solar-interface = { git = "https://github.com/paradigmxyz/solar", branch = "main" } diff --git a/crates/artifacts/vyper/src/settings.rs b/crates/artifacts/vyper/src/settings.rs index 3653b0a13..f162d2871 100644 --- a/crates/artifacts/vyper/src/settings.rs +++ b/crates/artifacts/vyper/src/settings.rs @@ -13,6 +13,7 @@ pub const VYPER_BERLIN: Version = Version::new(0, 3, 0); pub const VYPER_PARIS: Version = Version::new(0, 3, 7); pub const VYPER_SHANGHAI: Version = Version::new(0, 3, 8); pub const VYPER_CANCUN: Version = Version::new(0, 3, 8); +pub const VYPER_PRAGUE: Version = Version::new(0, 4, 3); const VYPER_0_4: Version = Version::new(0, 4, 0); @@ -126,7 +127,9 @@ impl VyperSettings { /// Adjusts the EVM version based on the compiler version. pub fn normalize_evm_version(&mut self, version: &Version) { if let Some(evm_version) = &mut self.evm_version { - *evm_version = if *evm_version >= EvmVersion::Cancun && *version >= VYPER_CANCUN { + *evm_version = if *evm_version >= EvmVersion::Prague && *version >= VYPER_PRAGUE { + EvmVersion::Prague + } else if *evm_version >= EvmVersion::Cancun && *version >= VYPER_CANCUN { EvmVersion::Cancun } else if *evm_version >= EvmVersion::Shanghai && *version >= VYPER_SHANGHAI { EvmVersion::Shanghai diff --git a/crates/compilers/src/cache/iface.rs b/crates/compilers/src/cache/iface.rs index 8f006ef41..ff29be147 100644 --- a/crates/compilers/src/cache/iface.rs +++ b/crates/compilers/src/cache/iface.rs @@ -38,7 +38,7 @@ pub(crate) fn interface_representation_ast( let is_exposed = match function.kind { // Function with external or public visibility ast::FunctionKind::Function => { - function.header.visibility >= Some(ast::Visibility::Public) + function.header.visibility.map(|v| *v) >= Some(ast::Visibility::Public) } ast::FunctionKind::Constructor | ast::FunctionKind::Fallback diff --git a/crates/compilers/src/resolver/parse.rs b/crates/compilers/src/resolver/parse.rs index 0627bb01c..06c21f95e 100644 --- a/crates/compilers/src/resolver/parse.rs +++ b/crates/compilers/src/resolver/parse.rs @@ -272,7 +272,7 @@ fn library_is_inlined(contract: &ast::ItemContract<'_>) -> bool { }) .all(|f| { !matches!( - f.header.visibility, + f.header.visibility.map(|v| *v), Some(ast::Visibility::Public | ast::Visibility::External) ) }) diff --git a/crates/compilers/tests/project.rs b/crates/compilers/tests/project.rs index 334d43834..fcae49532 100644 --- a/crates/compilers/tests/project.rs +++ b/crates/compilers/tests/project.rs @@ -60,7 +60,7 @@ pub static VYPER: LazyLock = LazyLock::new(|| { return Vyper::new(&path).unwrap(); } - let base = "https://github.com/vyperlang/vyper/releases/download/v0.4.0/vyper.0.4.0+commit.e9db8d9f"; + let base = "https://github.com/vyperlang/vyper/releases/download/v0.4.3/vyper.0.4.3+commit.bff19ea2"; let url = format!( "{base}.{}", match platform() { From 82c81aa16c20c0a9e5768bf92b134c1e5703900f Mon Sep 17 00:00:00 2001 From: 0xrusowsky <0xrusowsky@proton.me> Date: Mon, 14 Jul 2025 07:30:32 +0200 Subject: [PATCH 2/3] bump solar 0.1.5 --- Cargo.toml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 2c01ce136..ecb2278a1 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -54,8 +54,8 @@ semver = { version = "1.0", features = ["serde"] } serde = { version = "1", features = ["derive", "rc"] } serde_json = "1.0" similar-asserts = "1" -solar-parse = { version = "=0.1.4", default-features = false } -solar-sema = { version = "=0.1.4", default-features = false } +solar-parse = { version = "=0.1.5", default-features = false } +solar-sema = { version = "=0.1.5", default-features = false } svm = { package = "svm-rs", version = "0.5", default-features = false } tempfile = "3.9" thiserror = "2" @@ -69,8 +69,8 @@ tokio = { version = "1.35", features = ["rt-multi-thread"] } snapbox = "0.6.9" -[patch.crates-io] -solar-parse = { git = "https://github.com/paradigmxyz/solar", branch = "main" } -solar-sema = { git = "https://github.com/paradigmxyz/solar", branch = "main" } +# [patch.crates-io] +# solar-parse = { git = "https://github.com/paradigmxyz/solar", branch = "main" } +# solar-sema = { git = "https://github.com/paradigmxyz/solar", branch = "main" } # solar-ast = { git = "https://github.com/paradigmxyz/solar", branch = "main" } # solar-interface = { git = "https://github.com/paradigmxyz/solar", branch = "main" } From fb912203537ae8a72ece106c7bbb94d480dfaf5f Mon Sep 17 00:00:00 2001 From: 0xrusowsky <0xrusowsky@proton.me> Date: Mon, 14 Jul 2025 07:52:31 +0200 Subject: [PATCH 3/3] bump MSRV --- .github/workflows/ci.yml | 4 ++-- Cargo.toml | 2 +- README.md | 2 +- clippy.toml | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3e05f11d8..2a4e68cf8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -22,11 +22,11 @@ jobs: fail-fast: false matrix: os: ["ubuntu-latest", "macos-latest", "windows-latest"] - rust: ["stable", "1.87"] + rust: ["stable", "1.88"] flags: ["", "--all-features"] exclude: # Skip because some features have higher MSRV. - - rust: "1.87" # MSRV + - rust: "1.88" # MSRV flags: "--all-features" steps: - uses: actions/checkout@v4 diff --git a/Cargo.toml b/Cargo.toml index ecb2278a1..3862c6c22 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -5,7 +5,7 @@ resolver = "2" [workspace.package] authors = ["Foundry Maintainers"] version = "0.17.4" -rust-version = "1.87" +rust-version = "1.88" readme = "README.md" license = "MIT OR Apache-2.0" repository = "https://github.com/foundry-rs/compilers" diff --git a/README.md b/README.md index 2b636be64..80b3851d2 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ When updating this, also update: - .github/workflows/ci.yml --> -The current MSRV (minimum supported rust version) is 1.87. +The current MSRV (minimum supported rust version) is 1.88. Note that the MSRV is not increased automatically, and only as part of a minor release. diff --git a/clippy.toml b/clippy.toml index d946daec3..f3322b5fd 100644 --- a/clippy.toml +++ b/clippy.toml @@ -1 +1 @@ -msrv = "1.87" +msrv = "1.88"