build: Don't re-export foreign crates in utils#4087
Merged
Conversation
for internal code, but use the dependency directly.
but turn `zellij-utils` dependencies into shared workspace dependencies instead and specify those in `Cargo.toml` explicitly. This gives a much better overview of what component in zellij uses which crates. The previous approach hides a lot of this information since it looks like crates are used in a single place where this isn't actually true.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
zellij-utilspreviously re-exported a bundle of foreign dependencies at the crate root. These were happily used by other zellij components across the codebase in favor of directly depending on these crates.This raises a few problems:
zellij-utilsare our own code and which are foreign. This bloats the API surface by an enormous amount.zellij-utilsdon't enumerate their dependencies correctly: Since zellij-utils re-exports a lot of things, other crates don't define these dependencies themselves. This makes it look like a dependency is used only in zellij utils until the point where you try to remove it and distant parts of the code fall apartIn order to make future work with dependencies easier, this removes the re-exports in zellij-utils and instead makes the respective dependants depend on these packages directly. Where appropriate, dependencies used by multiple components are turned into workspace dependencies to make it clear they're used in multiple places.