diff --git a/CHANGELOG.md b/CHANGELOG.md index a9eaa12d50..03e3547690 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,44 @@ # Changelog [//]: # (towncrier release notes start) +## 26.1.0 (2026-04-30) + +### Features + +- Update the core ABI helper traits and APIs. Custom ABI implementations now use `AbiSize::HEAD_SIZE`, `payload_size`, `Decode::decode_payload`, and `AbiSpan::payload_end`; encoders are created with a fixed output size, and root versus field encoding is split into explicit helpers such as `encode_alloc` and `encode_single_root_alloc`. ([#1404-abi](https://github.com/argotorg/fe/issues/1404-abi)) +- Added `assert_msg(cond, message)`, which reverts with a Solidity-compatible `Error(string)` payload (selector `0x08c379a0`) when `cond` is false. ([#1348](https://github.com/argotorg/fe/issues/1348)) +- Replace the git resolver backend from git2 (libgit2) to gitoxide (pure Rust). This removes the OpenSSL/libgit2 C dependency and adds sparse checkout support, allowing the resolver to fetch only the required subdirectory of a remote repository instead of the entire tree. ([#1383](https://github.com/argotorg/fe/issues/1383)) +- Expose missing `Ctx` trait APIs: `origin`, `coinbase`, `prevrandao`, `gaslimit`, `chainid`, `basefee`, `selfbalance`, and `blockhash`. ([#1388](https://github.com/argotorg/fe/issues/1388)) +- Add `#[error]` attribute for Solidity-compatible custom error types. Structs annotated with `#[error]` get auto-generated `ErrorVariant`, `AbiSize`, and `Encode` implementations with a compile-time computed 4-byte selector. A new `revert_error()` function emits selector-prefixed ABI-encoded revert data. Includes a predefined `Panic` error type matching Solidity's `Panic(uint256)`. ([#1395](https://github.com/argotorg/fe/issues/1395)) +- Improve `fe doc` and generated documentation bundles: message declarations and message variants now render with dedicated item kinds and complete signatures, `fe doc --builtins --stdlib-path ` can document a stdlib loaded from disk, docs JSON includes pre-rendered Markdown HTML, and the web viewer can load gzipped docs JSON bundles. ([#1401](https://github.com/argotorg/fe/issues/1401)) +- Replace backend lowering with the staged SMIR/NSMIR/MIR pipeline. This expands compile-time function evaluation, including const calls that produce aggregate values and symbolic array repeat expressions such as `[value; N]` where `N` is a const generic. ([#1404](https://github.com/argotorg/fe/issues/1404)) +- Add `static_assert(bool_expr)` for compile-time assertions, with diagnostics that show evaluated comparison operands and operators when an assertion fails. ([#1412](https://github.com/argotorg/fe/issues/1412)) +- Expand `const fn` evaluation to support mutable locals, assignments, aggregate field and index writes, `while` and `while let` loops with `break` and `continue`, match/destructuring patterns, and const operator trait implementations. This allows more ordinary helper code, including array and proof builders, to run during CTFE. ([#1413](https://github.com/argotorg/fe/issues/1413)) +- The standard prelude now includes `sol`, `Bytes`, `Decode`, and `AbiDecoder`, so common Solidity selector and ABI decoding code no longer needs explicit imports. ([#1417](https://github.com/argotorg/fe/issues/1417)) +- Checked arithmetic overflow now reverts with a Solidity-compatible `Panic(uint256)` payload (code `0x11`) instead of empty revert data. This makes overflow failures identifiable by off-chain tooling such as Foundry, Hardhat, and block explorers. +- Extend `#[test(should_revert)]` with `panic` and `selector` arguments for verifying revert payloads. `#[test(should_revert, panic = 0x11)]` checks that the test reverts with a Solidity-compatible `Panic(uint256)` and the expected code. `#[test(should_revert, selector = 0x4e487b71)]` checks only the 4-byte error selector. +- Make primitive numeric and boolean intrinsics, `IntDowncast` methods, and EVM `addmod`/`mulmod` const-evaluable. This enables modular arithmetic and field-arithmetic-heavy code to be used in `const fn` and `static_assert`. +- `Result::unwrap()` now emits selector-prefixed revert data for `#[error]` types. Previously, `unwrap()` on a `Result` where `E` is an `#[error]` type would ABI-encode the error without the 4-byte selector. Now the monomorphizer routes these to `revert_error()` instead of `revert()`, producing Solidity-compatible error payloads. +- `assert(false)` now reverts with a Solidity-compatible `Panic(uint256)` payload (code `0x01`) instead of empty revert data. This makes assertion failures identifiable by off-chain tooling. + +### Bugfixes + +- Fix several array and aggregate codegen bugs. Readonly array locals, call results, constructor arguments, and view parameters now preserve their code-backed or borrowed representation until materialization is required. Code-backed arrays copied to storage are staged through memory before word loads and use storage slot offsets instead of byte offsets. Runtime array literals now populate each element before loading the aggregate value. ([#1404-array-codegen](https://github.com/argotorg/fe/issues/1404-array-codegen)) +- Fix never type (`!`) handling in trait checking and lowering. The compiler now avoids probing trait implementations for bare `!`, producing the intended diagnostic for invalid uses, and treats extern functions declared `-> !` as intrinsically non-returning even when they appear in functions with generic or associated return types. ([#1410-never-type](https://github.com/argotorg/fe/issues/1410-never-type)) +- Suppress downstream type mismatch diagnostics when the underlying type is already invalid. This reduces cascading error noise and makes compiler output easier to read. ([#1386](https://github.com/argotorg/fe/issues/1386)) +- Fix chained method call type inference (e.g. `result.map(fn1).map(fn2)`). The compiler now correctly unifies types through canonicalized receivers, resolving incorrect type mismatch errors on valid method chains. ([#1389](https://github.com/argotorg/fe/issues/1389)) +- Overhaul LSP stability and observability: worker-thread panics now surface as visible errors instead of being silently swallowed, a dual-layer logging system writes detailed diagnostics to workspace-local `.fe-lsp/` log files with automatic rotation and retention, and a dispatch-deadlock in concurrent request handling has been fixed via an upgraded async-lsp dependency. ([#1392](https://github.com/argotorg/fe/issues/1392)) +- Remove redundant `EvmResultExt` trait and `unwrap_or_revert()` method. Since `Result::unwrap()` already ABI-encodes errors on revert via `panic_with_value`, `unwrap_or_revert()` was a leftover that duplicated this behavior. ([#1395](https://github.com/argotorg/fe/issues/1395)) +- Fix several MIR correctness issues: `fe build --contract` now filters Sonatina IR output correctly, ingot builds work when contracts are re-exported from the root module, generic calls can forward concrete EVM effects, and escaping storage borrows are rejected. ([#1404](https://github.com/argotorg/fe/issues/1404)) +- Report invalid dependency paths in `fe.toml` as configuration diagnostics instead of panicking. ([#1408](https://github.com/argotorg/fe/issues/1408)) +- Fix `StorageBytes.encode_return` so multi-word `bytes` values are ABI-encoded from allocated return memory instead of clobbering scratch memory. ([#1409](https://github.com/argotorg/fe/issues/1409)) +- Fix CTFE evaluation of unchecked and wrapping numeric intrinsics to use fixed-width word semantics for wrapping negation, bitwise not, shifts, and division/remainder edge cases. +- Fix generic operator overload resolution so ambiguous trait method candidates are preserved and can be disambiguated by argument constraints. Generic wrappers such as field element types can now support mixed operator impls like `Fr + u256`. + +### Performance improvements + +- Improve CTFE performance and scale by reducing repeated const interning, using copy-on-write aggregate stores, caching semantic bodies and instances, and raising the default CTFE step limit to 1,000,000. Larger constant computations such as Poseidon test vectors can now complete during normal checks. + +### Internal Changes - for Fe Contributors + +- Bump sonatina to eb50941. ([#1393](https://github.com/argotorg/fe/issues/1393)) diff --git a/Cargo.lock b/Cargo.lock index 44c74baf01..ca00d04395 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2030,7 +2030,7 @@ dependencies = [ [[package]] name = "fe" -version = "26.0.0" +version = "26.1.0" dependencies = [ "axum", "camino", @@ -2075,7 +2075,7 @@ dependencies = [ [[package]] name = "fe-bench" -version = "26.0.0" +version = "26.1.0" dependencies = [ "camino", "criterion", @@ -2089,7 +2089,7 @@ dependencies = [ [[package]] name = "fe-codegen" -version = "26.0.0" +version = "26.1.0" dependencies = [ "dir-test", "fe-common", @@ -2112,7 +2112,7 @@ dependencies = [ [[package]] name = "fe-common" -version = "26.0.0" +version = "26.1.0" dependencies = [ "camino", "fe-parser", @@ -2133,7 +2133,7 @@ dependencies = [ [[package]] name = "fe-contract-harness" -version = "26.0.0" +version = "26.1.0" dependencies = [ "ethers-core", "fe-codegen", @@ -2150,14 +2150,14 @@ dependencies = [ [[package]] name = "fe-dataflow" -version = "26.0.0" +version = "26.1.0" dependencies = [ "cranelift-entity 0.130.1", ] [[package]] name = "fe-driver" -version = "26.0.0" +version = "26.1.0" dependencies = [ "camino", "codespan-reporting", @@ -2175,7 +2175,7 @@ dependencies = [ [[package]] name = "fe-fmt" -version = "26.0.0" +version = "26.1.0" dependencies = [ "dir-test", "fe-parser", @@ -2185,7 +2185,7 @@ dependencies = [ [[package]] name = "fe-hir" -version = "26.0.0" +version = "26.1.0" dependencies = [ "ascii_tree", "bitflags 2.11.0", @@ -2220,7 +2220,7 @@ dependencies = [ [[package]] name = "fe-language-server" -version = "26.0.0" +version = "26.1.0" dependencies = [ "act-locally", "anyhow", @@ -2261,7 +2261,7 @@ dependencies = [ [[package]] name = "fe-mir" -version = "26.0.0-alpha.7" +version = "26.1.0" dependencies = [ "cranelift-entity 0.130.1", "fe-common", @@ -2277,7 +2277,7 @@ dependencies = [ [[package]] name = "fe-parser" -version = "26.0.0" +version = "26.1.0" dependencies = [ "derive_more 1.0.0", "dir-test", @@ -2298,7 +2298,7 @@ dependencies = [ [[package]] name = "fe-resolver" -version = "26.0.0" +version = "26.1.0" dependencies = [ "camino", "dir-test", @@ -2320,7 +2320,7 @@ dependencies = [ [[package]] name = "fe-solc-runner" -version = "26.0.0" +version = "26.1.0" dependencies = [ "fe-contract-harness", "indexmap 2.13.0", @@ -2329,7 +2329,7 @@ dependencies = [ [[package]] name = "fe-test-utils" -version = "26.0.0" +version = "26.1.0" dependencies = [ "fe-common", "insta", @@ -2342,7 +2342,7 @@ dependencies = [ [[package]] name = "fe-uitest" -version = "26.0.0" +version = "26.1.0" dependencies = [ "dir-test", "fe-common", @@ -2355,7 +2355,7 @@ dependencies = [ [[package]] name = "fe-web" -version = "26.0.0" +version = "26.1.0" dependencies = [ "insta", "js-sys", @@ -7087,7 +7087,7 @@ dependencies = [ [[package]] name = "tree-sitter-fe" -version = "26.0.0" +version = "26.1.0" dependencies = [ "cc", "tree-sitter", diff --git a/crates/bench/Cargo.toml b/crates/bench/Cargo.toml index c7b58dc34a..90457c617d 100644 --- a/crates/bench/Cargo.toml +++ b/crates/bench/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "fe-bench" -version = "26.0.0" +version = "26.1.0" edition.workspace = true [dev-dependencies] diff --git a/crates/codegen/Cargo.toml b/crates/codegen/Cargo.toml index 9f0ed89391..ab819879da 100644 --- a/crates/codegen/Cargo.toml +++ b/crates/codegen/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "fe-codegen" -version = "26.0.0" +version = "26.1.0" edition.workspace = true [dependencies] diff --git a/crates/common/Cargo.toml b/crates/common/Cargo.toml index 4170824fae..bb7aa8b21c 100644 --- a/crates/common/Cargo.toml +++ b/crates/common/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "fe-common" -version = "26.0.0" +version = "26.1.0" edition.workspace = true license = "Apache-2.0" repository = "https://github.com/argotorg/fe" diff --git a/crates/contract-harness/Cargo.toml b/crates/contract-harness/Cargo.toml index f2bbfb40a9..ce5fa1e35e 100644 --- a/crates/contract-harness/Cargo.toml +++ b/crates/contract-harness/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "fe-contract-harness" -version = "26.0.0" +version = "26.1.0" edition.workspace = true [dependencies] diff --git a/crates/driver/Cargo.toml b/crates/driver/Cargo.toml index 229a32e0a0..d48769a3e0 100644 --- a/crates/driver/Cargo.toml +++ b/crates/driver/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "fe-driver" -version = "26.0.0" +version = "26.1.0" edition.workspace = true license = "Apache-2.0" repository = "https://github.com/argotorg/fe" diff --git a/crates/fe-dataflow/Cargo.toml b/crates/fe-dataflow/Cargo.toml index a0706b66c6..1fb3af0019 100644 --- a/crates/fe-dataflow/Cargo.toml +++ b/crates/fe-dataflow/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "fe-dataflow" -version = "26.0.0" +version = "26.1.0" edition.workspace = true license = "Apache-2.0" repository = "https://github.com/argotorg/fe" diff --git a/crates/fe-web/Cargo.toml b/crates/fe-web/Cargo.toml index 604c81e271..b01b86dc47 100644 --- a/crates/fe-web/Cargo.toml +++ b/crates/fe-web/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "fe-web" -version = "26.0.0" +version = "26.1.0" edition.workspace = true license = "Apache-2.0" repository = "https://github.com/ethereum/fe" diff --git a/crates/fe/Cargo.toml b/crates/fe/Cargo.toml index 16c148165c..de145957a4 100644 --- a/crates/fe/Cargo.toml +++ b/crates/fe/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "fe" -version = "26.0.0" +version = "26.1.0" edition.workspace = true [features] diff --git a/crates/fe/tests/cli_output.rs b/crates/fe/tests/cli_output.rs index edeed79c07..cf0496ae62 100644 --- a/crates/fe/tests/cli_output.rs +++ b/crates/fe/tests/cli_output.rs @@ -1139,7 +1139,7 @@ fn test_cli_build_ingot_root_reexported_contract_fake_solc_artifacts() { snapshot.push_str(&format!("KeyperSet.bin: {}\n", deploy.trim())); snapshot.push_str(&format!("KeyperSet.runtime.bin: {}\n", runtime.trim())); - let snapshot_path = fixture_dir.join("build_fake_solc.case"); + let snapshot_path = fixture_dir.join("reexport_build_fake_solc.case"); snap_test!(snapshot, snapshot_path.to_str().unwrap()); } diff --git a/crates/fe/tests/fixtures/cli_output/build_ingots/root_reexport_contract/build_fake_solc.snap b/crates/fe/tests/fixtures/cli_output/build_ingots/root_reexport_contract/reexport_build_fake_solc.snap similarity index 100% rename from crates/fe/tests/fixtures/cli_output/build_ingots/root_reexport_contract/build_fake_solc.snap rename to crates/fe/tests/fixtures/cli_output/build_ingots/root_reexport_contract/reexport_build_fake_solc.snap diff --git a/crates/fmt/Cargo.toml b/crates/fmt/Cargo.toml index 2e72ea2dec..2a56975251 100644 --- a/crates/fmt/Cargo.toml +++ b/crates/fmt/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "fe-fmt" -version = "26.0.0" +version = "26.1.0" edition.workspace = true [dependencies] diff --git a/crates/hir/Cargo.toml b/crates/hir/Cargo.toml index 6881402dcb..bfcc55b62b 100644 --- a/crates/hir/Cargo.toml +++ b/crates/hir/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "fe-hir" -version = "26.0.0" +version = "26.1.0" edition.workspace = true license = "Apache-2.0" repository = "https://github.com/argotorg/fe" diff --git a/crates/language-server/Cargo.toml b/crates/language-server/Cargo.toml index 0ffb11bdd8..684aaf1cbb 100644 --- a/crates/language-server/Cargo.toml +++ b/crates/language-server/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "fe-language-server" -version = "26.0.0" +version = "26.1.0" edition.workspace = true license = "Apache-2.0" repository = "https://github.com/argotorg/fe" diff --git a/crates/language-server/test_files/goto_contract.snap b/crates/language-server/test_files/goto_contract.snap index a463ceb841..5138ff17f2 100644 --- a/crates/language-server/test_files/goto_contract.snap +++ b/crates/language-server/test_files/goto_contract.snap @@ -1,5 +1,6 @@ --- source: crates/language-server/src/functionality/goto.rs +assertion_line: 460 expression: snapshot input_file: test_files/goto_contract.fe --- @@ -103,25 +104,25 @@ note: ┌─ goto_contract.fe:70:5 │ 70 │ Mint { to: u256, amount: u256 } -> bool, - │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -> goto_contract::TokenMsg::Mint + │ ^^^^ -> goto_contract::TokenMsg::Mint note: ┌─ goto_contract.fe:71:5 │ 71 │ GetSupply -> u256, - │ ^^^^^^^^^^^^^^^^^ -> goto_contract::TokenMsg::GetSupply + │ ^^^^^^^^^ -> goto_contract::TokenMsg::GetSupply note: ┌─ goto_contract.fe:75:5 │ 75 │ SetOwner { new_owner: u256 } -> bool, - │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -> goto_contract::AdminMsg::SetOwner + │ ^^^^^^^^ -> goto_contract::AdminMsg::SetOwner note: ┌─ goto_contract.fe:76:5 │ 76 │ GetOwner -> u256, - │ ^^^^^^^^^^^^^^^^ -> goto_contract::AdminMsg::GetOwner + │ ^^^^^^^^ -> goto_contract::AdminMsg::GetOwner note: ┌─ goto_contract.fe:81:31 diff --git a/crates/language-server/test_files/goto_effects.snap b/crates/language-server/test_files/goto_effects.snap index 02124f3436..2303416501 100644 --- a/crates/language-server/test_files/goto_effects.snap +++ b/crates/language-server/test_files/goto_effects.snap @@ -1,5 +1,6 @@ --- source: crates/language-server/src/functionality/goto.rs +assertion_line: 460 expression: snapshot input_file: test_files/goto_effects.fe --- @@ -217,13 +218,13 @@ note: ┌─ goto_effects.fe:71:5 │ 71 │ Add { x: u256 } -> u256, - │ ^^^^^^^^^^^^^^^^^^^^^^^ -> goto_effects::CalcMsg::Add + │ ^^^ -> goto_effects::CalcMsg::Add note: ┌─ goto_effects.fe:72:5 │ 72 │ GetState -> u256, - │ ^^^^^^^^^^^^^^^^ -> goto_effects::CalcMsg::GetState + │ ^^^^^^^^ -> goto_effects::CalcMsg::GetState note: ┌─ goto_effects.fe:75:40 diff --git a/crates/language-server/test_files/hoverable/src/lib.snap b/crates/language-server/test_files/hoverable/src/lib.snap index 02ee765cba..fa185ccffb 100644 --- a/crates/language-server/test_files/hoverable/src/lib.snap +++ b/crates/language-server/test_files/hoverable/src/lib.snap @@ -669,31 +669,17 @@ note: 97 │ │ } │ ╰─^ def: defined here @ 92:0 (11 refs) -note: - ┌─ lib.fe:93:3 - │ -93 │ ╭ #[selector = 0x01] -94 │ │ Mint { to: i32, amount: i32 } -> bool, - │ ╰───────────────────────────────────────^ ref: 93:2 - note: ┌─ lib.fe:94:3 │ 94 │ Mint { to: i32, amount: i32 } -> bool, - │ ^^^^ def: defined here @ 94:2 (13 refs) - -note: - ┌─ lib.fe:95:3 - │ -95 │ ╭ #[selector = 0x02] -96 │ │ Burn { amount: i32 } -> bool, - │ ╰──────────────────────────────^ ref: 95:2 + │ ^^^^ ref: 94:2 note: ┌─ lib.fe:96:3 │ 96 │ Burn { amount: i32 } -> bool, - │ ^^^^ def: defined here @ 96:2 (13 refs) + │ ^^^^ ref: 96:2 note: ┌─ lib.fe:99:14 diff --git a/crates/language-server/test_files/hoverable/src/stuff.snap b/crates/language-server/test_files/hoverable/src/stuff.snap index ffe409abb8..767bf54447 100644 --- a/crates/language-server/test_files/hoverable/src/stuff.snap +++ b/crates/language-server/test_files/hoverable/src/stuff.snap @@ -669,31 +669,17 @@ note: 97 │ │ } │ ╰─^ def: defined here @ 92:0 (11 refs) -note: - ┌─ lib.fe:93:3 - │ -93 │ ╭ #[selector = 0x01] -94 │ │ Mint { to: i32, amount: i32 } -> bool, - │ ╰───────────────────────────────────────^ ref: 93:2 - note: ┌─ lib.fe:94:3 │ 94 │ Mint { to: i32, amount: i32 } -> bool, - │ ^^^^ def: defined here @ 94:2 (13 refs) - -note: - ┌─ lib.fe:95:3 - │ -95 │ ╭ #[selector = 0x02] -96 │ │ Burn { amount: i32 } -> bool, - │ ╰──────────────────────────────^ ref: 95:2 + │ ^^^^ ref: 94:2 note: ┌─ lib.fe:96:3 │ 96 │ Burn { amount: i32 } -> bool, - │ ^^^^ def: defined here @ 96:2 (13 refs) + │ ^^^^ ref: 96:2 note: ┌─ lib.fe:99:14 diff --git a/crates/mir/Cargo.toml b/crates/mir/Cargo.toml index 5b888c3b69..58f8ac09fe 100644 --- a/crates/mir/Cargo.toml +++ b/crates/mir/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "fe-mir" -version = "26.0.0-alpha.7" +version = "26.1.0" edition.workspace = true license = "Apache-2.0" repository = "https://github.com/argotorg/fe" diff --git a/crates/parser/Cargo.toml b/crates/parser/Cargo.toml index 933712c0c3..6a4e65d6c2 100644 --- a/crates/parser/Cargo.toml +++ b/crates/parser/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "fe-parser" -version = "26.0.0" +version = "26.1.0" edition.workspace = true license = "Apache-2.0" repository = "https://github.com/argotorg/fe" diff --git a/crates/resolver/Cargo.toml b/crates/resolver/Cargo.toml index b78ca9e0b9..b890377d4e 100644 --- a/crates/resolver/Cargo.toml +++ b/crates/resolver/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "fe-resolver" -version = "26.0.0" +version = "26.1.0" authors = ["The Fe Developers "] edition.workspace = true license = "Apache-2.0" diff --git a/crates/solc-runner/Cargo.toml b/crates/solc-runner/Cargo.toml index ddb029000e..789b1116a5 100644 --- a/crates/solc-runner/Cargo.toml +++ b/crates/solc-runner/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "fe-solc-runner" -version = "26.0.0" +version = "26.1.0" edition = "2024" [dependencies] diff --git a/crates/test-utils/Cargo.toml b/crates/test-utils/Cargo.toml index 0d7a71e0dc..bc77397012 100644 --- a/crates/test-utils/Cargo.toml +++ b/crates/test-utils/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "fe-test-utils" -version = "26.0.0" +version = "26.1.0" edition.workspace = true [lib] diff --git a/crates/tree-sitter-fe/Cargo.toml b/crates/tree-sitter-fe/Cargo.toml index 32b02de889..9bfe3a3ecd 100644 --- a/crates/tree-sitter-fe/Cargo.toml +++ b/crates/tree-sitter-fe/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "tree-sitter-fe" description = "Fe language grammar for tree-sitter" -version = "26.0.0" +version = "26.1.0" authors = ["Fe Language Team"] license = "MIT" keywords = ["incremental", "parsing", "tree-sitter", "fe"] diff --git a/crates/uitest/Cargo.toml b/crates/uitest/Cargo.toml index 8901179141..45719ad0b9 100644 --- a/crates/uitest/Cargo.toml +++ b/crates/uitest/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "fe-uitest" -version = "26.0.0" +version = "26.1.0" edition.workspace = true license = "Apache-2.0" repository = "https://github.com/argotorg/fe" diff --git a/newsfragments/+assert-emits-panic.feature.md b/newsfragments/+assert-emits-panic.feature.md deleted file mode 100644 index 6be32ac5f5..0000000000 --- a/newsfragments/+assert-emits-panic.feature.md +++ /dev/null @@ -1 +0,0 @@ -`assert(false)` now reverts with a Solidity-compatible `Panic(uint256)` payload (code `0x01`) instead of empty revert data. This makes assertion failures identifiable by off-chain tooling. diff --git a/newsfragments/+ctfe-evm-numeric.feature.md b/newsfragments/+ctfe-evm-numeric.feature.md deleted file mode 100644 index b60b553025..0000000000 --- a/newsfragments/+ctfe-evm-numeric.feature.md +++ /dev/null @@ -1 +0,0 @@ -Make primitive numeric and boolean intrinsics, `IntDowncast` methods, and EVM `addmod`/`mulmod` const-evaluable. This enables modular arithmetic and field-arithmetic-heavy code to be used in `const fn` and `static_assert`. diff --git a/newsfragments/+ctfe-performance.performance.md b/newsfragments/+ctfe-performance.performance.md deleted file mode 100644 index aca4f220c0..0000000000 --- a/newsfragments/+ctfe-performance.performance.md +++ /dev/null @@ -1 +0,0 @@ -Improve CTFE performance and scale by reducing repeated const interning, using copy-on-write aggregate stores, caching semantic bodies and instances, and raising the default CTFE step limit to 1,000,000. Larger constant computations such as Poseidon test vectors can now complete during normal checks. diff --git a/newsfragments/+ctfe-wrapping-intrinsics.bugfix.md b/newsfragments/+ctfe-wrapping-intrinsics.bugfix.md deleted file mode 100644 index e4d6a5d499..0000000000 --- a/newsfragments/+ctfe-wrapping-intrinsics.bugfix.md +++ /dev/null @@ -1 +0,0 @@ -Fix CTFE evaluation of unchecked and wrapping numeric intrinsics to use fixed-width word semantics for wrapping negation, bitwise not, shifts, and division/remainder edge cases. diff --git a/newsfragments/+generic-operator-overload.bugfix.md b/newsfragments/+generic-operator-overload.bugfix.md deleted file mode 100644 index 7fcfe78a1e..0000000000 --- a/newsfragments/+generic-operator-overload.bugfix.md +++ /dev/null @@ -1 +0,0 @@ -Fix generic operator overload resolution so ambiguous trait method candidates are preserved and can be disambiguated by argument constraints. Generic wrappers such as field element types can now support mixed operator impls like `Fr + u256`. diff --git a/newsfragments/+overflow-emits-panic.feature.md b/newsfragments/+overflow-emits-panic.feature.md deleted file mode 100644 index c1c2a537cf..0000000000 --- a/newsfragments/+overflow-emits-panic.feature.md +++ /dev/null @@ -1 +0,0 @@ -Checked arithmetic overflow now reverts with a Solidity-compatible `Panic(uint256)` payload (code `0x11`) instead of empty revert data. This makes overflow failures identifiable by off-chain tooling such as Foundry, Hardhat, and block explorers. diff --git a/newsfragments/+test-revert-matching.feature.md b/newsfragments/+test-revert-matching.feature.md deleted file mode 100644 index 3d95f314c3..0000000000 --- a/newsfragments/+test-revert-matching.feature.md +++ /dev/null @@ -1 +0,0 @@ -Extend `#[test(should_revert)]` with `panic` and `selector` arguments for verifying revert payloads. `#[test(should_revert, panic = 0x11)]` checks that the test reverts with a Solidity-compatible `Panic(uint256)` and the expected code. `#[test(should_revert, selector = 0x4e487b71)]` checks only the 4-byte error selector. diff --git a/newsfragments/+unwrap-error-variant-selector.feature.md b/newsfragments/+unwrap-error-variant-selector.feature.md deleted file mode 100644 index fe5e46410d..0000000000 --- a/newsfragments/+unwrap-error-variant-selector.feature.md +++ /dev/null @@ -1 +0,0 @@ -`Result::unwrap()` now emits selector-prefixed revert data for `#[error]` types. Previously, `unwrap()` on a `Result` where `E` is an `#[error]` type would ABI-encode the error without the 4-byte selector. Now the monomorphizer routes these to `revert_error()` instead of `revert()`, producing Solidity-compatible error payloads. diff --git a/newsfragments/1348.feature.md b/newsfragments/1348.feature.md deleted file mode 100644 index c877dfff85..0000000000 --- a/newsfragments/1348.feature.md +++ /dev/null @@ -1 +0,0 @@ -Added `assert_msg(cond, message)`, which reverts with a Solidity-compatible `Error(string)` payload (selector `0x08c379a0`) when `cond` is false. diff --git a/newsfragments/1383.feature.md b/newsfragments/1383.feature.md deleted file mode 100644 index 11a686f40b..0000000000 --- a/newsfragments/1383.feature.md +++ /dev/null @@ -1 +0,0 @@ -Replace the git resolver backend from git2 (libgit2) to gitoxide (pure Rust). This removes the OpenSSL/libgit2 C dependency and adds sparse checkout support, allowing the resolver to fetch only the required subdirectory of a remote repository instead of the entire tree. diff --git a/newsfragments/1386.bugfix.md b/newsfragments/1386.bugfix.md deleted file mode 100644 index 518a7bdee7..0000000000 --- a/newsfragments/1386.bugfix.md +++ /dev/null @@ -1 +0,0 @@ -Suppress downstream type mismatch diagnostics when the underlying type is already invalid. This reduces cascading error noise and makes compiler output easier to read. diff --git a/newsfragments/1388.feature.md b/newsfragments/1388.feature.md deleted file mode 100644 index a3f15ea140..0000000000 --- a/newsfragments/1388.feature.md +++ /dev/null @@ -1 +0,0 @@ -Expose missing `Ctx` trait APIs: `origin`, `coinbase`, `prevrandao`, `gaslimit`, `chainid`, `basefee`, `selfbalance`, and `blockhash`. diff --git a/newsfragments/1389.bugfix.md b/newsfragments/1389.bugfix.md deleted file mode 100644 index 949fae896b..0000000000 --- a/newsfragments/1389.bugfix.md +++ /dev/null @@ -1 +0,0 @@ -Fix chained method call type inference (e.g. `result.map(fn1).map(fn2)`). The compiler now correctly unifies types through canonicalized receivers, resolving incorrect type mismatch errors on valid method chains. diff --git a/newsfragments/1392.bugfix.md b/newsfragments/1392.bugfix.md deleted file mode 100644 index e351e841de..0000000000 --- a/newsfragments/1392.bugfix.md +++ /dev/null @@ -1 +0,0 @@ -Overhaul LSP stability and observability: worker-thread panics now surface as visible errors instead of being silently swallowed, a dual-layer logging system writes detailed diagnostics to workspace-local `.fe-lsp/` log files with automatic rotation and retention, and a dispatch-deadlock in concurrent request handling has been fixed via an upgraded async-lsp dependency. diff --git a/newsfragments/1393.internal.md b/newsfragments/1393.internal.md deleted file mode 100644 index 45aed34d81..0000000000 --- a/newsfragments/1393.internal.md +++ /dev/null @@ -1 +0,0 @@ -Bump sonatina to eb50941. diff --git a/newsfragments/1395.bugfix.md b/newsfragments/1395.bugfix.md deleted file mode 100644 index 816ea7e5b6..0000000000 --- a/newsfragments/1395.bugfix.md +++ /dev/null @@ -1 +0,0 @@ -Remove redundant `EvmResultExt` trait and `unwrap_or_revert()` method. Since `Result::unwrap()` already ABI-encodes errors on revert via `panic_with_value`, `unwrap_or_revert()` was a leftover that duplicated this behavior. diff --git a/newsfragments/1395.feature.md b/newsfragments/1395.feature.md deleted file mode 100644 index b8388e8ca5..0000000000 --- a/newsfragments/1395.feature.md +++ /dev/null @@ -1 +0,0 @@ -Add `#[error]` attribute for Solidity-compatible custom error types. Structs annotated with `#[error]` get auto-generated `ErrorVariant`, `AbiSize`, and `Encode` implementations with a compile-time computed 4-byte selector. A new `revert_error()` function emits selector-prefixed ABI-encoded revert data. Includes a predefined `Panic` error type matching Solidity's `Panic(uint256)`. diff --git a/newsfragments/1401.feature.md b/newsfragments/1401.feature.md deleted file mode 100644 index a2ccedcfac..0000000000 --- a/newsfragments/1401.feature.md +++ /dev/null @@ -1 +0,0 @@ -Improve `fe doc` and generated documentation bundles: message declarations and message variants now render with dedicated item kinds and complete signatures, `fe doc --builtins --stdlib-path ` can document a stdlib loaded from disk, docs JSON includes pre-rendered Markdown HTML, and the web viewer can load gzipped docs JSON bundles. diff --git a/newsfragments/1404-abi.feature.md b/newsfragments/1404-abi.feature.md deleted file mode 100644 index 93feace8ef..0000000000 --- a/newsfragments/1404-abi.feature.md +++ /dev/null @@ -1 +0,0 @@ -Update the core ABI helper traits and APIs. Custom ABI implementations now use `AbiSize::HEAD_SIZE`, `payload_size`, `Decode::decode_payload`, and `AbiSpan::payload_end`; encoders are created with a fixed output size, and root versus field encoding is split into explicit helpers such as `encode_alloc` and `encode_single_root_alloc`. diff --git a/newsfragments/1404-array-codegen.bugfix.md b/newsfragments/1404-array-codegen.bugfix.md deleted file mode 100644 index eb344cd78b..0000000000 --- a/newsfragments/1404-array-codegen.bugfix.md +++ /dev/null @@ -1 +0,0 @@ -Fix several array and aggregate codegen bugs. Readonly array locals, call results, constructor arguments, and view parameters now preserve their code-backed or borrowed representation until materialization is required. Code-backed arrays copied to storage are staged through memory before word loads and use storage slot offsets instead of byte offsets. Runtime array literals now populate each element before loading the aggregate value. diff --git a/newsfragments/1404.bugfix.md b/newsfragments/1404.bugfix.md deleted file mode 100644 index 91391515ac..0000000000 --- a/newsfragments/1404.bugfix.md +++ /dev/null @@ -1 +0,0 @@ -Fix several MIR correctness issues: `fe build --contract` now filters Sonatina IR output correctly, ingot builds work when contracts are re-exported from the root module, generic calls can forward concrete EVM effects, and escaping storage borrows are rejected. diff --git a/newsfragments/1404.feature.md b/newsfragments/1404.feature.md deleted file mode 100644 index 1493f96ab9..0000000000 --- a/newsfragments/1404.feature.md +++ /dev/null @@ -1 +0,0 @@ -Replace backend lowering with the staged SMIR/NSMIR/MIR pipeline. This expands compile-time function evaluation, including const calls that produce aggregate values and symbolic array repeat expressions such as `[value; N]` where `N` is a const generic. diff --git a/newsfragments/1408.bugfix.md b/newsfragments/1408.bugfix.md deleted file mode 100644 index 3ca3a884aa..0000000000 --- a/newsfragments/1408.bugfix.md +++ /dev/null @@ -1 +0,0 @@ -Report invalid dependency paths in `fe.toml` as configuration diagnostics instead of panicking. diff --git a/newsfragments/1409.bugfix.md b/newsfragments/1409.bugfix.md deleted file mode 100644 index 197ed165a7..0000000000 --- a/newsfragments/1409.bugfix.md +++ /dev/null @@ -1 +0,0 @@ -Fix `StorageBytes.encode_return` so multi-word `bytes` values are ABI-encoded from allocated return memory instead of clobbering scratch memory. diff --git a/newsfragments/1410-never-type.bugfix.md b/newsfragments/1410-never-type.bugfix.md deleted file mode 100644 index 2bd895c6c6..0000000000 --- a/newsfragments/1410-never-type.bugfix.md +++ /dev/null @@ -1 +0,0 @@ -Fix never type (`!`) handling in trait checking and lowering. The compiler now avoids probing trait implementations for bare `!`, producing the intended diagnostic for invalid uses, and treats extern functions declared `-> !` as intrinsically non-returning even when they appear in functions with generic or associated return types. diff --git a/newsfragments/1412.feature.md b/newsfragments/1412.feature.md deleted file mode 100644 index 0414bcde97..0000000000 --- a/newsfragments/1412.feature.md +++ /dev/null @@ -1 +0,0 @@ -Add `static_assert(bool_expr)` for compile-time assertions, with diagnostics that show evaluated comparison operands and operators when an assertion fails. diff --git a/newsfragments/1413.feature.md b/newsfragments/1413.feature.md deleted file mode 100644 index 45610677c7..0000000000 --- a/newsfragments/1413.feature.md +++ /dev/null @@ -1 +0,0 @@ -Expand `const fn` evaluation to support mutable locals, assignments, aggregate field and index writes, `while` and `while let` loops with `break` and `continue`, match/destructuring patterns, and const operator trait implementations. This allows more ordinary helper code, including array and proof builders, to run during CTFE. diff --git a/newsfragments/1417.feature.md b/newsfragments/1417.feature.md deleted file mode 100644 index 57192931cf..0000000000 --- a/newsfragments/1417.feature.md +++ /dev/null @@ -1 +0,0 @@ -The standard prelude now includes `sol`, `Bytes`, `Decode`, and `AbiDecoder`, so common Solidity selector and ABI decoding code no longer needs explicit imports.