Skip to content

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

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
marler8997 opened this issue May 24, 2025 · 0 comments · May be fixed by #23984
Open

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

marler8997 opened this issue May 24, 2025 · 0 comments · May be fixed by #23984
Labels
bug Observed behavior contradicts documented or intended behavior os-macos os-windows zig build system std.Build, the build runner, `zig build` subcommand, package management
Milestone

Comments

@marler8997
Copy link
Contributor

marler8997 commented May 24, 2025

Zig Version

0.14.0 and 0.15.0-dev.621+a63f7875f

Steps to Reproduce and Observed Behavior

Setup:

Within a directory that's backed with a case insensitive filesystem (i.e. macOS/Windows).

zig init
mkdir subdir
cd subdir
# running zig build --help at this point should work
touch Build.zig
zig build --help

Expected Behavior

The final zig build --help command should print the help output, but, in this case it fails to compile the build because it thinks Build.zig is actually build.zig on case insensitive filesystems.

@marler8997 marler8997 added the bug Observed behavior contradicts documented or intended behavior label May 24, 2025
marler8997 added a commit to marler8997/zig that referenced this issue 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 ziglang#23980
@marler8997 marler8997 linked a pull request May 25, 2025 that will close this issue
marler8997 added a commit to marler8997/zig that referenced this issue 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 ziglang#23980
@alexrp alexrp added the zig build system std.Build, the build runner, `zig build` subcommand, package management label May 27, 2025
@alexrp alexrp added this to the 0.15.0 milestone May 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Observed behavior contradicts documented or intended behavior os-macos os-windows zig build system std.Build, the build runner, `zig build` subcommand, package management
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants