Skip to content

test test_json_roundtrip_guessed failed #10642

Open
@DaniPopes

Description

@DaniPopes

https://github.com/foundry-rs/foundry/actions/runs/15261962123/job/42921323717

    proptest: Aborting shrinking after the PROPTEST_MAX_SHRINK_ITERS environment variable or ProptestConfig.max_shrink_iters iterations (set 1024 to a large(r) value to shrink more; current configuration: 1024 iterations)
    proptest: Saving this and future failures in /home/runner/work/foundry/foundry/crates/cheatcodes/proptest-regressions/json.txt
    proptest: If this test was run on a CI system, you may wish to add the following line to your copy of the file. (You may need to create it.)
    cc 913fde57c806abbaa5eb3f013794819dfa020381666a3cbbc4cb734791f14700

    thread 'json::tests::test_json_roundtrip_guessed' panicked at crates/cheatcodes/src/json.rs:723:5:
    Test failed: called `Result::unwrap()` on an `Err` value: SolTypes(Overrun).
    minimal failing input: v = Array(
        [
            String(
                "{}",
            ),
        ],
    )
    	successes: 232
    	local rejects: 143
    		143 times at tuples are not supported
    	global rejects: 0

due to:

DynSolValue::String(s) => {
// Strings are allowed to contain stringified JSON objects, so we try to parse it like
// one first.
if let Ok(map) = serde_json::from_str(&s) {
Ok(Value::Object(map))
} else {
Ok(Value::String(s))
}
}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions