You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The motivation for doing this is mirrors (#14291). Idea being that if you fetch a tarball, perhaps it does not contain any superfluous files, while the same package fetched via git protocol (#14295) does have some extra files that are not intended to be part of the package. Both URLs should work, and their hashes should be identical. This means some files should be excluded from the package.
Rename temp directory into the global package cache into a directory named after the hash.
The guarantee should be upheld that if the hash matches, the file system should match exactly. This means that, since empty directories are not included in the hash, empty directories should be removed by step 2, along with the inclusion/exclusion rules.
Extracted from #14265.
The motivation for doing this is mirrors (#14291). Idea being that if you fetch a tarball, perhaps it does not contain any superfluous files, while the same package fetched via git protocol (#14295) does have some extra files that are not intended to be part of the package. Both URLs should work, and their hashes should be identical. This means some files should be excluded from the package.
I could see this going one of two ways:
...with exclusions:
.{ // ... .excluded_files = .{ ".gitignore", "/zig-cache", "build-*", }, // ... }...or with inclusions:
.{ // ... .included_files = .{ "src/*.zig", "build.zig.zon", }, // ... }Two open questions:
Either way, here is how fetching a package works:
The guarantee should be upheld that if the hash matches, the file system should match exactly. This means that, since empty directories are not included in the hash, empty directories should be removed by step 2, along with the inclusion/exclusion rules.