rust-fuzz / rust-fuzz/arbitrary
Failure to build 1.4.1 on existing projects that were using 1.3.2
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 880
- Forks
- 93
- PR merge metrics
- No merged PRs in 30d
Description
Similar to #203, it seems like the 1.4.1 releases are still making assumptions about items in the current space that weren't prior, which is a breaking change, and fails to build on projects who were dependent on 1.3.2.
Cargo.toml:
[package]
name = "pkg"
edition = "2021"
[dependencies]
soroban-sdk = { version = "=21.7.6" }
[dev-dependencies]
soroban-sdk = { version = "=21.7.6", features = ["testutils"] }
src/lib.rs:
#![no_std]
use soroban_sdk::contracttype;
#[contracttype]
#[derive(Clone, Debug, PartialEq)]
pub struct Struct {
pub index: u64,
}
Run cargo test with 1.4.1:
$ cargo update artbirary --precise 1.4.1
$ cargo update derive_artbirary --precise 1.4.1
$ cargo test
Included in the output are the following build errors:
error[E0433]: failed to resolve: could not find `std` in the list of imported crates
--> src/lib.rs:5:1
|
5 | #[contracttype]
| ^^^^^^^^^^^^^^^ could not find `std` in the list of imported crates
|
= note: this error originates in the derive macro `soroban_sdk::testutils::arbitrary::arbitrary::Arbitrary` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0425]: cannot find value `RECURSIVE_COUNT_ArbitraryStruct` in this scope
--> src/lib.rs:5:1
|
5 | #[contracttype]
| ^^^^^^^^^^^^^^^ not found in this scope
|
= note: this error originates in the derive macro `soroban_sdk::testutils::arbitrary::arbitrary::Arbitrary` (in Nightly builds, run with -Z macro-backtrace for more info)
Re-run cargo test with 1.3.2 and it compiles:
$ cargo update artbirary --precise 1.3.2
$ cargo update derive_artbirary --precise 1.3.2
$ cargo test
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the failure with the Cargo.toml and src/lib.rs examples by pinning arbitrary and derive_arbitrary to 1.4.1, then run cargo test and compare with 1.3.2. Start from the #[contracttype] expansion and the reported Arbitrary errors; done means the existing project builds successfully with 1.4.1.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100