Normalize Swift toolchain and use raw identifiers for test names - #2
Merged
Conversation
The package builds with tools-version 6.3 in language mode 6, and every target shares one `upcomingFeatures` array that adds ImmutableWeakCaptures, MemberImportVisibility, ExistentialAny, and InternalImportsByDefault to the approachable-concurrency flags already in place. NavDataProcessor is the only public API surface that crosses module boundaries, so it exports Foundation, Logging, and SwiftNASR publicly and keeps the rest of its imports internal; no ExistentialAny or MemberImportVisibility fix-its were needed. The swift-format CI job runs in the same swift:6.3 container as the other jobs. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EtA5RwfPWtcxu2NfAHfjAr
Every @test and @suite names itself with an SE-0451 raw identifier instead of a display-name string, so the prose behavior description is the declaration. Each suite type carries the name of the type under test plus " tests" (`ApproachFamily tests`, `ChartName tests`, and so on) to keep the raw identifier from shadowing that type inside the suite body. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EtA5RwfPWtcxu2NfAHfjAr
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.
Two independent passes over the package.
Toolchain settings
swift-tools-version: 6.3, language mode 6 at package level. This is the nav-data generator tool and its supporting library, not a published library, so there is no older toolchain to keep compatibility with.approachableConcurrencyarray becomesupcomingFeatures, addingImmutableWeakCaptures,MemberImportVisibility,ExistentialAny, andInternalImportsByDefaultto the two flags already there. Every target points at the same array.InternalImportsByDefaultfallout was confined toNavDataProcessor.swift: its public initializer andprocess()exposeSwiftNASR.Cycle,URL, andLogger, so that file exports Foundation, Logging, and SwiftNASR publicly. All of its other imports stay internal.swift package migrateapplied zeroExistentialAnyand zeroMemberImportVisibilityfix-its.swift:latestcontainer toswift:6.3, so all five jobs now run the same toolchain.Raw identifiers for test names
SE-0451 makes the Swift Testing display-name string redundant, so each
@Test/@Suitenames itself:Suite types take the name of the type under test plus
" tests"(ApproachFamily tests,ChartName tests, …) so the raw identifier does not shadow that type inside the suite body. Test output is unchanged — the names were already the same prose.Verification (Swift 6.3.3 / Xcode 26.6, macOS)
swift build— clean apart from one pre-existingnonisolated(unsafe) let progresswarning inDTPPLoader.swift, which is Darwin-only (ProgressisSendablethere but not in swift-corelibs-foundation) and is left alone so the Linux CI build keeps compiling.swift test— 31 tests in 6 suites pass.swift format lint --strict -r .— clean.swiftlint --strict— 0 violations in 24 files.actionlint .github/workflows/ci.yml— clean.For reviewers
The
docs/planning documents still quote@Test("…")snippets in their examples; those are prose, not compiled, and are deliberately left as they are.🤖 Generated with Claude Code
https://claude.ai/code/session_01EtA5RwfPWtcxu2NfAHfjAr