Zig Version
0.14.0-dev.1710+8ee52f99c
Steps to Reproduce and Observed Behavior
- Run
zig init in an empty directory.
- Run
zig fetch --save=glfw https://pkg.machengine.org/glfw/e6f377baed70a7bef9fa08d808f40b64c5136bf6.tar.gz (the actual tarball is irrelevant, I used slimsag/glfw as an example as this was where I encountered the issue).
- Open build.zig.zon and observe that the dependency
glfw has been added with the URL from step 2.
- Run
zig fetch --save=glfw git+https://github.com/slimsag/glfw (as with above, the actual repo is irrelevant as long as it's a git repository).
- Open build.zig.zon and note that the
url was changed to git+https://github.com/slimsag/glfw, without a commit hash fragment.
If you delete the glfw entry and run zig fetch --save=glfw git+https://github.com/slimsag/glfw anew, its url is resolved to the expected git+https://github.com/slimsag/glfw#e6f377baed70a7bef9fa08d808f40b64c5136bf6 with the commit hash fragment.
Expected Behavior
Overwriting the existing dependency im step 4 resolves the ref to a commit hash as expected.
Zig Version
0.14.0-dev.1710+8ee52f99c
Steps to Reproduce and Observed Behavior
zig initin an empty directory.zig fetch --save=glfw https://pkg.machengine.org/glfw/e6f377baed70a7bef9fa08d808f40b64c5136bf6.tar.gz(the actual tarball is irrelevant, I used slimsag/glfw as an example as this was where I encountered the issue).glfwhas been added with the URL from step 2.zig fetch --save=glfw git+https://github.com/slimsag/glfw(as with above, the actual repo is irrelevant as long as it's a git repository).urlwas changed togit+https://github.com/slimsag/glfw, without a commit hash fragment.If you delete the
glfwentry and runzig fetch --save=glfw git+https://github.com/slimsag/glfwanew, itsurlis resolved to the expectedgit+https://github.com/slimsag/glfw#e6f377baed70a7bef9fa08d808f40b64c5136bf6with the commit hash fragment.Expected Behavior
Overwriting the existing dependency im step 4 resolves the ref to a commit hash as expected.