Skip to content

No such module PackagePlugin #1704

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
matthewbastien opened this issue Sep 21, 2024 · 6 comments · Fixed by swiftlang/swift-package-manager#8138 or #1846
Closed

No such module PackagePlugin #1704

matthewbastien opened this issue Sep 21, 2024 · 6 comments · Fixed by swiftlang/swift-package-manager#8138 or #1846
Labels
bug Something isn't working

Comments

@matthewbastien
Copy link
Member

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 matthewbastien added the bug Something isn't working label Sep 21, 2024
@matthewbastien
Copy link
Member Author

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

@ahoppen
Copy link
Member

ahoppen commented Sep 21, 2024

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

ahoppen added a commit to ahoppen/sourcekit-lsp that referenced this issue Nov 22, 2024
Currently, when there‘s a syntax error in a package manifest, we don’t get any build settings from it in SourceKit-LSP and thus loose almost all semantic functionality. If we can’t parse the package manifest, fall back to providing build settings by assuming it has the current Swift tools version.

Currently, when there‘s a syntax error in a package manifest, we don’t get any build settings from it in SourceKit-LSP and thus loose almost all semantic functionality. If we can’t parse the package manifest, fall back to providing build settings by assuming it has the current Swift tools version.

Fixes swiftlang#1704
rdar://136423767
ahoppen added a commit to ahoppen/swift-package-manager that referenced this issue Nov 22, 2024
Currently, when there‘s a syntax error in a package manifest, we don’t get any build settings from it in SourceKit-LSP and thus loose almost all semantic functionality. If we can’t parse the package manifest, fall back to providing build settings by assuming it has the current Swift tools version.

Fixes swiftlang/sourcekit-lsp#1704
rdar://136423767
ahoppen added a commit to ahoppen/sourcekit-lsp that referenced this issue Nov 22, 2024
Currently, when there‘s a syntax error in a package manifest, we don’t get any build settings from it in SourceKit-LSP and thus loose almost all semantic functionality. If we can’t parse the package manifest, fall back to providing build settings by assuming it has the current Swift tools version.

Currently, when there‘s a syntax error in a package manifest, we don’t get any build settings from it in SourceKit-LSP and thus loose almost all semantic functionality. If we can’t parse the package manifest, fall back to providing build settings by assuming it has the current Swift tools version.

Fixes swiftlang#1704
rdar://136423767
@MihaelIsaev
Copy link

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

@ahoppen
Copy link
Member

ahoppen commented Dec 4, 2024

Yes, #1846 should fix the issue.

ahoppen added a commit to swiftlang/swift-package-manager that referenced this issue Dec 9, 2024
Currently, when there‘s a syntax error in a package manifest, we don’t
get any build settings from it in SourceKit-LSP and thus loose almost
all semantic functionality. If we can’t parse the package manifest, fall
back to providing build settings by assuming it has the current Swift
tools version.

Fixes swiftlang/sourcekit-lsp#1704
rdar://136423767
ahoppen added a commit to ahoppen/sourcekit-lsp that referenced this issue Dec 9, 2024
Currently, when there‘s a syntax error in a package manifest, we don’t get any build settings from it in SourceKit-LSP and thus loose almost all semantic functionality. If we can’t parse the package manifest, fall back to providing build settings by assuming it has the current Swift tools version.

Currently, when there‘s a syntax error in a package manifest, we don’t get any build settings from it in SourceKit-LSP and thus loose almost all semantic functionality. If we can’t parse the package manifest, fall back to providing build settings by assuming it has the current Swift tools version.

Fixes swiftlang#1704
rdar://136423767
@knopp
Copy link

knopp commented Mar 27, 2025

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

@ahoppen
Copy link
Member

ahoppen commented Mar 27, 2025

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
4 participants