# Compilation: several branch regression fixes · gitcafe/zig

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

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

Visibility: public

Requested revision: 524dc756b30c19db070362c8094459c7c8e4fd8a

Requested commit: 524dc756b30c19db070362c8094459c7c8e4fd8a

Commit: 524dc756b30c19db070362c8094459c7c8e4fd8a

Tree: f0fc599599b9c8bfcdbfa0e6eed737ea21311fc2

Author: Andrew Kelley

Committer: Andrew Kelley

## Message

```
Compilation: several branch regression fixes

* move wasi_emulated_libs into Compilation
  - It needs to be accessed from Compilation, which needs to potentially
    build those artifacts.
* Compilation: improve error reporting for two cases
  - the setMiscFailure mechanism is handy - let's use it!
* fix one instance of incorrectly checking for emit_bin via
  `comp.bin_file != null`. There are more instances of this that need to
  be fixed in a future commit.
* fix renameTmpIntoCache not handling the case where it needs to make
  the "o" directory in the zig-cache directory.
  - while I'm at it, simplify the logic for handling the fact that
    Windows returns error.AccessDenied rather than
    error.PathAlreadyExists for failure to rename a directory over
    another one.
* fix missing cache hash additions
  - there are still more to add in a future commit -
    addNonIncrementalStuffToCacheManifest is called when bin_file is
    always null, and then it incorrectly checks if bin_file is non-null
    and only then adds a bunch of stuff to the cache hash. It needs to
    instead add to the cache hash based on lf_open_opts.

```

## Parents

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

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