-
-
Notifications
You must be signed in to change notification settings - Fork 450
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
Rand no longer compiles #818
Comments
@dhardy I have the same issue |
|
What I'm thinking is that all of subpackage doesn't have rand_core updated to 0.5.0, anyway all the project breaks |
Yup, it won't. I'm trying to fix it. If you force use of rand_core 0.4 for now it will avoid this issue... hopefully I'll have a compatibility shim ready soon. |
Can you describe this process? I've had no luck using Cargo's patching. |
I'll have the compatibility shim out soon (see #819). |
Sorry, it's more than that: other rand crates also need to be downgraded (e.g. |
@sfackler I don't think the whole error report was necessary ;) Can you hide it somehow ? |
@dhardy could this be fixed by yanking the offending versions? |
@dhardy as you suggested in #819 (comment) I think yanking is the best solution right now: the new version broke tons of things, including rustc's CI (we can't land any PRs right now). |
[patch.crates-io]
rand = { git = "https://github.com/rust-random/rand.git", rev = "ff121cff61dfcb8c06a618b204ed93be727c4303" }
rand_core = { git = "https://github.com/rust-random/rand.git", rev = "ff121cff61dfcb8c06a618b204ed93be727c4303" }
rand_hc = { git = "https://github.com/rust-random/rand.git", rev = "ff121cff61dfcb8c06a618b204ed93be727c4303" }
rand_chacha = { git = "https://github.com/rust-random/rand.git", rev = "ff121cff61dfcb8c06a618b204ed93be727c4303" }
rand_distr = { git = "https://github.com/rust-random/rand.git", rev = "ff121cff61dfcb8c06a618b204ed93be727c4303" }
rand_isaac = { git = "https://github.com/rust-random/rand.git", rev = "ff121cff61dfcb8c06a618b204ed93be727c4303" }
rand_jitter = { git = "https://github.com/rust-random/rand.git", rev = "ff121cff61dfcb8c06a618b204ed93be727c4303" }
rand_os = { git = "https://github.com/rust-random/rand.git", rev = "ff121cff61dfcb8c06a618b204ed93be727c4303" }
rand_pcg = { git = "https://github.com/rust-random/rand.git", rev = "ff121cff61dfcb8c06a618b204ed93be727c4303" }
rand_xorshift = { git = "https://github.com/rust-random/rand.git", rev = "ff121cff61dfcb8c06a618b204ed93be727c4303" }
rand_xoshiro = { git = "https://github.com/rust-random/rand.git", rev = "ff121cff61dfcb8c06a618b204ed93be727c4303" } I was able to use this patch to compile from the revision just before the new release commits started. |
Although downgraded it, some another library continues requiring this version and my API continues breaking |
Fair enough. But I now lack a strategy for publishing rand 0.7 without a clean break. |
@kflansburg
|
Hmmm, I do not use those other crates so I'm afraid I can't help there. Edit: The revision I used was from 17 days ago, I figured it would work for most people as I don't see bugs reported in that time. |
All yanked. But now the question is how do I publish new Rand versions without causing this problem again? Theoretically, I could use pre-release versions for each depedency, then publish Rand using the pre-release versions. |
Everything boils down to one problem: Cargo assumes it can safely use Please help find a solution to this one, otherwise I can promise you more pain in the future (even if I do my best to avoid repeating this one). |
Thank you, you are the best. |
So, Do we have a solution? |
Ah: I think the cause of everyone's problems was that I published a new patch version (0.1.1) of So, rule for the future: if bumping a minor/major version of a dependency used in the API, also use at least a minor version bump of this package. (Can Cargo enforce this?) |
@dhardy is possible that every dependency use rand_core=0.5? I mean rand_hc, rand_os etc... Use every dependency the same rand_core version I can try it |
0.4 and 0.5 are semver-incompatible versions and rand_core is a public dependency of rand_hc, so that bump is a breaking change. |
I see that 0.7 has all the dependencies updated to 0.5. I think it would be enough. |
It works now for me, thanks |
rand = {git="https://github.com/rust-random/rand.git"} (last commit) |
…oxide` optional (even for tests) Motivated by the recent build-breaking accident in the `rand`-crate (rust-random/rand#818)
* Seed random number generation with event's ingestion time * Move function to random namespace and rename existing funtion * Simple test for the function * Docs on function usage and event drop recipe based on this Had to downgrade rand crate to 0.6.5 (from 0.7.0) becasue of compilation issues with newer version (when using seeded RNG): rust-random/rand#818
I am having the same issue. Using
does not solve my problem, I receive this error when using the quoted solution:
|
@oren0e I fail to see how this is the same issue. Open a new one. But don't expect any support for using |
A crate that just depends on
rand = "0.6"
no longer compiles, producing these errors:It looks like new versions of a bunch of the inner crates were just released that may not have been semver-compatible?
The text was updated successfully, but these errors were encountered: