Skip to content

Conversation

@jleibs
Copy link

@jleibs jleibs commented Dec 20, 2023

Ran into a dependency conflict with using itertools 0.12 in our project that also depends on prost.

When I ran the tests everything appeared to work, so I'm not sure what the purpose of the <0.12 restriction was.

@MarijnS95
Copy link

so I'm not sure what the purpose of the <0.12 restriction was.

It is never desired to publish crates with an unbounded upper version range, as there is no guarantee that future semver-breaking itertools crate releases are compatible with its use in this crate.

i.e. when this <0.12 clause was written in 4d55103, itertools 0.12 wasn't released yet.


This version-range model allows prost to publish patch releases with dependency bumps of itertools, after prost was tested to be compatible like you did in this PR 🎉

Copy link
Contributor

@caspermeijn caspermeijn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please rebase to latest master to fix CI

bytes = { version = "1", default-features = false }
heck = "0.4"
itertools = { version = ">=0.10, <0.12", default-features = false, features = ["use_alloc"] }
itertools = { version = ">=0.10, <0.13", default-features = false, features = ["use_alloc"] }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Personally, I think this syntax explains better the intent of the version bounds.

Suggested change
itertools = { version = ">=0.10, <0.13", default-features = false, features = ["use_alloc"] }
itertools = { version = ">=0.10, <=0.12", default-features = false, features = ["use_alloc"] }

Copy link

@MarijnS95 MarijnS95 Mar 10, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@caspermeijn one thing that might be hiding is that this version range, whether it is written as <0.13 or <=0.12, allows 0.12.99999. Some folks find that confusing with the second format, though I also prefer to read the version that is included rather than the one that is excluded 👍

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, the intention is to include/allow 0.12 series, so I prefer to write is the suggested way.

@caspermeijn
Copy link
Contributor

Fixed in #948

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.

3 participants