aboutsummaryrefslogtreecommitdiff
path: root/src/type.zig
diff options
context:
space:
mode:
authormlugg <mlugg@mlugg.co.uk>2023-09-13 10:46:25 +0100
committerAndrew Kelley <andrew@ziglang.org>2023-09-15 14:04:23 -0700
commit94529ffb621fa633437ac48d8f90003e26e8ce5b (patch)
tree9454170d72caac01866caef3c25a0affa1dcb6de /src/type.zig
parent1a0e6bcdb140c844384d62b78a7f4247753f9ffd (diff)
downloadzig-94529ffb621fa633437ac48d8f90003e26e8ce5b.tar.gz
zig-94529ffb621fa633437ac48d8f90003e26e8ce5b.zip
package manager: write deps in a flat format, eliminating the FQN concept
The new `@depedencies` module contains generated code like the following (where strings like "abc123" represent hashes): ```zig pub const root_deps = [_]struct { []const u8, []const u8 }{ .{ "foo", "abc123" }, }; pub const packages = struct { pub const abc123 = struct { pub const build_root = "/home/mlugg/.cache/zig/blah/abc123"; pub const build_zig = @import("abc123"); pub const deps = [_]struct { []const u8, []const u8 }{ .{ "bar", "abc123" }, .{ "name", "ghi789" }, }; }; }; ``` Each package contains a build root string, the build.zig import, and a mapping from dependency names to package hashes. There is also such a mapping for the root package dependencies. In theory, we could now remove the `dep_prefix` field from `std.Build`, since its main purpose is now handled differently. I believe this is a desirable goal, as it doesn't really make sense to assign a single FQN to any package (because it may appear in many different places in the package hierarchy). This commit does not remove that field, as it's used non-trivially in a few places in the build runner and compiler tests: this will be a future enhancement. Resolves: #16354 Resolves: #17135
Diffstat (limited to 'src/type.zig')
0 files changed, 0 insertions, 0 deletions