# fix various issues related to Path handling in the compiler and std · gitcafe/zig

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

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

Visibility: public

Requested revision: 43f73af3595c3174b8e67e9f2792c3774f2192e9

Requested commit: 43f73af3595c3174b8e67e9f2792c3774f2192e9

Commit: 43f73af3595c3174b8e67e9f2792c3774f2192e9

Tree: 5b178f2316304780f9e84abb60a4286a730ec194

Author: Robin Voetter

Committer: Robin Voetter

## Message

```
fix various issues related to Path handling in the compiler and std

A compilation build step for which the binary is not required could not
be compiled previously. There were 2 issues that caused this:

- The compiler communicated only the results of the emitted binary and
  did not properly communicate the result if the binary was not emitted.

  This is fixed by communicating the final hash of the artifact path (the
  hash of the corresponding /o/<hash> directory) and communicating this
  instead of the entire path. This changes the zig build --listen protocol
  to communicate hashes instead of paths, and emit_bin_path is accordingly
  renamed to emit_digest.

- There was an error related to the default llvm object path when
  CacheUse.Whole was selected. I'm not really sure why this didn't manifest
  when the binary is also emitted.

  This was fixed by improving the path handling related to flush() and
  emitLlvmObject().

In general, this commit also improves some of the path handling throughout
the compiler and standard library.

```

## Parents

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

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