-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Description
Extracted from #14265.
The motivation for this is faster dependency fetching, avoiding round-trips from the network.
The idea here is that, after fetching all dependencies, recursively, zig would edit the user's build.zig.zon file and automatically add a section that contains all urls & hashes (including mirrors) for the entire dependency tree. It might look something like this:
.{
// ...
.mirrors = .{
.@"sha256=c9b30cffc40999d2c078ff350cbcee642970a224fe123c756d0892f876cf1aae" = .{
"https://example.com/1.tar.gz",
"https://example.com/2.tar.gz",
},
},
}In this case it matches exactly with #14292 which could be nice, or, on the other hand, it might be important to make a distinction between automatically added ones (which should also be removed automatically) or manually added ones (which should always be preserved).
Depending on how #14288 is resolved with regards to conflict resolution, this section would perhaps be combined with more tooling-managed data about each dependency, such as dependency overrides:
.{
// ...
.config = .{
.@"sha256=c9b30cffc40999d2c078ff350cbcee642970a224fe123c756d0892f876cf1aae" = .{
.url = .{
"https://example.com/1.tar.gz",
"https://example.com/2.tar.gz",
},
.overrides = .{
.libz = "sha256=9ba4f49895b174a3f918d489238acbc146bd393575062b2e3be33488b688e36f",
},
},
},
}When combined with #14294, this may additionally need to float the fetch plugins to the top along with mirrors.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status