Skip to content

Compiling returns an error in build.zig.zon "expected enum literal" #23104

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
AFreeChameleon opened this issue Mar 5, 2025 · 2 comments
Closed

Comments

@AFreeChameleon
Copy link

Zig Version

0.14.0

Steps to Reproduce and Observed Behavior

I'm not sure what happened, I booted up my computer and now I can't compile my code.
After running zig build, the only error message I'm getting is:

/path/to/folder/build.zig.zon:9:13: error: expected enum literal
    .name = "thing",

In the build.zig.zon file at the top line my LSP says:

.{ file cannot be a tuple

My build.zig.zon file is the default file created, I haven't made any changes to it.

Creating a new project and running zig build works so I'm curious if I've done something that overwrites some global default behaviour

Any clarity on what I can look for would be super helpful.
Thanks :)

Expected Behavior

I expected it to either compile or show me what I can do to make it compile.

@AFreeChameleon AFreeChameleon added the bug Observed behavior contradicts documented or intended behavior label Mar 5, 2025
@fautore
Copy link

fautore commented Mar 5, 2025

Package names have a new format as of 0.14.0, see: #20178

@linusg linusg closed this as not planned Won't fix, can't repro, duplicate, stale Mar 5, 2025
@linusg linusg removed the bug Observed behavior contradicts documented or intended behavior label Mar 5, 2025
@jfkonecn
Copy link

jfkonecn commented Mar 5, 2025

I fixed it by doing this

rm build.zig.zon
zig init

I then used git diff to see what changes I needed to make.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants