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

Apply tar remap_paths to runfiles full paths #812

Merged
merged 2 commits into from
Feb 1, 2024

Conversation

dieortin
Copy link
Contributor

This modifies the way remap_paths works on pkg_tar when using include_runfiles so that remapping is performed on the full path of each runfile, instead of just in the base folder (foo.runfiles)

This should be backwards compatible with the current behavior, and only affect those that specify runfiles paths in their mappings. For example, for the following path foo.runfiles/some/folder/file.txt:

remap_paths: {
    "/foo": "/bar", # Still yields the same result as before (bar.runfiles/some/folder/file.txt)
    "/foo.runfiles/some/folder": "/bar", # Now works and yields bar/file.txt
}

I have implemented some tests that demonstrate this behaviors.

Resolves #790

@cgrindel
Copy link
Collaborator

@aiuto This looks reasonable to me. I noticed that you started a dialogue with the author. Perhaps you should review it.

@cgrindel cgrindel merged commit 3a2508f into bazelbuild:main Feb 1, 2024
2 checks passed
@dieortin dieortin deleted the tar-runfile-mapping branch February 6, 2024 23:45
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.

remap_paths from pkg_tar should apply to runfiles
2 participants