swiftlang / vscode-swift

Visual Studio Code Extension for Swift
https://marketplace.visualstudio.com/items?itemName=sswg.swift-lang
Apache License 2.0
758 stars 54 forks source link

No such module PackagePlugin #1044

Open samdeane opened 2 months ago

samdeane commented 2 months ago

Describe the bug

In a Swift Plugin package, vscode-swift/SourceKit is reporting that PackagePlugin doesn't exist.

The package builds fine, so it clearly does exist :)

image image

To Reproduce

Clone git@github.com:elegantchaos/Versionator.git check out 187bc4c0e15dadccb5a65b2f71fa0082bd583f81 open package in vscode

Expected behavior

No problems should be reported.

Environment

~/Developer/Projects/Versionator > versions                                                                                                                                           (main)
+ uname
Darwin
+ sw_vers
ProductName:            macOS
ProductVersion:         14.6.1
BuildVersion:           23G93
+ swift --version
swift-driver version: 1.113 Apple Swift version 6.0 (swiftlang-6.0.0.7.6 clang-1600.0.24.1)
Target: arm64-apple-macosx14.0
+ xcodebuild -version
Xcode 16.1
Build version 16B5001e
+ code --version
1.92.2
fee1edb8d6d72a0ddff41e5f71a671c23ed924b9
arm64
+ code --list-extensions --show-versions
astro-build.astro-vscode@2.14.1
atlassian.atlascode@3.0.10
blaugold.melos-code@1.1.1
christian-kohler.npm-intellisense@1.4.5
christian-kohler.path-intellisense@2.9.0
dart-code.dart-code@3.94.0
dart-code.flutter@3.94.0
dbaeumer.vscode-eslint@3.0.10
dnicolson.binary-plist@0.11.4
donjayamanne.githistory@0.6.20
eamodio.gitlens@15.3.1
esbenp.prettier-vscode@11.0.0
felipecaputo.git-project-manager@1.8.2
fwcd.kotlin@0.2.35
geequlim.godot-tools@2.1.0
github.copilot@1.223.0
github.copilot-chat@0.18.2
github.github-vscode-theme@6.3.4
github.vscode-pull-request-github@0.94.0
golang.go@0.42.0
graphql.vscode-graphql@0.12.0
graphql.vscode-graphql-syntax@1.3.6
hashicorp.terraform@2.32.2
huang12zheng.protobuf-helper@0.2.10
jock.svg@1.5.4
juanblanco.solidity@0.0.174
llvm-vs-code-extensions.vscode-clangd@0.1.29
mathematic.mathematic-vscode-api-linter@1.1.2
mechatroner.rainbow-csv@3.12.0
mhutchie.git-graph@1.30.0
mikestead.dotenv@1.0.1
moalamri.inline-fold@0.2.6
ms-azuretools.vscode-docker@1.29.2
ms-dotnettools.csdevkit@1.9.55
ms-dotnettools.csharp@2.39.29
ms-dotnettools.vscode-dotnet-runtime@2.1.5
ms-vscode-remote.remote-containers@0.380.0
ms-vscode.makefile-tools@0.10.26
ms-vsliveshare.vsliveshare@1.0.5936
ms-vsliveshare.vsliveshare-pack@0.4.0
pbkit.vscode-pbkit@0.0.7
peterj.proto@0.0.4
prisma.prisma@5.19.0
redhat.vscode-yaml@1.15.0
richie5um2.vscode-sort-json@1.20.0
sleistner.vscode-fileutils@3.10.3
sswg.swift-lang@1.11.0
statelyai.stately-vscode@2.1.0
svelte.svelte-vscode@108.6.1
tal7aouy.icons@3.8.0
tamasfe.even-better-toml@0.19.2
vadimcn.vscode-lldb@1.10.0
vknabel.vscode-apple-swift-format@1.4.3
vscode-icons-team.vscode-icons@12.8.0
yzhang.markdown-all-in-one@3.6.2
zxh404.vscode-proto3@0.5.5

Additional context Add any other context about the problem here.

samdeane commented 2 months ago

(I realise that this may be a SourceKit issue...)

matthewbastien commented 2 months ago

Yup, this is definitely a SourceKit-LSP issue. I've raised a separate issue with them, but will keep this open so that it can be verified that the fix works in VSCode once available. Thanks for raising this issue!

swiftlang/sourcekit-lsp#1704