TheBevyFlock / bevy_cli

A Bevy CLI tool.
Apache License 2.0
19 stars 4 forks source link

Feature request: can I update Bevy yet? #101

Open alice-i-cecile opened 4 days ago

alice-i-cecile commented 4 days ago

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.

BD103 commented 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!

TimJentzsch commented 4 days ago

Suggestions for the command name?

Maybe bevy update, although that could be a bit confusing as it doesn't perform the update itself.

janhohenheim commented 4 days ago

bevy ready --upgrade?

TimJentzsch commented 4 days ago

bevy ready --upgrade?

What would bevy ready do without the --upgrade flag?

alice-i-cecile commented 4 days ago

Prints info about if you can upgrade and why, displaying which crates need to be bumped to which versions.

BD103 commented 4 days ago

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)
alice-i-cecile commented 4 days ago
$ 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)
janhohenheim commented 3 days ago

--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.

richchurcher commented 3 days ago

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!

alice-i-cecile commented 3 days ago

Bevy bump is great :D

janhohenheim commented 3 days ago

I love bevy bump, great suggestion!