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

Specify minimal versions for dependencies #107

Closed
wants to merge 1 commit into from

Conversation

jonasbb
Copy link

@jonasbb jonasbb commented May 11, 2024

fraction is a transitive dependency in one of my projects and an upgrade to 0.15.2 broke the CI build due to wrongly specified minimal versions.

   Compiling fraction v0.15.2
error[E0432]: unresolved imports `num::traits::ConstOne`, `num::traits::ConstZero`
Error:    --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/fraction-0.15.2/src/lib.rs:227:14
    |
227 |     traits::{ConstOne, ConstZero},
    |              ^^^^^^^^  ^^^^^^^^^ no `ConstZero` in `traits`
    |              |
    |              no `ConstOne` in `traits`

For more information about this error, try `rustc --explain E0432`.
error: could not compile `fraction` (lib) due to 1 previous error
warning: build failed, waiting for other jobs to finish...
Error: Process completed with exit code 101.

fraction 0.15.2 makes use of traits that are only available in num 0.4.2+ but itself specifies support with num 0.4.0.

num = { version = "0.4", default-features = false }

I added a minor version component to all dependencies in Cargo.toml. for serde and related crates the patch version is important.

@dnsl48
Copy link
Owner

dnsl48 commented May 12, 2024

Hi @jonasbb,
Thanks for reporting the issue.
I don't believe we can pin all dependencies for the same reason to not lock out people locked with older versions of serde or lazy_static.
However, the num crate is definitely the crate we should be more precise with.
The version 0.15.2 is now yanked and 0.15.3 is now dependant on num "0.4.2".
I'm closing this as resolved, but if 0.15.3 still gives you some dependency breakages, please reopen.

@dnsl48 dnsl48 closed this May 12, 2024
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 this pull request may close these issues.

None yet

2 participants