Closed torinmr closed 6 months ago
@swift-server-bot add to allowlist
Hmmm, apparently ./scripts/soundness.sh
exits without printing anything if you don't have swiftformat
installed. I fixed the formatting issues and added a patch to soundness.sh
to print an informative error message in this case, let me know if it looks good to you.
Thanks for the review Yim! How does merging work? Looks like I don't have permission to trigger the merge myself.
The old implementation converted each byte to a hexadecimal number separately, meaning that leading zeros in a byte would be dropped even in the middle of a group.
For example, the address 2620:149:110b:470e:0:0:0:e1a was incorrectly rendered as 2620:149:11b:47e:0:0:0:e1a, with zeros dropped in the 3rd and 4th octets.
I figured the most robust fix would be to use inet_ntop to format the address, which produces a correctly abbreviated address like 2620:149:110b:470e::e1a. This is the approach used in DNSResolver_c-ares.swift.