Normalize Swift toolchain and use raw identifiers for test names - #23
Merged
Conversation
Sets the upcoming-feature flags once at project level so every target shares them: MemberImportVisibility, ExistentialAny and InternalImportsByDefault as build settings, and ImmutableWeakCaptures through OTHER_SWIFT_FLAGS, which has no setting of its own. The UI-test and screenshot-generator targets no longer override SWIFT_VERSION to 5.0, and TerrainAssets no longer restates the project value. Existentials are spelled `any` and the modules whose types appear in a framework target's public API are imported publicly. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EtA5RwfPWtcxu2NfAHfjAr
SE-0451 lets a test's prose description be its function name, so the camelCase names the tests carried alongside their descriptions are replaced by the descriptions themselves. The XCTest UI-test targets keep their `testFoo()` names. 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.
Raw identifiers for test names
SE-0451 lets a test's prose description be its function name, so the
@Test("…")display-name string is redundant with the declaration beneath it:Suites named after the type they exercise gain a "tests" suffix, since a bare raw identifier would shadow that type inside the suite body. The XCTest UI-test and screenshot targets are untouched and keep their
testFoo()names.Toolchain
The upcoming-feature flags now sit once at project level instead of scattered per target:
SWIFT_UPCOMING_FEATURE_MEMBER_IMPORT_VISIBILITY,_EXISTENTIAL_ANYand_INTERNAL_IMPORTS_BY_DEFAULT, plusImmutableWeakCaptures(SE-0481) throughOTHER_SWIFT_FLAGS, which is the only route since Xcode has no build setting for it.SWIFT_APPROACHABLE_CONCURRENCYalready coveredNonisolatedNonsendingByDefaultandInferIsolatedConformances.Target-level
SWIFT_VERSION = 5.0overrides are removed so every target builds in Swift 6 language mode. NoteSWIFT_VERSIONis a language mode: swiftc accepts only 4, 4.2, 5 and 6, so the values6.2/6.3seen in some projects were silently truncated and meant the same as6.0.InternalImportsByDefaultis the flag with real fallout — a bare import is now internal, so modules whose types appear in a target's public API becamepublic importand everything else stayed internal.🤖 Generated with Claude Code
https://claude.ai/code/session_01EtA5RwfPWtcxu2NfAHfjAr