Skip to content

build fails with zig 0.15.1 (no field named 'root_source_file') #32

Description

@mitchblank

Zig 0.14.0 deprecated the "Implicit Root Module" in build.zig: https://ziglang.org/download/0.14.0/release-notes.html#Creating-Artifacts-from-Existing-Modules

Zig 0.15.x removed this deprecated feature: https://ziglang.org/download/0.15.1/release-notes.html#Removed-Deprecated-Implicit-Root-Module

This causes this build failure: https://github.com/Homebrew/homebrew-core/pull/234498/files#diff-8a7d6acb7ca9297c0b62e35d6638933abc83cdb0ba0e140cf4135c8ff4cb5adcL22

build.zig:9:10: error: no field named 'root_source_file' in struct 'Build.TestOptions'
        .root_source_file = b.path("clap.zig"),
         ^~~~~~~~~~~~~~~~

(This is just one example)

It looks to me like both setupExecutable() and setupTest() need to be updated since they both pass things like root_source_file, target, etc in the top-level options struct

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions