bmontegani
(Bruce Montegani)
1
I am using:
Xcode Version 12.0.1 (12A7300)
Command Line Tools installed
VSCode settings:
Path to executable:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/sourcekit-lsp
Toolchain path: blank
- Cleaned project
- swift build
- Closed folder and re-opened
Modules are still not found. Also modules that are found have no hovering, code completion etc,
Is it time to start over with sourcekit-lsp?????
blangmuir
(Ben Langmuir)
3
Are you able to share a project that shows the issues you are seeing?
bmontegani
(Bruce Montegani)
4
Attachment available until Nov 20, 2020
blangmuir
(Ben Langmuir)
5
Was there supposed to be an attachment somewhere? I'm not seeing one.
bmontegani
(Bruce Montegani)
6
I tried to send through mail drop. However, I couldn’t do that because I haven’t set up an iCloud email account. I couldn’t do that because I couldn’t turn it on via my iCloud account because very time I tried to see up the account it just kept asking me to create the account and then I would and then it just repeated the prompt over and over and over again. So I have no clue why I cannot use mail drop. Any suggestions for a third party service for a 94mb file?
bmontegani
(Bruce Montegani)
7
Attachment available until Nov 20, 2020
bmontegani
(Bruce Montegani)
8
Hi Ben,
Did you get my attachment?
Bruce
blangmuir
(Ben Langmuir)
9
No, sorry. If you are trying to do it via email, it is probably not supported by discourse. Is there a download link? If you have an apple developer account, another option would be to file a bug to feedbackassisant.apple.com.
bmontegani
(Bruce Montegani)
10
blangmuir
(Ben Langmuir)
11
That worked, thanks!
SourceKit-LSP supports Swift Packages, but does not support getting compiler arguments from Xcode projects. Looking at the attached project, it contains both a Package.swift and an Xcode project. However, they are not setup to build from the same source files. So when you open one of the files that is part of the Xcode project, but not part of the package, it will not find modules correctly.
Package.swift:
.target(
name: "TestKituraCLI",
dependencies: [ ... ]),
This target is using the following source code, which only contains a single print statement.
Sources/
TestKituraCLI/
main.swift
Whereas the Xcode project has a target named TestKituraCLI that uses the following sources (which look like the "real" source code):
TestKituraCLI/
main.swift
Sources/
Scaffolder.swift
Utilities.swift
If I rearrange the code like this to match what SwiftPM expects, it works with sourcekit-lsp.
Sources/
TestKituraCLI/
main.swift
Scaffolder.swift
Utilities.swift
If you go that route, I suggest changing it from within Xcode so that both the package and xcodeproj stay in sync about the directories.
bmontegani
(Bruce Montegani)
12
OK… I will give that a try. I am trying to use VSCode for all of my coding. I am hoping the tooling keeps getting better and better for Swift.
BTW, I just got an email from Kite.com. I was wondering if it would be a possibility of working with them to support the Swift language.
https://www.kite.com/blog/product/announcing-11-new-programming-languages-and-kite-team-server/
Thanks for you help
Bruce