Skip to content

introduce build_runner.phase enum {configure, make} and assert the phase in many functions #14941

@andrewrk

Description

@andrewrk

Extracted from #14647.

I've seen quite a bit of build.zig code in the wild that does inappropriate things, such as call make() during build(), or create steps during make(). This issue is to set a global enum state to which phase is currently happening, and enforce that the API is only used in the intended phase.

Metadata

Metadata

Assignees

No one assigned

    Labels

    breakingImplementing this issue could cause existing code to no longer compile or have different behavior.zig build systemstd.Build, the build runner, `zig build` subcommand, package management

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions