Skip to content
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

feat: support bzlmod runfiles lookups #953

Merged
merged 3 commits into from
Oct 1, 2024

Conversation

plobsing
Copy link
Contributor

@plobsing plobsing commented Oct 1, 2024

Under bzlmod, repos have aliases in addition to their canonical names;
in order for lookups using these alias names to function properly,
a file name _repo_mapping is located in the root of the runfiles tree
and consulted to perform repo-name translation.

See: https://github.com/bazelbuild/proposals/blob/main/designs/2022-07-21-locating-runfiles-with-bzlmod.md

Under bzlmod, repos have aliases in addition to their canonical names;
in order for lookups using these canonical names to function properly,
a file name `_repo_mapping` is located in the root of the runfiles tree
and consulted to perform repo-name translation.

See: https://github.com/bazelbuild/proposals/blob/main/designs/2022-07-21-locating-runfiles-with-bzlmod.md
@0xflick
Copy link

0xflick commented Oct 1, 2024

thank you!

Copy link
Collaborator

@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.

Thanks!

@alexeagle alexeagle merged commit 0db9fbe into bazel-contrib:main Oct 1, 2024
22 checks passed
@plobsing plobsing deleted the mtree-repo-mappings branch October 14, 2024 06:53
@jmthvt
Copy link

jmthvt commented Oct 28, 2024

This breaks on Bazel 6.5.0

Traceback (most recent call last):
	File "/home/jmthvt/.cache/bazel/_bazel_jmthvt/2299fc45cf64d298be53c0b783603165/external/aspect_bazel_lib/lib/private/tar.bzl", line 304, column 38, in _tar_impl
		src[DefaultInfo].files_to_run.repo_mapping_manifest
Error: 'FilesToRunProvider' value has no field or method 'repo_mapping_manifest'

Which is not present in 6.5.0: https://bazel.build/versions/6.5.0/rules/lib/FilesToRunProvider

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.

4 participants