Add explanations of cross-version crate compatibility to README#777
Add explanations of cross-version crate compatibility to README#777dhardy merged 1 commit intorust-random:masterfrom
Conversation
|
Corrected. The danger of using auto-completion! |
rand_core/README.md
Outdated
| (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` |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
|
@vks I updated the text (hopefully correct but deliberately short on details). |
Fixes #766