Skip to content

zig ast-check produces an error on well-formed build.zig.zon files #22078

Closed
@torque

Description

@torque

Zig Version

0.14.0-dev.2293+6d781e095

Steps to Reproduce and Observed Behavior

zig ast-check build.zig.zon

on a well-formed build.zig.zon (such as the one in this repository), instead of succeeding, produces the following error message

build.zig.zon:1:1: error: file cannot be a tuple
.{
^

This also happens with zig fmt --ast-check and is likely to be hit if you try to run that on all files in a project with e.g. zig fmt --ast-check --check .

Expected Behavior

zig should not disagree with itself about whether the structure of build.zig.zon is correct.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugObserved behavior contradicts documented or intended behaviorregressionIt worked in a previous version of Zig, but stopped working.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions