Zig build should error when overwriting output files #20235
Labels
enhancement
Solving this issue will likely involve adding new logic or components to the codebase.
zig build system
std.Build, the build runner, `zig build` subcommand, package management
Milestone
Can you spot the mistake? Indeed, I forgot to change the name of the second executable, which means it's going to output two different binaries at the same location in
zig-out/bin/
, silently causing only one binary to be outputted.I propose to make the Zig build script error when this happens because I can't see a use case for ever wanting to overwrite a binary that you already installed. If you do so, you're more likely doing something wrong, no?
It should be possible to check for a file already existing of the same name before it outputs the file. This applies to anywhere Zig build can output files.
The text was updated successfully, but these errors were encountered: