feat: crates_universe Intra workspace Dependency Resolution#3308
Open
abezukor wants to merge 4 commits intobazelbuild:mainfrom
Open
feat: crates_universe Intra workspace Dependency Resolution#3308abezukor wants to merge 4 commits intobazelbuild:mainfrom
crates_universe Intra workspace Dependency Resolution#3308abezukor wants to merge 4 commits intobazelbuild:mainfrom
Conversation
b6d557a to
c9f57dd
Compare
Contributor
|
This is awesome! What ive been looking for! |
c9f57dd to
4ae1cd6
Compare
Contributor
|
any update on this |
Contributor
Author
@ericmcbride I am happy to rebase this and get it ready to be merged again if there was interest from the core team. |
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.
Currently
rules_rustrequires that intra-workspace dependencies are manually specified in thedepssections ofrust_libraryandrust_binarytargets. Third party dependencies can be automatically detected usingcrates_universe.I have a large cargo workspace with ~4500 intra-workspace dependencies that I plan to continue supporting compiling with cargo. Therefore I don't want to have to keep all of the intra-workspace dependencies up to date in both the
Cargo.tomland bazelBUILDfiles.This PR adds a disabled by default option to allow
all_crate_depsto also include intra-workspace dependencies in the rendering config. Once enabled you can useall_crate_depsin your build files to add both third-party and first party dependencies.Known Limitations
Notes
all_crate_deps, but that relies on thealiaseshaving been generated during the rendering, and therefore prevents the feature from being entirely disabled. One of my goals was that the feature can be fully disabled, such that the checksums do not change.