Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

runfiles: Apply repo mapping to Rlocation path #998

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 20, 2023

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
Morty Proxy This is a proxified and sanitized view of the page, visit original site.