Skip to content

Commit 2cb8b39

Browse files
cptarturddoktorski
andauthored
Release 0.48.0 (#3614)
<!-- Reference any GitHub issues resolved by this PR --> Closes # ## Introduced changes <!-- A brief description of the changes --> - ## Checklist <!-- Make sure all of these are complete --> - [ ] Linked relevant issue - [ ] Updated relevant documentation - [ ] Added relevant tests - [ ] Performed self-review of the code - [ ] Added changes to `CHANGELOG.md` --------- Co-authored-by: ddoktorski <45050160+ddoktorski@users.noreply.github.com>
1 parent ed823d2 commit 2cb8b39

File tree

22 files changed

+126
-131
lines changed

22 files changed

+126
-131
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
## [0.48.0] - 2025-08-05
11+
1012
### Forge
1113

14+
#### Added
15+
16+
- `snforge_std` is now compatible with Scarb procedural macros V2. Migration is required if using Scarb versions before `2.12.0`. See [migration guide](https://foundry-rs.github.io/starknet-foundry/getting-started/0-47-0-migration-guide.html).
17+
1218
#### Changed
1319

1420
- If using a Scarb version before `2.10.0` or not using `allow-prebuild-plugins`, the minimal required rust version to run `snforge` is now `1.87.0`

Cargo.lock

Lines changed: 37 additions & 36 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ members = [
2222
exclude = ["crates/snforge-scarb-plugin", "crates/snforge-scarb-plugin-deprecated"]
2323

2424
[workspace.package]
25-
version = "0.47.0"
25+
version = "0.48.0"
2626
edition = "2024"
2727
repository = "https://github.com/foundry-rs/starknet-foundry"
2828
license = "MIT"

crates/forge/src/lib.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,8 @@ const MINIMAL_RECOMMENDED_SCARB_VERSION: Version = Version::new(2, 9, 4);
4141
const MINIMAL_SCARB_VERSION_PREBUILT_PLUGIN: Version = Version::new(2, 10, 0);
4242
const MINIMAL_USC_VERSION: Version = Version::new(2, 0, 0);
4343
const MINIMAL_SCARB_VERSION_FOR_SIERRA_GAS: Version = Version::new(2, 10, 0);
44-
// TODO Set this to version from v2 macros release
45-
const MINIMAL_SNFORGE_STD_VERSION: Version = Version::new(0, 44, 0);
46-
// TODO Set this to version from v2 macros release
47-
const MINIMAL_SNFORGE_STD_DEPRECATED_VERSION: Version = Version::new(0, 44, 0);
44+
const MINIMAL_SNFORGE_STD_VERSION: Version = Version::new(0, 48, 0);
45+
const MINIMAL_SNFORGE_STD_DEPRECATED_VERSION: Version = Version::new(0, 48, 0);
4846
pub const MINIMAL_SCARB_VERSION_FOR_V2_MACROS_REQUIREMENT: Version = Version::new(2, 12, 0);
4947

5048
#[derive(Parser, Debug)]
Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

crates/forge/tests/e2e/new.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,7 @@ fn init_new_project() {
4949

5050
#[test_case(&Template::CairoProgram; "cairo-program")]
5151
#[test_case(&Template::BalanceContract; "balance-contract")]
52-
// TODO restore this test case after stable release
53-
// #[test_case(&Template::Erc20Contract; "erc20-contract")]
52+
#[test_case(&Template::Erc20Contract; "erc20-contract")]
5453
fn create_new_project_dir_not_exist(template: &Template) {
5554
let temp = tempdir_with_tool_versions().unwrap();
5655
let project_path = temp.join("new").join("project");

crates/forge/tests/e2e/plugin_versions.rs

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -172,22 +172,12 @@ fn new_scarb_old_macros() {
172172
.output()
173173
.unwrap();
174174

175-
let output = test_runner(temp.join("abc")).assert().success();
176-
let current_package_version = env!("CARGO_PKG_VERSION");
175+
let output = test_runner(temp.join("abc")).assert().failure();
177176

178177
assert_stdout_contains(
179178
output,
180179
formatdoc! {r"
181-
[WARNING] Package snforge_std version does not meet the recommended version requirement ^{current_package_version}, it might result in unexpected behaviour
182-
[..]Compiling[..]
183-
[..]Finished[..]
184-
185-
Collected 2 test(s) from abc package
186-
Running 0 test(s) from src/
187-
Running 2 test(s) from tests/
188-
[PASS] abc_integrationtest::test_contract::test_cannot_increase_balance_with_zero_value (l1_gas: ~[..], l1_data_gas: ~[..], l2_gas: ~[..])
189-
[PASS] abc_integrationtest::test_contract::test_increase_balance (l1_gas: ~[..], l1_data_gas: ~[..], l2_gas: ~[..])
190-
Tests: 2 passed, 0 failed, 0 ignored, 0 filtered out
180+
[ERROR] Package snforge_std version does not meet the minimum required version >=0.48.0. Please upgrade snforge_std in Scarb.toml
191181
", },
192182
);
193183
}

crates/forge/tests/e2e/running.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -917,8 +917,9 @@ fn should_panic() {
917917
);
918918
}
919919

920+
#[ignore = "TODO Restore this test once there are at least 2 versions supporting v2 macros"]
920921
#[test]
921-
#[cfg_attr(feature = "skip_plugin_checks", ignore = "Plugin checks skipped")]
922+
// #[cfg_attr(feature = "skip_plugin_checks", ignore = "Plugin checks skipped")]
922923
fn incompatible_snforge_std_version_warning() {
923924
let temp = setup_package("steps");
924925
let manifest_path = temp.child("Scarb.toml");
@@ -979,7 +980,7 @@ fn incompatible_snforge_std_version_error() {
979980
assert_stdout_contains(
980981
output,
981982
indoc! {r"
982-
[ERROR] Package snforge_std version does not meet the minimum required version >=0.44.0. Please upgrade snforge_std in Scarb.toml
983+
[ERROR] Package snforge_std version does not meet the minimum required version >=0.48.0. Please upgrade snforge_std in Scarb.toml
983984
"},
984985
);
985986
}

0 commit comments

Comments
 (0)