You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is it reproducible with SwiftPM command-line tools: swift build, swift test, swift package etc?
Confirmed reproduction steps with SwiftPM CLI. The description text must include reproduction steps with either of command-line SwiftPM commands, swift build, swift test, swift package etc.
Description
SwiftPM does not appear to provide any sort of in-editor information to a package developer about how to use traits defined in Package.swift. There's no indication informational message, no template comments, no autocomplete help, etc for what this .trait(...) thing does nor how one is supposed to use it. There is no autocomplete for #if ...
Expected behavior
No response
Actual behavior
No response
Steps to reproduce
No response
Swift Package Manager version/commit hash
Swift Package Manager - Swift 6.0.3
Swift & OS version (output of swift --version ; uname -a)
swift-driver version: 1.115.1 Apple Swift version 6.0.3 (swiftlang-6.0.3.1.9 clang-1600.0.30.1)
Darwin Localhost 24.3.0 Darwin Kernel Version 24.3.0: Thu Jan 2 20:24:23 PST 2025; root:xnu-11215.81.4~3/RELEASE_ARM64_T6020 arm64
The text was updated successfully, but these errors were encountered:
Just to make sure I understand you correctly: Are you suggesting that code completion should offer the available trait names when completing inside #if?
Essentially, yes. If I type #if and then hit escape, I should be getting a list of possible things that can go after an #if token, which includes trait names. I should not be getting the current (as of Xcode 16.2) behavior of "No Completions".
Is it reproducible with SwiftPM command-line tools:
swift build
,swift test
,swift package
etc?swift build
,swift test
,swift package
etc.Description
SwiftPM does not appear to provide any sort of in-editor information to a package developer about how to use traits defined in Package.swift. There's no indication informational message, no template comments, no autocomplete help, etc for what this
.trait(...)
thing does nor how one is supposed to use it. There is no autocomplete for#if ...
Expected behavior
No response
Actual behavior
No response
Steps to reproduce
No response
Swift Package Manager version/commit hash
Swift Package Manager - Swift 6.0.3
Swift & OS version (output of
swift --version ; uname -a
)swift-driver version: 1.115.1 Apple Swift version 6.0.3 (swiftlang-6.0.3.1.9 clang-1600.0.30.1)
Darwin Localhost 24.3.0 Darwin Kernel Version 24.3.0: Thu Jan 2 20:24:23 PST 2025; root:xnu-11215.81.4~3/RELEASE_ARM64_T6020 arm64
The text was updated successfully, but these errors were encountered: