# stage2: CacheMode.whole: trigger loading zig source files · gitcafe/zig

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

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

Visibility: public

Requested revision: 0ad2a99675d331c686847a7b2a84feddfcce6573

Requested commit: 0ad2a99675d331c686847a7b2a84feddfcce6573

Commit: 0ad2a99675d331c686847a7b2a84feddfcce6573

Tree: ba1b08642950fd481e95bb0cd198ada0176850f5

Author: Andrew Kelley

Committer: Andrew Kelley

## Message

```
stage2: CacheMode.whole: trigger loading zig source files

Previously the code asserted source files were already loaded, but this
is not the case when cached ZIR is loaded. Now it will trigger .zig
source code to be loaded for the purposes of hashing the source for
`CacheMode.whole`.

This additionally refactors stat_size, stat_inode, and stat_mtime fields
into using the `Cache.File.Stat` struct.

```

## Parents

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

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