bazelbuild / bazelbuild/rules_pkg
pkg_tar: remap_paths should favor the longest match
Open
bug
P3
- Dominant language
- Starlark
- Stars
- 253
- Forks
- 221
- Avg merge
- 10h 33m
- Merged PRs (30d)
- 1
Description
Currently, remap_paths will remap each file according to the first match in the map iteration order:
https://github.com/bazelbuild/rules_pkg/blob/e8bff981f600a4faa01d5c8f5dd57d05891c8e2d/pkg/pkg.bzl#L25-L30.
This makes it impossible to have predictable results when you have two keys in remap_paths where one is a prefix of the other. I think we should favor the longest (most specific) match in that case.
Contributor guide
Assessment
This issue has not been assessed yet.