Open dermetfan opened 1 day ago
0.14.0-dev.1860+2e2927735
Given a build.zig.zon with a path dependency
build.zig.zon
.zqlite = .{ .path = "foo" },
when you fetch a URL dependency using
zig fetch --save https://github.com/karlseguin/zqlite.zig/archive/master.tar.gz
it puts the URL in the path field, resulting in an invalid dependency:
path
.zqlite = .{ .path = "https://github.com/karlseguin/zqlite.zig/archive/master.tar.gz", },
I'm providing a small repository so you can reproduce quickly: https://github.com/dermetfan/zig-issue-fetch-path
I believe it is reasonable for zig fetch --save to recognize this and write a valid dependency:
zig fetch --save
.zqlite = .{ .url = "https://github.com/karlseguin/zqlite.zig/archive/master.tar.gz", .hash = "<something>" },
side note, you should never use branch names in your url refs; only tags or commits. otherwise its bound to break almost immediately
Sure, this is just to keep the example short.
Zig Version
0.14.0-dev.1860+2e2927735
Steps to Reproduce and Observed Behavior
Given a
build.zig.zon
with a path dependencywhen you fetch a URL dependency using
it puts the URL in the
path
field, resulting in an invalid dependency:I'm providing a small repository so you can reproduce quickly: https://github.com/dermetfan/zig-issue-fetch-path
Expected Behavior
I believe it is reasonable for
zig fetch --save
to recognize this and write a valid dependency: