-
Notifications
You must be signed in to change notification settings - Fork 251
Open
Labels
Description
Description
snforge test fails with "found an unexpected cycle during cost computation" when a package has both:
[[target.executable]]defined in Scarb.tomlenable-gas = falsein Scarb.toml
This happens with any code - even a trivial fn foo() { 42 }.
Related Issue
This appears related to: software-mansion/scarb#2981
Minimal Reproduction
Repository: https://github.com/feltroidprime/snforge-cycle-repro
git clone https://github.com/feltroidprime/snforge-cycle-repro
cd snforge-cycle-repro
snforge testOutput:
[ERROR] found an unexpected cycle during cost computation
[ERROR] Error while compiling Sierra...
Minimal Files (45 lines total)
src/ntt.cairo:
pub fn foo() -> felt252 {
42
}Scarb.toml:
[package]
name = "cycle_repro"
version = "0.1.0"
edition = "2024_07"
[lib]
[[target.executable]]
name = "my_executable"
function = "cycle_repro::programs::bench_ntt::main"
[cairo]
enable-gas = false # Remove this and tests pass
[dependencies]
cairo_execute = "2.15.1"
[dev-dependencies]
snforge_std = { git = "https://github.com/foundry-rs/starknet-foundry", tag = "v0.55.0" }
assert_macros = "2.15.1"Workaround
Remove either:
- The
[[target.executable]]section, OR - The
[cairo] enable-gas = falsesection
Environment
- snforge 0.55.0
- scarb 2.15.1
- Cairo 2.15.1
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
TODO