#Build fails when pulling a Git repository from Codeberg, but using Git `clone` manually works fine
1 messages · Page 1 of 1 (latest)
what is the non manual way you are doing it? zig fetch? can you send the command/build.zig.zon
I am running zig build with the following build.zig.zon:
.{
.name = .my_game,
.version = "0.0.1",
.minimum_zig_version = "0.15.2",
.fingerprint = 0xe30c18d87ca58a54,
.paths = .{
"build.zig",
"build.zig.zon",
"src/*",
},
.dependencies = .{
.sdl3 = .{
.url = "https://codeberg.org/7Games/zig-sdl3.git"
}
},
}
I found an issue in the Zig GitHub that mentions something like this - that a request to Codeberg fails, but only if you don't specify a Host:* correctly?
you need git+https://......
also use zig fetch --save git+https://..., that will resolve a better url that points to a specific commit.
the one you have will just point to the latest commit in the default branch, which means the next time you clear your cache causing zig to refetch it, you will get a different version that will break your build.
zig will catch that though and give you a useful error message.
would the links in the tags page that link to *.tar.gz files work?
yes, but dont use the git+... in that case.
better yet, use zig fetch --save git+https://....#tagorbranchname
so something like zig fetch --save "https://codeberg.org/7Games/zig-sdl3/archive/v0.1.9.tar.gz#v0.1.9"? the # is just a way to point out the tag and has no actual function since it just highlights right?
i dont know if its actually better, probably doesnt matter. my brain just prefers going via git.
at least you know what zig fetch can do
no, you mixed them together
zig fetch --save git+https://codeberg.org/7Games/zig-sdl3#v0.1.9
or
zig fetch --save https://codeberg.org/7Games/zig-sdl3/archive/v0.1.9.tar.gz
ahh I see
on further thought, the git one is better, since it gives a commit which practically cant be deleted (they can its just difficult, and not at all recomended)
but a tag can be deleted (still not recomended, but its too easy to do)