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

Use case-insensitive comparison for Windows paths in runfiles.bash #19602

Closed
wants to merge 1 commit into from

Conversation

fmeum
Copy link
Collaborator

@fmeum fmeum commented Sep 22, 2023

When matching paths or path segments in the Bash runfiles library, use a case-insensitive comparison when running in MSYS2 as Bazel emits paths that can be capitalized differently. In particular, this fixes failures when the output base path contains uppercase letters.

@github-actions github-actions bot added the awaiting-review PR is awaiting review from an assigned reviewer label Sep 22, 2023
@iancha1992 iancha1992 added team-ExternalDeps External dependency handling, remote repositiories, WORKSPACE file. area-Windows Windows-specific issues and feature requests labels Sep 22, 2023
@Wyverald Wyverald added awaiting-PR-merge PR has been approved by a reviewer and is ready to be merge internally and removed awaiting-review PR is awaiting review from an assigned reviewer labels Sep 22, 2023
@Wyverald
Copy link
Member

Hmm, actually, the test failure may be relevant. Could you take a look?

@fmeum fmeum force-pushed the normalize-windows-path branch 3 times, most recently from 9cf5a18 to b172c8d Compare September 23, 2023 06:52
@fmeum fmeum changed the title Fix Bash runfiles lookup on Windows with capital letter in execroot path Use case-insensitive comparison for Windows paths in runfiles.bash Sep 23, 2023
@fmeum fmeum force-pushed the normalize-windows-path branch 4 times, most recently from b172c8d to 84398f3 Compare September 24, 2023 14:28
When matching the path of `rlocation`'s caller in the Bash runfiles
library, use a case-insensitive comparison when running in MSYS2 as
Bazel emits paths that can be capitalized differently. In particular,
this fixes failures when the output base path contains uppercase
letters.
@fmeum
Copy link
Collaborator Author

fmeum commented Sep 24, 2023

The test failure was indeed relevant, I switched to a different approach.

I failed to reproduce this in a test as I would need to modify the --output_root of the outer Bazel instance - changing the inner one only still results in lowercase paths in MSYS. I tested this manually with both manifest and directory.

@fmeum
Copy link
Collaborator Author

fmeum commented Sep 24, 2023

@bazel-io flag

@bazel-io bazel-io added the potential release blocker Flagged by community members using "@bazel-io flag". Should be added to a release blocker milestone label Sep 24, 2023
@Pavank1992 Pavank1992 added awaiting-review PR is awaiting review from an assigned reviewer and removed awaiting-PR-merge PR has been approved by a reviewer and is ready to be merge internally labels Sep 25, 2023
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.

Thanks!

@meteorcloudy meteorcloudy added awaiting-PR-merge PR has been approved by a reviewer and is ready to be merge internally and removed potential release blocker Flagged by community members using "@bazel-io flag". Should be added to a release blocker milestone awaiting-review PR is awaiting review from an assigned reviewer labels Sep 25, 2023
@meteorcloudy
Copy link
Member

@bazel-io fork 6.4.0

@github-actions github-actions bot removed the awaiting-PR-merge PR has been approved by a reviewer and is ready to be merge internally label Sep 25, 2023
bazel-io pushed a commit to bazel-io/bazel that referenced this pull request Sep 25, 2023
When matching paths or path segments in the Bash runfiles library, use a case-insensitive comparison when running in MSYS2 as Bazel emits paths that can be capitalized differently. In particular, this fixes failures when the output base path contains uppercase letters.

Closes bazelbuild#19602.

PiperOrigin-RevId: 568323218
Change-Id: Ic4655b82b1acbaa9ed50118913d713fba3d7f5de
Wyverald pushed a commit that referenced this pull request Sep 25, 2023
…s.bash` (#19626)

When matching paths or path segments in the Bash runfiles library, use a
case-insensitive comparison when running in MSYS2 as Bazel emits paths
that can be capitalized differently. In particular, this fixes failures
when the output base path contains uppercase letters.

Closes #19602.

Commit
ea4ab7d

PiperOrigin-RevId: 568323218
Change-Id: Ic4655b82b1acbaa9ed50118913d713fba3d7f5de

Co-authored-by: Fabian Meumertzheim <fabian@meumertzhe.im>
@fmeum fmeum deleted the normalize-windows-path branch September 26, 2023 09:24
@iancha1992
Copy link
Member

The changes in this PR have been included in Bazel 6.4.0 RC2. Please test out the release candidate and report any issues as soon as possible. If you're using Bazelisk, you can point to the latest RC by setting USE_BAZEL_VERSION=last_rc.
Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-Windows Windows-specific issues and feature requests team-ExternalDeps External dependency handling, remote repositiories, WORKSPACE file.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants