diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2022-11-19 13:48:32 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2022-11-22 20:57:56 -0700 |
| commit | 21bd13626d66c36c327bb317bd09cad979d92327 (patch) | |
| tree | 0339aef23b4655448e6a71cdfca1840f66c69092 /src/codegen/spirv/Module.zig | |
| parent | 32ce2f91a92c23d46c6836a6dd68ae0f08bb04c5 (diff) | |
| download | zig-21bd13626d66c36c327bb317bd09cad979d92327.tar.gz zig-21bd13626d66c36c327bb317bd09cad979d92327.zip | |
Cache: introduce prefixes to manifests
Before, cache manifest files would have absolute file paths. This is
problematic for two reasons:
* Absolute file paths are not portable. Some operating systems such as
WASI have trouble with them. The files themselves are less portable;
they cannot be migrated from one user's home directory to another's.
And finally they can break due to file paths exceeding maximum path
component size.
* They would prevent some advanced use cases of Zig, where the lib dir
has a different path in a different invocation but is ultimately the
same Zig version and lib directory as before.
This commit adds a new column that specifies the prefix directory for
each file. 0 is an escape hatch and has the previous behavior. The other
two prefixes introduced are zig lib directory, and the cache directory.
This means files in zig-cache manifests can reference files local to
these directories.
In practice, this means it is possible to use a different file path for
the zig lib directory in a subsequent run of zig and have it still take
advantage of the global cache, provided that the files inside remain
unchanged.
closes #13050
Diffstat (limited to 'src/codegen/spirv/Module.zig')
0 files changed, 0 insertions, 0 deletions
