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

How to specify external SPM dependencies? #788

Open
97mik opened this issue Jul 14, 2023 · 1 comment
Open

How to specify external SPM dependencies? #788

97mik opened this issue Jul 14, 2023 · 1 comment
Labels

Comments

@97mik
Copy link

97mik commented Jul 14, 2023

When I try to run a request and the file contains imports of a 3rd party Swift package:

key.request: source.request.indexsource
key.sourcefile: "ViewController.swift"
key.compilerargs:
- "-sdk"
- "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS16.4.sdk"
- "-target"
- "arm64-apple-ios16.4"
- "ViewController.swift"

Then I get an error: no such module 'MyPackage'
And I don't get the index of those lines that use the structure from the package.

How can I specify links to used packages?

@jpsim
Copy link
Owner

jpsim commented Sep 13, 2023

You'll need to determine what compiler arguments Xcode passes to SourceKit and mirror those here.

You can do that by launching Xcode from the command line and looking at the logs:

$ SOURCEKIT_LOGGING=3 /Applications/Xcode.app/Contents/MacOS/Xcode

@jpsim jpsim added the question label Sep 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants