Skip to content

Support package manifest feature completion and diagnostics - #2789

Open
somiljain2006 wants to merge 2 commits into
swiftlang:mainfrom
somiljain2006:package-manifest-feature-support
Open

somiljain2006 wants to merge 2 commits into
swiftlang:mainfrom
somiljain2006:package-manifest-feature-support

Conversation

@somiljain2006

@somiljain2006 somiljain2006 commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #2774

Implemented SourceKit-LSP support for autocompletion and diagnostics of upcoming and experimental Swift features used in Package.swift. The change reads supported features directly from the active toolchain using swiftc -print-supported-features, caches the result per toolchain, and reports diagnostics for unknown features, likely typos, features enabled through the wrong API, and upcoming features that are already enabled by the selected Swift language version. It also provides context-aware completion for enableUpcomingFeature and enableExperimentalFeature, including support for versioned package manifests, while preserving the correct string replacement range. Added parsing and toolchain caching tests along with comprehensive manifest diagnostics and completion tests covering valid features, typo suggestions, wrong feature categories, already-enabled features, unrelated source files, versioned manifests, and completion text edits.

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.

Autocompletion and diagnostics for upcoming/experimental feature syntax in Package.swift

1 participant