Skip to content

avoid being tricked that Build.zig is build.zig #23984

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

marler8997
Copy link
Contributor

@marler8997 marler8997 commented May 25, 2025

Updates findBuildRoot to skip build.zig entries if the case doesn't match. It does this by iterating over the parent directory and verifying that an entry with the same case exists.

fixes #23980

image

@mlugg
Copy link
Member

mlugg commented May 25, 2025

This is related to #9786. It's a problem I was discussing with @jacobly0 and @alexrp recently; we were actually considering trying out a case-equivalence-by-directory-scanning approach there, too.

@marler8997
Copy link
Contributor Author

Yeah I made an attempt to fix that issue but gave up for now. I shared some thoughts in a comment here: #23163 (comment)

Updates `findBuildRoot` to skip `build.zig` entries if the case doesn't
match. It does this by iterating over the parent directory and verifying
that an entry with the same case exists.

fixes ziglang#23980
@marler8997 marler8997 force-pushed the buildRootCaseInsensitive branch from 43a4324 to 0220f5e Compare May 25, 2025 02:06
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.

zig interprets Build.zig as build.zig on case insensitive filesystems (i.e.. macOS/Windows)
2 participants