Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failure to build 1.4.0 on existing projects that were using 1.3.2 #203

Closed
leighmcculloch opened this issue Nov 4, 2024 · 7 comments · Fixed by #205
Closed

Failure to build 1.4.0 on existing projects that were using 1.3.2 #203

leighmcculloch opened this issue Nov 4, 2024 · 7 comments · Fixed by #205

Comments

@leighmcculloch
Copy link

leighmcculloch commented Nov 4, 2024

It seems that 1.4.0 is making assumptions about items in the current space, which is a breaking change, and fails to build on projects who were dependent on any 1 version, such as previously 1.3.2.

I discovered this error because projects using new projects created using the soroban-sdk crate started pulling in arbitrary and derive_arbitrary 1.4.0 and see build errors.

$ git clone https://github.com/stellar/rs-soroban-sdk
$ git checkout fc32690edd223fd01054c625d9c6dca01bd99e67 # main at today's date
$ cd rs-soroban-sdk
$ cargo update arbitrary --precise 1.4.0
$ cargo test

Included in the output are the following build errors:

error[E0107]: type alias takes 1 generic argument but 2 generic arguments were supplied
   --> /Users/leighmcculloch/.cargo/registry/src/index.crates.io-6f17d22bba15001f/stellar-xdr-22.0.0-rc.1.1/src/curr/generated.rs:935:42
    |
935 | #[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
    |                                          ^^^^^^^^^ expected 1 generic argument
    |
note: type alias defined here, with 1 generic parameter: `T`
   --> /Users/leighmcculloch/.cargo/registry/src/index.crates.io-6f17d22bba15001f/stellar-xdr-22.0.0-rc.1.1/src/curr/generated.rs:226:6
    |
226 | type Result<T> = core::result::Result<T, Error>;
    |      ^^^^^^ -
    = note: this error originates in the derive macro `Arbitrary` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0053]: method `try_size_hint` has an incompatible type for trait
   --> /Users/leighmcculloch/.cargo/registry/src/index.crates.io-6f17d22bba15001f/stellar-xdr-22.0.0-rc.1.1/src/curr/generated.rs:935:42
    |
935 | #[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
    |                                          ^^^^^^^^^ expected `MaxRecursionReached`, found `generated::Error`
    |
    = note: expected signature `fn(_) -> std::result::Result<_, MaxRecursionReached>`
               found signature `fn(_) -> std::result::Result<_, generated::Error>`
    = note: this error originates in the derive macro `Arbitrary` (in Nightly builds, run with -Z macro-backtrace for more info)
@frewsxcv
Copy link
Member

frewsxcv commented Nov 5, 2024

Yep this broke our CI for us too

error[E0658]: use of unstable library feature 'error_in_core'
  --> /usr/local/cargo/registry/src/index.crates.io-6f17d22bba15001f/arbitrary-1.4.0/src/lib.rs:52:6
   |
52 | impl core::error::Error for MaxRecursionReached {}
   |      ^^^^^^^^^^^^^^^^^^
   |
   = note: see issue #103765 <https://github.com/rust-lang/rust/issues/103765> for more information

For more information about this error, try `rustc --explain E06[58](https://github.com/georust/geo/actions/runs/11686445121/job/32542225331?pr=1258#step:7:59)`.
error: could not compile `arbitrary` (lib) due to 1 previous error
warning: build failed, waiting for other jobs to finish...

@Manishearth
Copy link
Member

#205 fixes this.

dmkozh added a commit to dmkozh/rs-soroban-env that referenced this issue Nov 5, 2024
The check is broken due to `arbitrary` crate update (rust-fuzz/arbitrary#203).
github-merge-queue bot pushed a commit to stellar/rs-soroban-env that referenced this issue Nov 5, 2024
### What

Disable semver checks temporarily.

### Why

The check is broken due to `arbitrary` crate update
(rust-fuzz/arbitrary#203).

### Known limitations

N/A
@shaobo-he-aws
Copy link

Could you please also release derive_arbitrary 1.4.1?

@Manishearth
Copy link
Member

Ah oops, I forgot those were separate crates.

@Manishearth
Copy link
Member

Published, and fixed the tag

@leighmcculloch
Copy link
Author

@Manishearth Thank you! I can confirm downstream failures are resolved now.

@leighmcculloch
Copy link
Author

@Manishearth Thank you! I can confirm downstream failures are resolved now.

Came across another case where builds fail with 1.4.1 vs 1.3.2. Opened a new issue here:

github-merge-queue bot pushed a commit to stellar/rs-soroban-sdk that referenced this issue Nov 12, 2024
### What
Limit the versions of arbitrary/derive_arbitrary to 1.3.x.

### Why
Arbitrary introduced changes into the 1.4.x releases that no longer
compiles with the use of arbitrary in the soroban-sdk:
- rust-fuzz/arbitrary#203
- rust-fuzz/arbitrary#208
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants