# stage2: improve Decl dependency management · gitcafe/zig

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

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

Visibility: public

Requested revision: b4692c9a7808caabdf474c2acc6d6d3754e5e2e4

Requested commit: b4692c9a7808caabdf474c2acc6d6d3754e5e2e4

Commit: b4692c9a7808caabdf474c2acc6d6d3754e5e2e4

Tree: a824991e12daf2e96be411926b82a123ccb2672b

Author: Andrew Kelley

Committer: Andrew Kelley

## Message

```
stage2: improve Decl dependency management

 * Do not report export collision errors until the very end, because it
   is possible, during an update, for a new export to be added before an
   old one is semantically analyzed to be deleted. In such a case there
   should be no compile error.
   - Likewise we defer emitting exports until the end when we know for
     sure what will happen.
 * Sema: Fix not adding a Decl dependency on imported files.
 * Sema: Properly add Decl dependencies for all identifier and namespace
   lookups.
 * After semantic analysis for a Decl, if it is still marked as
   `in_progress`, change it to `dependency_failure` because if the Decl
   itself failed, it would have already been changed during the call to
   add the compile error.

```

## Parents

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

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