Skip to content

Conversation

fmeum
Copy link
Member

@fmeum fmeum commented Jan 20, 2023

PR Checklist

Please check if your PR fulfills the following requirements:

  • 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?

The Python runfiles library fails to find runfiles specified with apparent repository names when Bzlmod is enabled.

What is the new behavior?

When a repo mapping manifest is available in runfiles, it is parsed and used to map apparent repository names to canonical ones in paths passed to Rlocation. The current repository, which is required to know which part of the mapping to apply, is either determined using CurrentRepository or can be passed in explicitly.

With this commit, runfiles lookups should succeed with Bzlmod without code changes.

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

When a repo mapping manifest is available in runfiles, it is parsed and
used to map apparent repository names to canonical ones in paths passed
to Rlocation. The current repository, which is required to know which
part of the mapping to apply, is either determined using
`CurrentRepository` or can be passed in explicitly.

With this commit, runfiles lookups should succeed with Bzlmod without
code changes.
@fmeum fmeum marked this pull request as ready for review January 20, 2023 14:09
@fmeum fmeum requested a review from rickeylev as a code owner January 20, 2023 14:09
@fmeum
Copy link
Member Author

fmeum commented Jan 20, 2023

CC @alexeagle

Copy link
Contributor

@alexeagle alexeagle left a comment

Choose a reason for hiding this comment

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

😎

@alexeagle alexeagle merged commit 9662139 into bazel-contrib:main Jan 20, 2023
@fmeum fmeum deleted the mapped-rlocation branch January 20, 2023 14:25
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.

2 participants