-
-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Update rand
, glam
and encase
to latest versions
#18047
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
base: main
Are you sure you want to change the base?
Conversation
1d955c8
to
02c1ca9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, lots of files changed but as mentioned in the pr its a 1:1 mapping to the updated function naming convention. I'm sure the wasm rustflags will be a gotcha for many a rust newbie, it'll be helful for us to explain this as much as possible in docs and guides.
02c1ca9
to
6b8bb28
Compare
@Bluefinger - |
Could this be added to 16.1 milestone? |
I think this would cause breaking changes that might be painful to deal with for 0.16 projects, which would not really fit nicely with semver. I understand wanting to have this now though... shame it took like three months to get all the deps ready for this upgrade. Just to add to this: I'd rather keep semver breaking updates to API changes and new bevy versions if possible. That's just my two cents however. Other folks can chip in with whether it is worth doing this or not. |
It looks like your PR is a breaking change, but you didn't provide a migration guide. Please review the instructions for writing migration guides, then expand or revise the content in the migration guides directory to reflect your changes. |
Correct: 0.17 only unfortunately :( @Bluefinger, we've changed how migration guides work as of the 0.17 cycle. Could you copy your excellent migration guide into a dedicated file quick? Once that's done I'll merge this! |
@alice-i-cecile Done. Feel free to double check the content or adjust wording. |
FYI, @mockersf has warned me that the changes needed here for Web for I don't intend to leave us on the old versions forever, but it's important to note that this is much higher stakes than normal dependency bumps. |
If we don't go forward with the upgrade, please let's signal such to the |
If you want a good out-of-box support, then you should advocate for a proper Web WASM target. For example, As a |
Yep, this is high on our wishlist too :)
Makes sense: no objections to this design either.
This is useful to know. Moderately frustrating, as I would like to be unblocked on updating our dependencies well before that, but I understand that as a foundational crate you don't want to release breaking changes too frequently. If we discover a good solution, we may temporarily fork to get unblocked sooner, although that will require coordination with our other dependencies. The other option is for us to build out and push tooling to help manage this pain for users on the web, e.g. |
Hey everyone, I'm the other maintainer of For context as @newpavlov mentioned, Further complicating things, overriding the source of randomness is a very security-sensitive thing to do, so we don't want to allow any crate in the dependency graph to override it, making it challenging to only use Cargo features (which can be set by any crate on any other crate). So we use The other problem is that the Without releasing a breaking change (which would be quite disruptive), we could:
I would take a slightly more relaxed stance, that we cannot have any breaking changes to our handling of the target, but if there's something we could do that's not a breaking change, I would consider it. |
Personally, I am against it. The unfortunate reality is that people unconditionally enable such features in library crates for "convenience" despite strongly worded warnings against it. This breaks builds for users who target non-Web WASM. Even worse, just having Overall, we discussed this problem long enough before settling on the current solution with the full understanding of drawbacks. I think that the ecosystem should just bite the bullet here. Hopefully, it will add a bit of motivation for improving the unsatisfactory Web WASM situation. In my opinion, introducing new exceptions and workarounds at this stage would do more harm than good. |
@josephlr If I completed that exploration branch, would it be a design the Obviously no one person speaks for the project, so "interest" is good enough for me to be motivated to complete the prototype. I have no desire to fragment the Rust ecosystem for an ergonomics change (that's the worst ergonomics!). |
@alice-i-cecile @mockersf Just as a heads up, I don't think we can avoid the effect of RUSTFLAGS/ |
I've opened rust-random/getrandom#671 so we can move most of the non-
Thanks so much for opening rust-random/getrandom#670 !! I'll try to take a look when I have time to really dive into it. I'm definitely interested if it could work (either in 0.3 or in a future release).
This makes sense, and I would expect that most of your users targeting |
@josephlr just to clarify, the issue with the |
Objective
New
rand
version, which means updatingglam
andencase
to support the newer ecosystem update. Does mean that this changes how WASM builds need to be done in order to configuregetrandom
correctly, but this can be remedied with updated docs.Solution
Updating all needed dependencies to their compatible versions.
This PR is currently blocked byencase
, which is waiting on this PR to be merged and then a new version published.This PR is no longer blocked,, The PR is all good to go now, everything in order across glam/rand deps.hexasphere
is blocking this PR now due to not yet having a new release with the latestglam
version supportTesting
Migration Guide
With newer versions of
glam
&encase
, the updated versions don't seem to have introduced breakages, though as always, best to consult their docs 1 2 for any changes.rand
changes are more extensive, with changes such asthread_rng()
->rng()
,from_entropy()
->from_os_rng()
, and so forth.RngCore
is now split into infallibleRngCore
and fallibleTryRngCore
, and thedistributions
module has been renamed todistr
. Most of this affects only internals, and doesn't directly affect Bevy's APIs. For the full set of changes, seerand
migration notes.getrandom
is also updated, and will require additional configuration when building Bevy for WASM/Web (if also usingrand
). The full details of how to do this is in thegetrandom
docs 1 2.