Skip to content

accept a seed option to the build runner and shuffle the dependency order using it #14940

@andrewrk

Description

@andrewrk

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    breakingImplementing this issue could cause existing code to no longer compile or have different behavior.contributor friendlyThis issue is limited in scope and/or knowledge of Zig internals.enhancementSolving this issue will likely involve adding new logic or components to the codebase.zig build systemstd.Build, the build runner, `zig build` subcommand, package management

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions