Skip to content

Commit 9d1c7ae

Browse files
committed
Require exact version of arbitrary-derive
`Arbitrary` had a new `try_size_hint` method added in #185 - while this was semver safe for `arbitrary` because a default implementation was provided which forwarded along, the new version of `arbitrary-derive` which follows the same versioning as `arbitrary` started generating `try_size_hint` methods, which causes v1.2.3 to fail to compile, as it tries to grab `arbitrary-derive` "1.2.3" from crates.io, which gets responded to with a "1.4.0" version. Given that: 1. It is reasonable to evolve your traits this way, and it doesn't break semver on the base package 2. The patchlevel is specified on `arbitrary-derive`, so it seems the intent is to require a matching version 3. You likely want to keep the same version for your proc-macro as your main crate This proposes using exact equality in the `Cargo.toml` so that future trait updates of this nature won't break the ability to build older packages via Cargo.
1 parent 65d54d8 commit 9d1c7ae

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ documentation = "https://docs.rs/arbitrary/"
2020
rust-version = "1.63.0" # Keep in sync with version documented in the README.md
2121

2222
[dependencies]
23-
derive_arbitrary = { version = "1.4.0", path = "./derive", optional = true }
23+
derive_arbitrary = { version = "~1.4.0", path = "./derive", optional = true }
2424

2525
[features]
2626
# Turn this feature on to enable support for `#[derive(Arbitrary)]`.

0 commit comments

Comments
 (0)