Open alice-i-cecile opened 4 days ago
There are multiple ways to accomplish this, but I think the sparse index protocol may be easiest. If you go to https://index.crates.io/be/vy/bevy, you get a JSON of every single Bevy version and its dependencies. If you do the same for all the dependencies in Cargo.toml
, you can find what plugin versions require what Bevy versions.
If you want to get really fancy, you can even lookup ~/.cargo/registry/index/
to see this all locally, without any HTTP requests!
Suggestions for the command name?
Maybe bevy update
, although that could be a bit confusing as it doesn't perform the update itself.
bevy ready --upgrade
?
bevy ready --upgrade
?
What would bevy ready
do without the --upgrade
flag?
Prints info about if you can upgrade and why, displaying which crates need to be bumped to which versions.
As a quick mockup:
$ bevy ready
bevy = 0.13.1 (latest 0.14.2)
bevy_mod_picking = 0.19.0 (latest 0.20.0 supports 0.14.2)
bevy_asset_loader = 0.20.0 (latest 0.21.0 supports 0.14.0)
$ bevy ready
You can update Bevy! Run `bevy ready --fix` to update your project to Bevy 0.14.2 (latest).
bevy = 0.13.1 (latest 0.14.2)
bevy_mod_picking = 0.19.0 (latest 0.20.0 supports 0.14.2)
bevy_asset_loader = 0.20.0 (latest 0.21.0 supports 0.14.0)
--fix
sounds a bit weird for an upgrade. My project isn't broken, after all. I'd stick to update
, upgrade
, modify
, or a similar verb.
I almost want to say, bevy bump
because that's the word I always think of when changing versions. But I may be in the minority!
Bevy bump is great :D
I love bevy bump, great suggestion!
Checks if a compatible version of all your bevy-reliant crates have compatible versions for a specified Bevy version, defaulting to latest. If an additional flag is provided, actually goes and edits your cargo.toml.