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

Disentangle bevy_utils/bevy_core's reexported dependencies #12313

Merged
merged 17 commits into from
Mar 7, 2024

Conversation

james7132
Copy link
Member

@james7132 james7132 commented Mar 5, 2024

Objective

Make bevy_utils less of a compilation bottleneck. Tackle #11478.

Solution

  • Move all of the directly reexported dependencies and move them to where they're actually used.
  • Remove the UUID utilities that have gone unused since TypePath took over for TypeUuid.
  • There was also a extraneous bytemuck dependency on bevy_core that has not been used for a long time (since encase became the primary way to prepare GPU buffers).
  • Remove the all_tuples macro reexport from bevy_ecs since it's accessible from bevy_utils.

Changelog

Removed: Many of the reexports from bevy_utils (petgraph, uuid, nonmax, smallvec, and thiserror).
Removed: bevy_core's reexports of bytemuck.

Migration Guide

bevy_utils' reexports of petgraph, uuid, nonmax, smallvec, and thiserror have been removed.

bevy_core' reexports of bytemuck's types has been removed.

Add them as dependencies in your own crate instead.

@james7132 james7132 added C-Dependencies A change to the crates that Bevy depends on M-Needs-Migration-Guide A breaking change to Bevy's public API that needs to be noted in a migration guide A-Utils Utility functions and types labels Mar 5, 2024
@alice-i-cecile alice-i-cecile added the C-Code-Quality A section of code that is hard to understand or change label Mar 5, 2024
@alice-i-cecile
Copy link
Member

alice-i-cecile commented Mar 5, 2024

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

Looks like there's more toml formatting to do.

Copy link
Contributor

@NiseVoid NiseVoid left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes seem reasonable, besides the one comment I placed that seems a bit odd.

@@ -10,12 +10,13 @@ keywords = ["bevy"]
readme = "README.md"

[features]
default = []
default = ["smallvec"]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Having just this feature in default feels wrong 🤔

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This makes it a non-breaking change because previously it wasn't optional.

@alice-i-cecile alice-i-cecile added the S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it label Mar 6, 2024
@alice-i-cecile alice-i-cecile added this pull request to the merge queue Mar 6, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Mar 6, 2024
@alice-i-cecile
Copy link
Member

CI failures are real, unsurprisingly. James, feel free to merge once you can get things building without default features.

@james7132 james7132 enabled auto-merge March 7, 2024 02:19
@james7132 james7132 added this pull request to the merge queue Mar 7, 2024
Merged via the queue into bevyengine:main with commit 512b746 Mar 7, 2024
29 checks passed
spectria-limina pushed a commit to spectria-limina/bevy that referenced this pull request Mar 9, 2024
…e#12313)

# Objective
Make bevy_utils less of a compilation bottleneck. Tackle bevyengine#11478.

## Solution
* Move all of the directly reexported dependencies and move them to
where they're actually used.
* Remove the UUID utilities that have gone unused since `TypePath` took
over for `TypeUuid`.
* There was also a extraneous bytemuck dependency on `bevy_core` that
has not been used for a long time (since `encase` became the primary way
to prepare GPU buffers).
* Remove the `all_tuples` macro reexport from bevy_ecs since it's
accessible from `bevy_utils`.

---

## Changelog
Removed: Many of the reexports from bevy_utils (petgraph, uuid, nonmax,
smallvec, and thiserror).
Removed: bevy_core's reexports of bytemuck.

## Migration Guide
bevy_utils' reexports of petgraph, uuid, nonmax, smallvec, and thiserror
have been removed.

bevy_core' reexports of bytemuck's types has been removed. 

Add them as dependencies in your own crate instead.
@james7132 james7132 deleted the split-bevy_utils branch March 10, 2024 07:27
zhaop added a commit to zhaop/transform-gizmo that referenced this pull request Jun 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Utils Utility functions and types C-Code-Quality A section of code that is hard to understand or change C-Dependencies A change to the crates that Bevy depends on M-Needs-Migration-Guide A breaking change to Bevy's public API that needs to be noted in a migration guide S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants