Conversation
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.
workspaceArtifacts()drops artifacts by name, using every package and target name fromcargo metadata --no-deps. When a workspace target has the same name as a dependency, the dependency's artifacts are dropped too.In our repository,
app/jobserverdeclares[lib] name = "jobserver", which is also the name of the crates.iojobservercrate thatccdepends on. The saved archive left outlibjobserver-<hash>.rliband.fingerprint/jobserver-<hash>, so every warm run rebuiltjobserver, thencc, then every crate that usesccin a build script (aws-lc-sys,zstd-sys,lz4-sys,libmimalloc-sys, ...) and everything downstream of those: 57 crates instead of the 3 workspace crates.This change reads the registry and git packages from each root's
Cargo.lockand removes their names from the set that is stripped. Workspace artifacts that share such a name are then kept in the archive. They rebuild anyway, so the only cost is archive size.Measured on
tensorlake-largewith the same Rust workspace (cargo fmt, clippy, test), warm runs:v1npm testincludes a new case with a workspace lib namedjobserverand aCargo.lockthat lists the registry crate. It fails onmainand passes here.