SourceKitten
SourceKitten copied to clipboard
5.1 Support
I am not able to use sourcekitten doc on ubuntu 18.04 using Swift 5.1. I get this uninformative crash:
Parsing Dimension.swift (1/15)
fish: “sourcekitten doc --spm-module N…” terminated by signal SIGILL (Illegal instruction)
Can you share more information about how this is happening? For example:
- What snapshot build of Swift 5.1 are you using?
- Does
sourcekitten docfail with just this one project that you're running it on, or does it fail for others too? - What exact commands are you running from start to finish to get here?
I can run sourcekitten doc just fine on Ubuntu 16.04 with Swift 5.1 @ e90298ce10 (latest commit as of yesterday):
% docker run -it --rm norionomura/swift:swift-5.1-branch bash
root@1b39139dc63f:/# git clone https://github.com/jpsim/SourceKitten.git
Cloning into 'SourceKitten'...
remote: Enumerating objects: 84, done.
remote: Counting objects: 100% (84/84), done.
remote: Compressing objects: 100% (54/54), done.
remote: Total 11093 (delta 33), reused 56 (delta 29), pack-reused 11009
Receiving objects: 100% (11093/11093), 8.31 MiB | 5.41 MiB/s, done.
Resolving deltas: 100% (7211/7211), done.
Checking connectivity... done.
root@1b39139dc63f:/# cd SourceKitten/
root@1b39139dc63f:/SourceKitten# git checkout swift-5.1
Branch swift-5.1 set up to track remote branch swift-5.1 from origin.
Switched to a new branch 'swift-5.1'
root@1b39139dc63f:/SourceKitten# swift build -c release
Fetching https://github.com/keith/SWXMLHash.git
Fetching https://github.com/jpsim/Yams.git
Fetching https://github.com/Quick/Nimble.git
Fetching https://github.com/Quick/Quick.git
Fetching https://github.com/antitypical/Result.git
Fetching https://github.com/Carthage/Commandant.git
Completed resolution in 5.05s
Cloning https://github.com/antitypical/Result.git
Resolving https://github.com/antitypical/Result.git at 4.1.0
Cloning https://github.com/Carthage/Commandant.git
Resolving https://github.com/Carthage/Commandant.git at 0.16.0
Cloning https://github.com/Quick/Quick.git
Resolving https://github.com/Quick/Quick.git at 2.0.0
Cloning https://github.com/Quick/Nimble.git
Resolving https://github.com/Quick/Nimble.git at 8.0.1
Cloning https://github.com/jpsim/Yams.git
Resolving https://github.com/jpsim/Yams.git at 2.0.0
Cloning https://github.com/keith/SWXMLHash.git
Resolving https://github.com/keith/SWXMLHash.git at ks/swift-5.1
/SourceKitten/.build/checkouts/Result/Result/NoError.swift:8:3: warning: will never be executed
return true
^
/SourceKitten/.build/checkouts/Result/Result/NoError.swift:7:60: note: 'lhs' is uninhabited, so this function body can never be executed
public static func ==(lhs: NoError, rhs: NoError) -> Bool {
^
[15/15] Linking sourcekitten
root@1b39139dc63f:/SourceKitten# cd .build/checkouts/Yams/
root@1b39139dc63f:/SourceKitten/.build/checkouts/Yams# swift build
[23/23] Merging module Yams
root@1b39139dc63f:/SourceKitten/.build/checkouts/Yams# ../../../.build/release/sourcekitten doc --spm-module Yams > yams.json
Parsing Constructor.swift (1/16)
Parsing Decoder.swift (2/16)
Parsing Emitter.swift (3/16)
Parsing Encoder.swift (4/16)
Parsing Mark.swift (5/16)
Parsing Node.Mapping.swift (6/16)
Parsing Node.Scalar.swift (7/16)
Parsing Node.Sequence.swift (8/16)
Parsing Node.swift (9/16)
Parsing Parser.swift (10/16)
Parsing Representer.swift (11/16)
Parsing Resolver.swift (12/16)
Parsing String+Yams.swift (13/16)
Parsing Tag.swift (14/16)
Parsing YamlError.swift (15/16)
Parsing shim.swift (16/16)
root@1b39139dc63f:/SourceKitten/.build/checkouts/Yams# head yams.json
[{
"\/SourceKitten\/.build\/checkouts\/Yams\/Sources\/Yams\/Constructor.swift" : {
"key.diagnostic_stage" : "source.diagnostic.stage.swift.parse",
"key.length" : 24976,
"key.offset" : 0,
"key.substructure" : [
{
"key.accessibility" : "source.lang.swift.accessibility.public",
"key.annotated_decl" : "<Declaration>public final class Constructor<\/Declaration>",
"key.attributes" : [