-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
zig fetch --save localpath
generates url+hash instead of just path
#18639
Labels
bug
Observed behavior contradicts documented or intended behavior
Comments
castholm
added a commit
to castholm/zig
that referenced
this issue
Nov 6, 2024
The purpose of `zig fetch` is to copy a package to the global cache to avoid needing to access the network. `path` entries in a build.zig.zon are for relative paths inside a package. It does not make sense to `--save` a package fetched by a (CWD-relative) file path. Closes ziglang#18639
castholm
added a commit
to castholm/zig
that referenced
this issue
Nov 10, 2024
The purpose of `zig fetch` is to copy a package to the global cache to avoid needing to access the network. `path` entries in a build.zig.zon are for relative paths inside a package. It does not make sense to `--save` a package fetched by a (CWD-relative) file path. Closes ziglang#18639
castholm
added a commit
to castholm/zig
that referenced
this issue
Nov 14, 2024
The purpose of `zig fetch` is to copy a package to the global cache to avoid needing to access the network. `path` entries in a build.zig.zon are for relative paths inside a package. It does not make sense to `--save` a package fetched by a (CWD-relative) file path. Closes ziglang#18639
castholm
added a commit
to castholm/zig
that referenced
this issue
Nov 17, 2024
The purpose of `zig fetch` is to copy a package to the global cache to avoid needing to access the network. `path` entries in a build.zig.zon are for relative paths inside a package. It does not make sense to `--save` a package fetched by a (CWD-relative) file path. Closes ziglang#18639
andrewrk
pushed a commit
to castholm/zig
that referenced
this issue
Dec 14, 2024
The purpose of `zig fetch` is to copy a package to the global cache to avoid needing to access the network. `path` entries in a build.zig.zon are for relative paths inside a package. It does not make sense to `--save` a package fetched by a (CWD-relative) file path. Closes ziglang#18639
castholm
added a commit
to castholm/zig
that referenced
this issue
Dec 15, 2024
The purpose of `zig fetch` is to copy a package to the global cache to avoid needing to access the network. `path` entries in a build.zig.zon are for relative paths inside a package. It does not make sense to `--save` a package fetched by a (CWD-relative) file path. Closes ziglang#18639
castholm
added a commit
to castholm/zig
that referenced
this issue
Feb 28, 2025
The purpose of `zig fetch` is to copy a package to the global cache to avoid needing to access the network. `path` entries in a build.zig.zon are for relative paths inside a package. It does not make sense to `--save` a package fetched by a (CWD-relative) file path. Closes ziglang#18639
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Zig Version
0.12.0-dev.2307+1b8f7e46f
Steps to Reproduce and Observed Behavior
lib/build.zig.zon
lib/build.zig
lib/lib.zig
_
app/build.zig.zon
app/build.zig
app/main.zig
app
andlib
share the same parent folder.Running:
Results in:
Running
zig build
thereafter produces an error:Expected Behavior
I believe
zig fetch --save ../lib
should be aware of the filesystem level and generate the following instead:Changing
.url
to.path
and removing.hash
fix the error.The text was updated successfully, but these errors were encountered: