Skip to content

Normalize Swift toolchain and use raw identifiers for test names - #2

Merged
RISCfuture merged 2 commits into
mainfrom
swift-6.3-raw-identifiers
Sep 4, 2026
Merged

Normalize Swift toolchain and use raw identifiers for test names#2
RISCfuture merged 2 commits into
mainfrom
swift-6.3-raw-identifiers

Conversation

@RISCfuture

Copy link
Copy Markdown
Contributor

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.
  • The per-target approachableConcurrency array becomes upcomingFeatures, adding ImmutableWeakCaptures, MemberImportVisibility, ExistentialAny, and InternalImportsByDefault to the two flags already there. Every target points at the same array.
  • InternalImportsByDefault fallout was confined to NavDataProcessor.swift: its public initializer and process() expose SwiftNASR.Cycle, URL, and Logger, so that file exports Foundation, Logging, and SwiftNASR publicly. All of its other imports stay internal. swift package migrate applied zero ExistentialAny and zero MemberImportVisibility fix-its.
  • CI: the swift-format job moves from the swift:latest container to swift: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/@Suite names itself:

@Test
func `parses a dashed multiple indicator`() { ... }

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-existing nonisolated(unsafe) let progress warning in DTPPLoader.swift, which is Darwin-only (Progress is Sendable there 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

RISCfuture and others added 2 commits September 4, 2026 01:00
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
@RISCfuture
RISCfuture merged commit 5e1849c into main Sep 4, 2026
5 checks passed
@RISCfuture
RISCfuture deleted the swift-6.3-raw-identifiers branch September 4, 2026 17:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant