sourcekit-lsp icon indicating copy to clipboard operation
sourcekit-lsp copied to clipboard

No such module PackagePlugin

Open matthewbastien opened this issue 1 year ago • 2 comments

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

matthewbastien avatar Sep 21 '24 15:09 matthewbastien

This was originally reported in swiftlang/vscode-swift#1044 by @samdeane

matthewbastien avatar Sep 21 '24 15:09 matthewbastien

Synced to Apple’s issue tracker as rdar://136423767

ahoppen avatar Sep 21 '24 16:09 ahoppen

The lack of autocompletion is quite frustrating. Are there any updates on this issue?

MihaelIsaev avatar Dec 04 '24 02:12 MihaelIsaev

Yes, https://github.com/swiftlang/sourcekit-lsp/pull/1846 should fix the issue.

ahoppen avatar Dec 04 '24 04:12 ahoppen

This still seems to be an issue? (Tested with swift-DEVELOPMENT-SNAPSHOT-2025-03-25)

knopp avatar Mar 27 '25 18:03 knopp

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?

ahoppen avatar Mar 27 '25 19:03 ahoppen