No such module PackagePlugin
Swift version
swift-driver version: 1.113 Apple Swift version 6.0 (swiftlang-6.0.0.7.6 clang-1600.0.24.1)
Platform
macOS 14
Editor
Visual Studio Code
Does the issue reproduce with Swift 6?
Yes
Description
SourceKit-LSP gives an error diagnostic No such module PackagePlugin when trying to import PackagePlugin for a SwiftPM plugin. This module should be available and give code completion, go to definition, etc.
Steps to Reproduce
Clone [email protected]:elegantchaos/Versionator.git
checkout 187bc4c0e15dadccb5a65b2f71fa0082bd583f81
open in VSCode and try to edit Plugins/VersionatorPlugin/plugin.swift
Logging
No response
This was originally reported in swiftlang/vscode-swift#1044 by @samdeane
Synced to Apple’s issue tracker as rdar://136423767
The lack of autocompletion is quite frustrating. Are there any updates on this issue?
Yes, https://github.com/swiftlang/sourcekit-lsp/pull/1846 should fix the issue.
This still seems to be an issue? (Tested with swift-DEVELOPMENT-SNAPSHOT-2025-03-25)
That’s probably a different root cause. Could you file a new issue for it and attach the output of sourcekit-lsp diagnose to it?