# incremental: fix errors not being deleted upon re-analysis · gitcafe/zig

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

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

Visibility: public

Requested revision: f0d5e0df4d95c06287e0fe3fe48b69daf5306c8f

Requested commit: f0d5e0df4d95c06287e0fe3fe48b69daf5306c8f

Commit: f0d5e0df4d95c06287e0fe3fe48b69daf5306c8f

Tree: b4f177522ebba9e27ce9745255f321d194de6e82

Author: mlugg

Committer: mlugg

## Message

```
incremental: fix errors not being deleted upon re-analysis

Previously, logic in `Compilation.getAllErrorsAlloc` was corrupting the
`failed_analysis` hashmap. This meant that on updates after the initial
update, attempts to remove entries from this map (because the `AnalUnit`
in question is being re-analyzed) silently failed. This resulted in
compile errors from earlier updates wrongly getting "stuck", i.e. never
being removed.

This commit also adds a few log calls which helped me to find this bug.

```

## Parents

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

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