swiftwasm / swift

WebAssembly support for the Swift programming language
https://swiftwasm.org
1.32k stars 28 forks source link

Add `--destination` option to SourceKit-LSP to use for indexing #1935

Closed MaxDesiatov closed 3 years ago

MaxDesiatov commented 4 years ago

One more thing for the release I want to try is to patch SourceKit-LSP so that it can take a --destination argument and pass it to swift build. This should make it possible to get autocomplete in VSCode with Tokamak and projects that depend on it.

Originally posted by @MaxDesiatov in https://github.com/swiftwasm/swift/issues/1759#issuecomment-703634883

MaxDesiatov commented 4 years ago

I wasn't able to make it work right now the way I envisioned it initially. But now that JavaScriptKit no longer uses unsafe flags, I think this change is less critical. Package.swift for most if not all SwiftWasm project can be opened in Xcode and get auto-complete working, and it should work in VSCode as well w/o any changes. Please report issues with this approach if any are found.

MaxDesiatov commented 3 years ago

I don't think that the approach described originally is suitable anymore. We've got autocomplete working with most if not all of our libraries, now that they can be compiled on host architectures directly.