-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Open
Labels
enhancementSolving this issue will likely involve adding new logic or components to the codebase.Solving this issue will likely involve adding new logic or components to the codebase.zig build systemstd.Build, the build runner, `zig build` subcommand, package managementstd.Build, the build runner, `zig build` subcommand, package management
Milestone
Description
Extracted from #14265.
zig build could notice from .git/config, if it exists, that a particular remote's URL matches the URL used from the build.zig.lulz file.
For example,
.git/config
[remote "origin"]
url = [email protected]:ziglang/zig.git
fetch = +refs/heads/*:refs/remotes/origin/*
build.zig.lulz
.{
// ...
.url = "git+ssh://[email protected]:ziglang/zig.git#3ab43988c1cc5e22c84faccd1816df6e8094d9a3",
// ...
}Zig should be able to conclude that the requested url is the same url as the git clone that contains the build.zig.lulz file itself, and thereby search for the ref 3ab43988c1cc5e22c84faccd1816df6e8094d9a3 in the local clone rather than the network.
Related:
- ability to specify additional build dependency mirrors that affect any package in the full dependency tree #14292
- ability to fetch dependencies via git+ssh protocol #14295
If the ref could not be found in the local clone, an error should be emitted, rather than trying to do any fetching on the user's behalf. The error message could suggest a command to run however, for example, git fetch origin --tags.
Metadata
Metadata
Assignees
Labels
enhancementSolving this issue will likely involve adding new logic or components to the codebase.Solving this issue will likely involve adding new logic or components to the codebase.zig build systemstd.Build, the build runner, `zig build` subcommand, package managementstd.Build, the build runner, `zig build` subcommand, package management
Type
Projects
Status
Fetching