Repository navigation
Hash isolated repository inputs at their ordinary consumers - #592
Merged
tinder-maxwellelliott merged 2 commits intoOct 31, 2026
Merged
Conversation
Bzlmod conservatively connects extensions' generated repositories to their owning module. Changes to one isolated usage therefore reach other users of its generator, even when their targets consume none of its outputs. Add an opt-in for a root-isolated usage whose outside consumers are represented in the ordinary query. Acquire its target and BUILD closure and retain the whole usage at each observed reader. Fold member source digests and the physical paths named by repository-rule label attributes into its synthetic root. Keep owner dependencies for incomplete bindings and known outside repository readers. Keep other usages unchanged. Exercise shared BUILD loads, direct spoke consumers, repository-time file reads and a distinct registered toolchain through the CLI. The raw target API cannot retain the extra inputs and directs callers to the integrated generation entry point.
The isolated-root option in 1d6b045 could return successful hashes with ordinary owner dependencies retained, or remain inactive on unsupported Bazel and cquery. Callers could not distinguish that fallback from an applied scope. Reject those requests before repository hashing and name the requested root and known cause. Validate the emitted module inventory and include coexisting hidden versions by their canonical repository names. Reject serve before cache setup because its source mode cannot apply the option. Unflagged generation retains its existing behavior. The adopter must still audit toolchains and repository reads that ordinary inputs do not represent.
tamird
force-pushed
the
isolated-dependency-root
branch
from
October 31, 2026 14:34
968b00c to
fd7c20f
Compare
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.
Changing one crate in an isolated Cargo workspace can mark unrelated Rust targets as impacted. bazel-diff makes the extension's owning module depend on every generated repository, so users of the Rust rules can look like consumers of the changed crate.
--isolatedDependencyRoot=@hubnames a workspace whose outside consumers reach it through ordinary target inputs or BUILD loads. bazel-diff queries the hub's dependency and build-file closure, then attaches the whole generated workspace to each observed consumer. The direct-reader regression keeps the target whose output changes and drops an independent target that only uses a tool from the same module.An explicit request requires one imported hub and validates the emitted module and repository inventory, including coexisting module versions. Unsupported query modes, ambiguous ownership, incomplete discovery, and known outside repository-file readers fail with the requested root and cause. Both
serveandgenerate-hashes --partialGraphreject isolation before they can reuse a cached graph. Runs without the option retain ordinary behavior.This remains an adopter assertion. A repository can compute a family path from an untyped string, watch or copy it, and supply an implicitly selected toolchain without exposing the read to bazel-diff. Run without this option for that workspace. 1
Prepared with Codex.