Skip to content

Conversation

@Mivr
Copy link

@Mivr Mivr commented Aug 13, 2025

PR Checklist

  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature (please, look at the "Scope of the project" section in the README.md file)
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • Other... Please describe:

What is the current behavior?

@bazel/runfiles does not work with non-bzlmod when a _repo_mapping file exists

Issue Number: #3797

What is the new behavior?

The parsing code handles old and new repo_mapping syntax

Does this PR introduce a breaking change?

  • Yes
  • [ x] No

@aspect-workflows
Copy link

aspect-workflows bot commented Aug 13, 2025

Test

All tests were cache hits

2 tests (100.0%) were fully cached saving 53ms.


// Each line of the repository mapping manifest has the form:
// canonical name of source repo,apparent name of target repo,target repo runfiles directory
// https://cs.opensource.google/bazel/bazel/+/1b073ac0a719a09c9b2d1a52680517ab22dc971e:src/main/java/com/google/devtools/build/lib/analysis/RepoMappingManifestAction.java;l=117
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't this comment+link still relevant?


const [sourceRepo, targetRepoApparentName, targetRepoDirectory] = line.split(",");

(repoMappings[sourceRepo] ??= Object.create(null))[targetRepoApparentName] = targetRepoDirectory;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't the fix just defaulting one of the fields here? See #3797 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants