Skip to content

Conversation

@dhardy
Copy link
Member

@dhardy dhardy commented Apr 17, 2019

Fixes #766

@vks
Copy link
Collaborator

vks commented Apr 17, 2019

I'm not sure how this is related to #776. Did you mean #766?

@dhardy
Copy link
Member Author

dhardy commented Apr 17, 2019

Corrected. The danger of using auto-completion!

(particularly `RngCore`) compatible across crate versions. This means that a
few crate releases (`rand_core` versions `0.2.2` and `0.3.1`) are compatibility
shims depending on the *next* version of `rand_core`. When multiple crates
depend on `rand_core`, they must *all* depend on the same version of `rand_core`
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is this correct? I think, in principle a crate can use different versions, it just might mean that the types of the different versions are incompatible (i.e. rand_core_0_4_0::SeedableRng and rand_core_0_3_0::SeedableRng are different types). As long as this compatiblity is not required, it should be fine to depend on multiple versions of rand_core.

Copy link
Member Author

Choose a reason for hiding this comment

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

You are correct, however for most users I don't think the distinction matters, and thought a simpler explanation would be better. But if you can word it better, then please do. Also note that there are unlikely to be any good reasons to use incompatible versions, and doing so is still prone to causing confusing errors.

@dhardy
Copy link
Member Author

dhardy commented Apr 18, 2019

@vks I updated the text (hopefully correct but deliberately short on details).

@dhardy dhardy merged commit a506efe into rust-random:master Apr 20, 2019
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.

Semver issue between rand, rand_core 0.4.0 and rand_core 0.3.0

2 participants