Skip to content
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

No such module '<name>' #1319

Open
MahdiBM opened this issue Jan 15, 2025 · 0 comments
Open

No such module '<name>' #1319

MahdiBM opened this issue Jan 15, 2025 · 0 comments
Labels
bug Something isn't working sourcekit-lsp SourceKit-LSP issue

Comments

@MahdiBM
Copy link
Contributor

MahdiBM commented Jan 15, 2025

Describe the bug
Getting no such module 'Benchmark' around import Benchmarks.
Half sourcekit-lsp stuff that are unrelated to the benchmarking package work, and the other half just don't.
sourcekit-lsp background indexing is enabled.
EDIT: sourcekit-lsp problems could be related to the fact that I was using backgroundPreparationMode: build, which i've figured is not a good move generally.

To Reproduce
Steps to reproduce the behavior:
Clone vapor/multipart-kit.
Open the Benchmarks folder as the root SwiftPM directory. Don't just open the multipart-kit folder and head to the Benchmarks directory.
Try to build.
Open a file like Parser.swift.
Observe error no such module 'Benchmark'.

Expected behavior
Things work.

Environment

  • OS: macOS 15.2
  • Swift version (output of swift --version): 6.0.3 release
  • Visual Studio Code version: -
  • vscode-swift version: v1.11.4

Additional context
This sub-swiftpm-package does have some uncommon stuff in it, possibly one of them is triggering this behavior. For example the fact that there is a sub-package at all + that the sub-package references its parent as a dependency.

@MahdiBM MahdiBM added the bug Something isn't working label Jan 15, 2025
@award999 award999 added the sourcekit-lsp SourceKit-LSP issue label Jan 16, 2025
@award999 award999 moved this from Unscreened to Backlog in Swift Extension for Visual Studio Code Jan 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working sourcekit-lsp SourceKit-LSP issue
Development

No branches or pull requests

2 participants