Skip to content

Conversation

@nelson137
Copy link
Contributor

Closes #419

Changes

  • Move all dependencies that are only re-exported (those not used directly) from bones_utils to the workspace
    • Other crates that used those re-exported modules now inherit the dependency from the workspace and use it directly
  • Feature-flagged some modules in bones_utils that aren't needed by bones_schema
    • ulid was the main transitive dependency not needed by bones_schema
    • instant and turborand where only needed by the ulid module, so those were gated too
    • The rest of the utils modules could be gated as well, but the schema crate is the focus of these change

Dependency Graph

I created a blank lib crate and took a path dependency on bones_schema. Then used cargo-depgraph to visualize the resulting dependencies of these changes.

Before

deps-before

After

deps-after

@zicklag
Copy link
Member

zicklag commented Sep 25, 2024

I didn't review the code, but I love the new depgraph! 🤩

Copy link
Collaborator

@MaxCWhitehead MaxCWhitehead left a comment

Choose a reason for hiding this comment

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

Looks great, thank you! I will start following the practice of using workspace deps when relevant. Should also make our lives easier bumping versions across crates without introducing issues or screwing up deps.

@MaxCWhitehead
Copy link
Collaborator

Also good find on cargo-depgraph, will have to write that down for the future.

@MaxCWhitehead MaxCWhitehead added this pull request to the merge queue Oct 3, 2024
Merged via the queue into fishfolk:main with commit 1d0837d Oct 3, 2024
10 checks passed
@nelson137 nelson137 deleted the fix/reduce-schema-deps branch October 3, 2024 18:24
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.

Reduce transitive dependencies of bones_schema

3 participants