bazelbuild / bazelbuild/rules_pkg

pkg_tar: remap_paths should favor the longest match

Open
#258 3 comments 0 reactions 0 assignees View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.