I updated to zig dev 0.14.0-dev.3224+5ab511307 and looks like I can’t zig fetch anymore:
zig fetch --save git+https://github.com/natecraddock/ziglua
error: unable to discover remote git server capabilities: CertificateBundleLoadFailure
I’m not sure if this is due to some macOS security restriction or something else. Zig fetch used to work before.
This also affects running zig build, for example, I can’t build ZLS anymore:
zig build
/Users/janne/dev/zls/build.zig.zon:16:20: error: unable to connect to server: CertificateBundleLoadFailure
.url = "https://github.com/ziglibs/known-folders/archive/1cceeb70e77dec941a4178160ff6c8d05a74de6f.tar.gz",
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/janne/dev/zls/build.zig.zon:20:20: error: unable to connect to server: CertificateBundleLoadFailure
.url = "https://github.com/ziglibs/diffz/archive/ef45c00d655e5e40faf35afbbde81a1fa5ed7ffb.tar.gz",
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/janne/dev/zls/build.zig.zon:24:20: error: unable to connect to server: CertificateBundleLoadFailure
.url = "https://github.com/zigtools/zig-lsp-codegen/archive/e1f281f67ac2cb8c19d3cabe9cfae46fde691c56.tar.gz",
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
I’am on macOS 15.3 (24D60). I’m not sure which Zig dev version I had before but I think it was 2800’ish.
Could be I missed some macOS security prompt, but I also don’t see anything special under System Settings/Privacy & Security (where you’d normally add app specific exceptions for binary downloads).
It seems possible that the intention was to read one or the other or both, but it might inadvertently have been implemented to fail if one can’t be read.
Thanks for digging into those issues - I subbed to the related GitHub issues.
It’s a pretty serious regression as it makes Zig useless for me. I guess not everyone in macOS is affected - otherwise I’d imagine there’d be more people noticing this.
zig build works and seems to the fetch the dependencies fine
A manual zig fetch also works.
AFAIK I haven’t changed anything on the macOS side that could be relevant.
I did consistently run into trouble with zig fetch on my Ubuntu laptop though, but this seems to be some incompatibility between Linux and my DSL modem acting as DNS Server:
…this was solved by changing the DNS server to Google’s 8.8.8.8 / 8.8.4.4.
PS: doing a zig fetch --save git+https://github.com/natecraddock/ziglua also works for me.
I can try do track down a zig-dev version right before and after when the macOS keychain changes went in and see if I can narrow this down to a smaller range of versions.
I can in fact git clone the pacman repository and zig build it just fine. But if I run a zig fetch (as above) in that directory, I get the same failure I got in the original post. I don’t want to blow away my global cache right now as that will render my zig malfunctional.
EDIT: uhh, I guess I won’t be narrowing this down yet as I don’t know where to find a list of nightly builds from the recent past.
One way to get old master builds is to check the commit history of the www.ziglang.org site: Commits · ziglang/www.ziglang.org · GitHub All the “CI: update master branch builds” commits are to update the master branch download links.
Good to know, then my theory of the bug is incorrect. Unfortunately I can’t reproduce the problem locally, so it’s hard to know what’s going wrong.
(the readAtLeast → readAll change probably makes sense regardless, though, as it seems like the use of readAtLeast causes cb.bytes to balloon by millions of bytes [last cert starting at index 173295 with readAll vs 27485590 with readAtLeast, final capacity of 251937 with readAll vs 32720747 with readAtLeast])