32 ms·
I wish I had your time and effort to be able to fix the issues of split DNS in macOS being broken unless using cgo. https://github.com/golang/go/issues/12524 h
by ArchOversight 5y ago
I wish I had your time and effort to be able to fix the issues of split DNS in macOS being broken unless using cgo.
https://github.com/golang/go/issues/12524 https://github.com/golang/go/issues/12524
This has been an open issue since 2015. It's a pain because every single last tool using go cross compilation fails to use the proper DNS resolver and thereby doesn't work when using work VPN's.
This is tools like: kubectl, vault, concourse (fly), and many other binaries that get built on CI, and unless the company builds on macOS builders and uses CGO_ENABLED=1 DNS resolution is just broken.
And it is increasingly frustrating.
- AaronFriel 5y agoVery interesting and very helpful. TLD-specific resolvers on Mac not working is the missing piece I needed to understand why our team builds binaries on Mac and cross-compiles to the other two.
- int_19h 5y agoA better question is, why is Go using its own DNS resolver instead of the OS-provided one in the first place?
- ArchOversight 5y ago> why is Go [doing something that doesn't seem to make much sense] Because it's Go, and NIH is very strong and alive, and Go can do it better than anyone else.
- int_19h 5y agoSure, but there's usually some purported rationale. E.g. with direct syscalls it was to avoid FFI overhead. I'm curious as to what it was here; presumably trying to keep everything async?