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

Investigate workspace-level dependencies #12374

Open
BD103 opened this issue Mar 8, 2024 · 3 comments
Open

Investigate workspace-level dependencies #12374

BD103 opened this issue Mar 8, 2024 · 3 comments
Labels
A-Cross-Cutting Impacts the entire engine C-Dependencies A change to the crates that Bevy depends on S-Needs-Investigation This issue requires detective work to figure out what's going wrong

Comments

@BD103
Copy link
Member

BD103 commented Mar 8, 2024

Good stuff. I'd like to look into workspace-level dependencies at some point too.

Originally posted by @alice-i-cecile in #12313 (comment)

Workspace-level dependencies allow for consistent dependency versions across multiple crates. They can be handy for keeping popular libraries, such as serde, syn, toml_edit and more in sync and reduce dependency duplication.

They can be specified with:

# Root Cargo.toml
[workspace.dependencies]
serde = "1.0.99999"

And can be used by a crate with:

[dependencies]
serde = { workspace = true }
# or
serde.workspace = true
@BD103 BD103 added D-Trivial Nice and easy! A great choice to get started with Bevy C-Dependencies A change to the crates that Bevy depends on labels Mar 8, 2024
@BD103
Copy link
Member Author

BD103 commented Mar 8, 2024

I want to be clear that I think this is worth investigating, but is not necessarily going to be implemented and approved. It may end up as a giant list of dependencies in an already massive Cargo.toml and lots of bikeshedding about which dependencies deserve this treatment.

But then again, please try it out and let us know how it goes.

@Kanabenki
Copy link
Contributor

Kanabenki commented Mar 8, 2024

IMO if workspace dependencies are to be used, the rule should be clear and simple to enforce, like putting every dep as a workspace dependency, or putting any dep used by more than one crate as a workspace dep. Not sure how easy it would be to do but the best would be to enforce the chosen rule in CI.

@alice-i-cecile alice-i-cecile removed the D-Trivial Nice and easy! A great choice to get started with Bevy label Mar 8, 2024
@BD103 BD103 added S-Blocked This cannot move forward until something else changes A-Cross-Cutting Impacts the entire engine labels May 9, 2024
@BD103
Copy link
Member Author

BD103 commented May 9, 2024

Compile fail tests are incompatible with all workspace-inherited configuration, in their current form. That will need to be resolved before this issue can move forward.

@BD103 BD103 added S-Needs-Investigation This issue requires detective work to figure out what's going wrong and removed S-Blocked This cannot move forward until something else changes labels Jul 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Cross-Cutting Impacts the entire engine C-Dependencies A change to the crates that Bevy depends on S-Needs-Investigation This issue requires detective work to figure out what's going wrong
Projects
None yet
Development

No branches or pull requests

3 participants