# incremental: handle \`@embedFile\` · gitcafe/zig

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

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

Visibility: public

Requested revision: f47b8de2ad706616b648c52f5036102cb804e65d

Requested commit: f47b8de2ad706616b648c52f5036102cb804e65d

Commit: f47b8de2ad706616b648c52f5036102cb804e65d

Tree: 20246773622e31440107d87455d5a01ac1cd8dcf

Author: mlugg

Committer: mlugg

## Message

```
incremental: handle `@embedFile`

Uses of `@embedFile` register dependencies on the corresponding
`Zcu.EmbedFile`. At the start of every update, we iterate all embedded
files and update them if necessary, and invalidate the dependencies if
they changed.

In order to properly integrate with the lazy analysis model, failed
embed files are now reported by the `AnalUnit` which actually used
`@embedFile`; the filesystem error is stored in the `Zcu.EmbedFile`.

An incremental test is added covering incremental updates to embedded
files, and I have verified locally that dependency invalidation is
working correctly.

```

## Parents

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

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