accept a seed option to the build runner and shuffle the dependency order using it #14940
Labels
breaking
Implementing this issue could cause existing code to no longer compile or have different behavior.
contributor friendly
This issue is limited in scope and/or knowledge of Zig internals.
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
Extracted from #14647.
Add a --seed option to the build runner and make the
zig build
subcommand always supply a random seed argument.Use this seed to shuffle the dependency order of steps when -j1 is selected, and ideally also shuffle order of steps for dependency peers when concurrency is being used. Be sure not to disrupt the heuristics for starting leaf dependencies first when the number of threads in the thread pool is greater than one.
This will help protect build scripts from accumulating concurrency bugs.
The text was updated successfully, but these errors were encountered: