# stage2: better handling of file-level compile errors across updates · gitcafe/zig

[View on GitCafe](https://git.cafe/gitcafe/zig/commit/cbbc7cc8b1edeeae1715248a5d13304027698367)

Repository: [gitcafe/zig](https://git.cafe/gitcafe/zig)

Visibility: public

Requested revision: cbbc7cc8b1edeeae1715248a5d13304027698367

Requested commit: cbbc7cc8b1edeeae1715248a5d13304027698367

Commit: cbbc7cc8b1edeeae1715248a5d13304027698367

Tree: 08305439f53718e48bd65da4ae8751949dab218b

Author: Andrew Kelley

Committer: Andrew Kelley

## Message

```
stage2: better handling of file-level compile errors across updates

 * `Module.File` now retains the most recent successful ZIR in the event
   that an update causes a ZIR compile error. This way Zig does not
   throw out useful semantic analysis results when an update temporarily
   introduces a ZIR compile error.
 * Semantic analysis of a File now unconditionally creates a Decl object
   for the File. The Decl object is marked as `file_failed` in case of
   File-level compile errors. This allows detecting of the File being
   outdated, and dependency tracking just like any other Decl.

```

## Parents

- [5d9fc11d18bef9142cb32af3d1515b6de9f125ab](https://git.cafe/gitcafe/zig/commit/5d9fc11d18bef9142cb32af3d1515b6de9f125ab?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zig/tree/cbbc7cc8b1edeeae1715248a5d13304027698367?format=markdown)
