'No such module' for internal target import

MacOS, VS Code + Sift extension, latest XCode, (Swift 6.2)

Have a project with a target, and an executable that uses that target
The apps are simple command-line apps, for Mac

import MyTarget is not recognized, all other, like ArgumenetParser, are
Jump to definition does therefore not work

Already re-indexed, removed build folder, selected a build target, … nothing fixes these issues

Any idea how to get VS Code working?
It used to work in the past …

Some more info: I tried to reproduce with a fresh hello world project, but that works and I can not share the project I have the problem with

but I think I found the reason, my lib uses this project, for which I can share the source since its an open source project :slight_smile:

and when I open this project, it has an issue finding it’s internal lib, Libsql

and when I refactor my project so everything that uses Libsql is in its own library, than only this one has SourceKit problems, not my other library with the rest of the code

So something seems to be in Libsql-swift from the Turso project that confuses SourceKit
And I would like to know what, so I can help to make this project just work :slight_smile:

I would raise an issue against the SourceKit-LSP repository including your sample project that exhibits the problem. You can also run sourcekit-lsp diagnose in your terminal to generate a diagnostics bundle that can be included in the issue.

I actually found the reason. The project has a xcframework, with static libs, and swift build finds them, but SourceKit not.
I noticed that when I ported the build to Linux, and the IDE was working on Linux (except for the sPM plugin part, but that is a different topic)
So that brought me the rigth idea for a fix

In anycase, I documented the problem and ‘solution’ (workaround) here

not sure if I need / shall report that to anyone other than here, thought this is the place :slight_smile: