Closed TofPlay closed 7 years ago
@TofPlay the sourcekitd framework are not included in the the default official download.
I am also thinking which is the better solution now :question:
the sourcekitd framework are not included in the the default official download.
Really?!?! 😵
2.1 a prebuild docker image
I check the Dockerfile. There is no instruction that builds sourcekitd. And I'm not sure this the official image of Swift. If I check on the Docker Store (replace Docker Hub) I can not found any official image for Swift from Apple.
2.2 a prebuild sourcekitd library. My own Linux distro is Arch, but it is possible to run if you do some tricks.
I do not have the same environment. I will waste time trying to make it work at home.
- build yourself. I leave some suggestions in SDE issue #13
I think I do not have too much choice. I will be obliged to build it on my config. The ticket is quite long. Not easy to extract the correct instructions to build sourcekitd. The ideal will be to have a bash script to build sourcekitd from the official Swift environment we can download on https://swift.org.
@TofPlay Do not give up :smiley: here are some extracts:
I have not examined the docker way. But I am you may try this tip:
I'm having the same problem on Ubuntu 16.04. I'm using https://github.com/norio-nomura/docker-sourcekit-builder provides sourcekitd-repl.
this preset file now lives here.
... extra-cmake-options="-DSWIFT_BUILD_SOURCEKIT:BOOL=ON -DSWIFT_TOOL_SOURCEKITD_REPL_BUILD=1"
dash-dash
swift-install-components=autolink-driver;compiler;clang-builtin-headers;stdlib;sdk-overlay;license;sourcekit-inproc;tools ...
at OSX, you may change:
sourcekit-inproc -> sourcekit-xpc-service
and component "tools" should corresponds to sourcekit side gen.
extra-cmake-options is must for Linux. but I guess no harm for OSX.
And it needs two passes in Linux: First, disable "sourcekit-inproc" comopnent for libdispatch, and second enable "sourcekit-inproc" for itself.
In fact, I have not much interests in docker before. So, sorry for the official docker seemly have not included the Sourcekit. I still like to try if the docker way can solve the this problem. Because the distros are varying much. The linked dynamic libraries may not existed in some distro. But the docker provides one standard container for this which is valuable.
to build from scratch is not terrible as many programmers thought:
the benenift of building from scratch is you get the lastest Sourcekit which has more features and less bugs and crashes :smiley:
wait one hour to let building to finish
I appreciate your enthusiasm and your support 🙂 But obliged to rebuild swift from scratch just for a tool it's too much for me. I did years ago with Linux but now it's no longer a fun for me and I do not have time for it either. I'm already fully busy. Otherwise I continue to think that SDE is a good tool and if Apple decides to put sourcekit in its standard distribution for Linux I will use SDE with pleasure.
Suggestion: You can create an ubuntu package that we can install with apt-get install
😉
@TofPlay I have confirmed the docker way is workable. Maya docker image of sourcekite be welcome?
More interesting is that, @norio-nomura provides a binary[1]. I have confirmed that this package include the sourcekit library. Can you download this binary other than the official one. If this is ok, it at least solves for you problem. :+1:
[1] https://github.com/norio-nomura/docker-sourcekit-builder/releases
@jinmingjian the binary is generate for ubuntu 16.04. I'm on Ubuntu 16.10. I'm not sure if we can build sourcekit on 16.04 and run on 16.10. Right now I am too busy I will probably not test it before next week.
For future versions, if you want more people use SDE, you should automatically create a deb
file for sourcekit for each version of Ubuntu. Then for example for Ubuntu 16.10 we will just have to execute the command dpkg --install sourcekit-swift3.1-ubuntu16.10.deb
(or another name is up to you) to install sourcekit.
See this link: What is the simplest Debian Packaging Guide?
While I think it's strange that Apple is not creating a deb
file for Swift. 🤔
@TofPlay thanks for suggestions. I add a docker image support for sourcekite. See more in README.
The installation package way is brittle. And as you seen, even the Apple has no resource for this. So, we just go here. And wait for future...
Hi I installed https://swift.org/builds/swift-3.1-branch/ubuntu1610/swift-3.1-DEVELOPMENT-SNAPSHOT-2017-01-31-a/swift-3.1-DEVELOPMENT-SNAPSHOT-2017-01-31-a-ubuntu16.10.tar.gz on my Ubuntu config
I execute the command:
I can not find
sourcekitdInProc.framework
on my config :(