Skip to content
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

Bevy main #4

Closed
wants to merge 2 commits into from
Closed

Bevy main #4

wants to merge 2 commits into from

Conversation

TheNeikos
Copy link

The way the dependencies are currently setup, one cannot use the bevy git version. This way it always tracks bevy_main without resorting to patches (which are ignored for those using it in their repository)

@inodentry
Copy link
Collaborator

No, I will not accept this. This makes it harder to use for a lot of workflows (such as for people who use bevy from a local path, or a forked repository, or pin to a specific commit/branch). I'm pretty opinionated about this, I consider it bad practice for bevy plugin crates to specify bevy from git as a dependency, because it makes it harder to use your desired version of bevy in your project.

If you (in your project's Cargo.toml) and all of your bevy plugins simply specify bevy = "0.5", then you can trivially override all of them with a single cargo patch in your Cargo.toml. It will be replaced for all crates, without causing you to potentially have multiple incompatible versions of bevy in your dependency tree.

Imagine if you are trying to use a locally-cloned bevy. You add the [patch.crates-io] to your project, to point to the local path, but it doesn't apply to any plugins that list bevy from git, and now you have 2 incompatible versions of bevy in your dependency tree, leading to errors.

To use bevy main in your project, you should put the cargo patch in your Cargo.toml.

The cargo patch in bevy_loading is for when developing bevy_loading itself, so that it compiles against the latest main.

@inodentry inodentry closed this Sep 23, 2021
@TheNeikos
Copy link
Author

Alright! Thanks for the explanation of why, and you might have convinced me too

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants