Skip to content

Conversation

@fmeum
Copy link
Collaborator

@fmeum fmeum commented Jun 11, 2025

Along the way, fix two more bugs:

  • gracefully handle the case of a missing repo mapping manifest
  • consistently escape everything that ends up in a grep pattern as a literal

Work towards bazelbuild/bazel#26262

This comment was marked as outdated.

@fmeum fmeum force-pushed the compact-repo-mapping branch from fefc964 to c9ffb88 Compare June 11, 2025 18:54
@fmeum fmeum requested a review from Copilot June 11, 2025 18:55
@fmeum fmeum marked this pull request as ready for review June 11, 2025 18:55
@fmeum fmeum requested a review from meteorcloudy June 11, 2025 18:55
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds support for the new --incompatible_compact_repo_mapping_manifest flag by introducing additional tests to verify both directory‐ and manifest-based repo mapping behaviors and by updating the runfiles lookup logic to consistently escape grep pattern arguments. Key changes include:

  • New bash test functions to validate repository mapping resolution from both extension and main repos.
  • The introduction of a helper function (__runfiles_escape_grep) to escape special regex characters.
  • Modifications in runfiles.bash to use the new escaping function in several lookup functions.

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
tests/runfiles/runfiles_test.bash Added tests for directory- and manifest-based repository mapping
shell/runfiles/runfiles.bash Introduced a helper for escaping grep patterns and updated rlocation logic

Copy link
Member

@meteorcloudy meteorcloudy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, thanks!

@meteorcloudy meteorcloudy merged commit c1d71d8 into main Jun 12, 2025
2 checks passed
@fmeum fmeum deleted the compact-repo-mapping branch June 12, 2025 11:28
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