Repository navigation
Fix issues found during the connection-reuse review - #5
Merged
Merged
Conversation
`buildURL` adds the `api-key` query item to every URL it builds, so the
`if !url.absoluteString.contains("api-key")` branch in `bulkLookup` could
never run. Drop it together with `appendAPIKey(to:)`, whose only caller it
was. The bulk URL is unchanged; a new test pins that it carries exactly one
`api-key` query item next to the `fields` item.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
swift-corelibs-foundation ships the async `URLSession.data(for:delegate:)` from Swift 6.0 on, so the package's own `data(for:)` shim is only needed by the 5.9 and 5.10 toolchains on Linux. Guard it with `compiler(<6.0)` so that Swift 6 toolchains use the native method and the two declarations never coexist. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
The table listed `timeZone` as `TimeZone?` although the model type is `TimeZoneInfo`, and it had no rows for `regionType` and `emojiUnicode`. Correct the type, add the two rows and a short TimeZoneInfo section. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
- actions/checkout v4 targets Node.js 20, which GitHub Actions has deprecated; the runner already forces it onto Node.js 24 and prints a warning on every job. Move to v7, which runs on Node.js 24 natively. - The macos-14 image is deprecated in actions/runner-images. Test on macos-15 and macos-26 instead. - Add Swift 6.0 to 6.4 to the Linux matrix next to 5.9 and 5.10, and let the matrix finish every job (fail-fast off) so that one failing version does not cancel the others. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Follow-up to #4: fixes the items that its review left as noticed but unchanged, wherever a fix is possible in this repository. The public API does not change. A dead branch and the unused private helper behind it are removed, the README's
IPResponsetable is corrected, the LinuxURLSessionshim is limited to the toolchains that need it, and the CI workflow moves off deprecated runner images and action versions while adding Swift 6.0 to 6.4 to the matrix.Changes
api-keycheck inbulkLookupremoved.buildURLalways adds theapi-keyquery item, soif !url.absoluteString.contains("api-key")could never run; the branch and its only calleeappendAPIKey(to:)are gone. The request URL is unchanged, and the newtestBulkLookupSendsTheAPIKeyOnceAsAQueryItempins exactly oneapi-keyquery item next tofieldson the bulk URL.IPResponsetable corrected.timeZoneis documented asTimeZoneInfo?(the type was renamed in Rename TimeZone to TimeZoneInfo to fix macOS CI failure #2), the missingregionTypeandemojiUnicoderows are added, and a shortTimeZoneInfosection lists its properties.URLSession.data(for:)shim compiled only below Swift 6. swift-corelibs-foundation ships the asyncdata(for:delegate:)from Swift 6.0 on; the shim is now guarded withcanImport(FoundationNetworking) && compiler(<6.0), so Swift 6 toolchains on Linux use the native method and the two declarations never coexist. Swift 5.9 and 5.10 on Linux behave exactly as before.actions/checkoutmoves from v4 (Node.js 20, deprecated on GitHub Actions; every job printed a runner warning) to v7 (Node.js 24). The deprecatedmacos-14image is replaced bymacos-15andmacos-26. The Linux matrix keeps Swift 5.9 and 5.10 and adds 6.0, 6.1, 6.2, 6.3 and 6.4;fail-fast: falselets every version report instead of being cancelled by the first failure.Not changed
User-Agentheader: a Swift package has no version metadata available at runtime to buildipdata-swift/<version>from, and a hard-coded string would drift from the release tags.URLSessionexposes no pool idle timeout, HTTP/2 keepalive ping or TCP keepalive setting (timeoutIntervalForRequestis per request), so the stack defaults stay in place.URLSession.data(for:)the client cannot tell whether response bytes had already arrived whennetworkConnectionLostis raised, so the bulk retry keys on the error alone.MockURLProtocolmutable statics: fine in the Swift 5 language mode the package uses (swift-tools-version: 5.9); they would need isolation only under Swift 6 strict concurrency, which is not enabled.swift-tools-versionstays 5.9 so that the package keeps supporting Swift 5.9 and 5.10.main(which also compiles on Linux); closing it is left to the maintainer.Verification
swift buildandswift testwere not run locally; GitHub Actions is the compiler and test runner for this PR. Every edited file was re-read in full after editing, and a bracket-nesting check that skips comments, string literals, interpolations and raw strings passed for all five Swift files.python3 -c 'import yaml; yaml.safe_load(open(".github/workflows/ci.yml"))': parses; Linux matrix5.9, 5.10, 6.0, 6.1, 6.2, 6.3, 6.4, macOS matrixmacos-15, macos-26.CI, run 41639305092 onf033e21(eventpull_request), conclusionsuccess, all nine jobs passed:Swift 5.9 on Ubuntu,Swift 5.10 on Ubuntu,Swift 6.0 on Ubuntu,Swift 6.1 on Ubuntu,Swift 6.2 on Ubuntu,Swift 6.3 on Ubuntu,Swift 6.4 on Ubuntu,Swift on macos-15,Swift on macos-26.swift testexecuted 41 tests with 0 failures (the 40 existing tests plustestBulkLookupSendsTheAPIKeyOnceAsAQueryItem) on every job whose log was checked (Swift 5.9, 6.0 and 6.4 on Ubuntu, macos-15 and macos-26); the Swift 5.9 and 5.10 jobs compile the Linux shim, the Swift 6.0 to 6.4 jobs build without it. TheNode.js 20 is deprecatedrunner warning that every earlier run printed is gone from the logs.🤖 Generated with Claude Code