-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Confusing error when build.zig file does not contain a "build" function #12659
Copy link
Copy link
Open
Labels
enhancementSolving this issue will likely involve adding new logic or components to the codebase.Solving this issue will likely involve adding new logic or components to the codebase.error messageThis issue points out an error message that is unhelpful and should be improved.This issue points out an error message that is unhelpful and should be improved.frontendTokenization, parsing, AstGen, Sema, and Liveness.Tokenization, parsing, AstGen, Sema, and Liveness.
Milestone
Metadata
Metadata
Assignees
Labels
enhancementSolving this issue will likely involve adding new logic or components to the codebase.Solving this issue will likely involve adding new logic or components to the codebase.error messageThis issue points out an error message that is unhelpful and should be improved.This issue points out an error message that is unhelpful and should be improved.frontendTokenization, parsing, AstGen, Sema, and Liveness.Tokenization, parsing, AstGen, Sema, and Liveness.
Zig Version
0.9.1 (windows, chocolatey)
Steps to Reproduce
zig buildfrom the command lineExpected Behavior
A helpful error is displayed, notifying the user that they should have a function called "build" in their build.zig file, and that such a function could not be found.
Actual Behavior
The following error is displayed:
This error message mentions a ".@build container", which is not helpful for new users, who do not know the internals of the build system.
The message can be improved by guiding the user to check that they have indeed correctly defined the 'build' function.
E.g.: