incremental compilation: reached unreachable code and accumulation of errors if @import
ing non-existent files
#22696
Labels
bug
Observed behavior contradicts documented or intended behavior
incremental compilation
Problem occurs only when reusing compiler state.
Zig Version
0.14.0-dev.3020+c104e8644 DEBUG build
Steps to Reproduce and Observed Behavior
Start out with a
zig init
projectAdd a "check" step for the
exe
build with
zig build -fincremental --watch check
Add an
@import
to a non existent file in src/main.zig, egconst argh = @import("blah.zig");
Save main.zig (compiler will report
src/main.zig:x:y: error: unable to load 'src/blah.zig': FileNotFound
)Modify the
@import
string, eg delete the 'g' ->const argh = @import("blah.zi");
Save main.zig
A (Zig) Release build will just continue to report (even if you comment out the import statement)
Modifying the import statement causes accumulation of errors to nonexistent files
Expected Behavior
The text was updated successfully, but these errors were encountered: