Skip to content

[9.4.0] Index generated repository names by extension prefix (#32802) - #32904

Merged
meteorcloudy merged 1 commit into
bazelbuild:release-9.4.0from
bazel-io:cp32802-9.4.0-190400
Nov 25, 2026
Merged

meteorcloudy merged 1 commit into
bazelbuild:release-9.4.0from
bazel-io:cp32802-9.4.0-190400

Conversation

@bazel-io

Copy link
Copy Markdown
Member

RepoDefinitionFunction and RepositoryMappingFunction scan every module extension to find which one generated a repository. Both now look up the prefixes ending at each + in the canonical repository name using the inverse extension-name map. Checking earlier delimiters preserves the generating-extension diagnostic for a nonexistent repository whose name contains an extra +.

In a lookup benchmark with 327 extensions and 42,379 repository names, the median time per sweep fell from 135.4 ms to 5.7 ms.

Closes #32802

COPYBARA_INTEGRATE_REVIEW=#32802 from dzbarsky:dzbarsky/index-extension-repository-names ac76440
PiperOrigin-RevId: 1028310103
Change-Id: I0219cf62f3267edb42a1d7e3cc2a19a4a3d31d65

Commit 2a2fea0

`RepoDefinitionFunction` and `RepositoryMappingFunction` scan every module extension to find which one generated a repository. Both now look up the prefixes ending at each `+` in the canonical repository name using the inverse extension-name map. Checking earlier delimiters preserves the generating-extension diagnostic for a nonexistent repository whose name contains an extra `+`.

In a lookup benchmark with 327 extensions and 42,379 repository names, the median time per sweep fell from 135.4 ms to 5.7 ms.

Closes bazelbuild#32802

COPYBARA_INTEGRATE_REVIEW=bazelbuild#32802 from dzbarsky:dzbarsky/index-extension-repository-names ac76440
PiperOrigin-RevId: 1028310103
Change-Id: I0219cf62f3267edb42a1d7e3cc2a19a4a3d31d65
@bazel-io
bazel-io requested a review from a team as a code owner November 23, 2026 19:04
@bazel-io bazel-io added team-ExternalDeps External dependency handling, remote repositiories, WORKSPACE file. team-Core Skyframe, bazel query, BEP, options parsing, bazelrc area-Bzlmod Bzlmod-specific PRs, issues, and feature requests awaiting-review PR is awaiting review from an assigned reviewer labels Nov 23, 2026
@meteorcloudy
meteorcloudy added this pull request to the merge queue Nov 25, 2026
Merged via the queue into bazelbuild:release-9.4.0 with commit 22a4ec9 Nov 25, 2026
43 checks passed
@github-actions github-actions Bot removed the awaiting-review PR is awaiting review from an assigned reviewer label Nov 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-Bzlmod Bzlmod-specific PRs, issues, and feature requests team-Core Skyframe, bazel query, BEP, options parsing, bazelrc team-ExternalDeps External dependency handling, remote repositiories, WORKSPACE file.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants