-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
std.Build.findProgram()
is not capable of finding non-.exe
programs on Windows
#20314
Comments
While here, I also improved it to not misreport OOM from std.fs.realpathAlloc() as a generic failure to find the program, but instead panic like the rest of the build system does for OOM. Closes ziglang#20314.
Looking at this again, we already have logic for determining whether a file has an executable suffix in We might want to extract that logic and re-use it in the build system instead of doing something subtly different, |
Unifying this sounds reasonable. Do we have a good place to put that logic? |
This was my initial thought as well. Note, though, that most of the complexity of that code in
EDIT: To clarify, I think it might make sense to just reimplement a simpler version of the search path logic rather than try to make the |
Looking at the |
Or, actually, I guess we would still want to respect the values in |
Yeah, it should be possible to simplify filtering (or |
While here, I also improved it to not misreport OOM from std.fs.realpathAlloc() as a generic failure to find the program, but instead panic like the rest of the build system does for OOM. Closes ziglang#20314.
…extensions. This roughly mirrors the logic in std.process.Child. While here, I also improved it to not misreport OOM from std.fs.realpathAlloc() as a generic failure to find the program, but instead panic like the rest of the build system does for OOM. Closes ziglang#20314.
…extensions. This roughly mirrors the logic in std.process.Child. While here, I also improved it to not misreport OOM from std.fs.realpathAlloc() as a generic failure to find the program, but instead panic like the rest of the build system does for OOM. Closes ziglang#20314.
…extensions. I renamed std.process.Child.CreateProcessSupportedExtension to WindowsExtension and made it public to avoid duplicating the list of extensions. While here, I also improved it to not misreport OOM from std.fs.realpathAlloc() as a generic failure to find the program, but instead panic like the rest of the build system does for OOM. Closes ziglang#20314.
…extensions. I renamed std.process.Child.CreateProcessSupportedExtension to WindowsExtension and made it public to avoid duplicating the list of extensions. While here, I also improved it to not misreport OOM from std.fs.realpathAlloc() as a generic failure to find the program, but instead panic like the rest of the build system does for OOM. Closes ziglang#20314.
…extensions. I renamed std.process.Child.CreateProcessSupportedExtension to WindowsExtension and made it public to avoid duplicating the list of extensions. While here, I also improved it to not misreport OOM from std.fs.realpathAlloc() as a generic failure to find the program, but instead panic like the rest of the build system does for OOM. Closes ziglang#20314.
…extensions. I renamed std.process.Child.CreateProcessSupportedExtension to WindowsExtension and made it public to avoid duplicating the list of extensions. While here, I also improved it to not misreport OOM from std.fs.realpathAlloc() as a generic failure to find the program, but instead panic like the rest of the build system does for OOM. Closes ziglang#20314.
…extensions. I renamed std.process.Child.CreateProcessSupportedExtension to WindowsExtension and made it public to avoid duplicating the list of extensions. While here, I also improved it to not misreport OOM from std.fs.realpathAlloc() as a generic failure to find the program, but instead panic like the rest of the build system does for OOM. Closes ziglang#20314.
Since the function unconditionally appends
b.graph.host.result.exeFileExt()
to each element innames
when testing paths, it appears to just be impossible to locate e.g.npm.cmd
on Windows.My first thought here is that it should just be changed to try both with and without
exeFileExt()
. That way, I can pass.{"npm", "npm.cmd"}
and it should just work on Windows/Unix. I can open a PR for that if it's considered an acceptable solution.The text was updated successfully, but these errors were encountered: