Skip to content

Commit

Permalink
Merge pull request #76 from terhechte/swift-4.2
Browse files Browse the repository at this point in the history
Support for swift 4.2
  • Loading branch information
nathankot authored Oct 1, 2018
2 parents 9ad0129 + 70c3d9b commit 82e8020
Show file tree
Hide file tree
Showing 5 changed files with 98 additions and 79 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
ROOT_DIR := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
VERSION := $(shell agvtool what-marketing-version -terse1)
VERSION := $(shell git rev-parse HEAD)
BUILD := .build
DIST := dist
PREFIX := /usr/local
Expand Down
72 changes: 0 additions & 72 deletions Package.pins

This file was deleted.

88 changes: 88 additions & 0 deletions Package.resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
{
"object": {
"pins": [
{
"package": "Commandant",
"repositoryURL": "https://github.com/Carthage/Commandant.git",
"state": {
"branch": null,
"revision": "07cad52573bad19d95844035bf0b25acddf6b0f6",
"version": "0.15.0"
}
},
{
"package": "Embassy",
"repositoryURL": "https://github.com/envoy/Embassy.git",
"state": {
"branch": null,
"revision": "43d52f80e79b84eaa7e238d942be59e86db156a6",
"version": "4.0.8"
}
},
{
"package": "Nimble",
"repositoryURL": "https://github.com/Quick/Nimble.git",
"state": {
"branch": null,
"revision": "cd6dfb86f496fcd96ce0bc6da962cd936bf41903",
"version": "7.3.1"
}
},
{
"package": "Quick",
"repositoryURL": "https://github.com/Quick/Quick.git",
"state": {
"branch": null,
"revision": "5fbf13871d185526993130c3a1fad0b70bfe37ce",
"version": "1.3.2"
}
},
{
"package": "Result",
"repositoryURL": "https://github.com/antitypical/Result.git",
"state": {
"branch": null,
"revision": "8fc088dcf72802801efeecba76ea8fb041fb773d",
"version": "4.0.0"
}
},
{
"package": "SourceKitten",
"repositoryURL": "https://github.com/jpsim/SourceKitten.git",
"state": {
"branch": null,
"revision": "4be914be6fa49cd30b1e7ef5d32d06c037d8f469",
"version": "0.21.2"
}
},
{
"package": "SWXMLHash",
"repositoryURL": "https://github.com/drmohundro/SWXMLHash.git",
"state": {
"branch": null,
"revision": "0ce63a93a455adb3cd5e4c55f78f1232a590a5a5",
"version": "4.7.2"
}
},
{
"package": "XcodeEdit",
"repositoryURL": "https://github.com/felix91gr/XcodeEdit.git",
"state": {
"branch": null,
"revision": "cf8e15a35ec5bfa350bf3bb96ebebe733123c4f2",
"version": "1.1.3"
}
},
{
"package": "Yams",
"repositoryURL": "https://github.com/jpsim/Yams.git",
"state": {
"branch": null,
"revision": "26ab35f50ea891e8edefcc9d975db2f6b67e1d68",
"version": "1.0.1"
}
}
]
},
"version": 1
}
4 changes: 2 additions & 2 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ var package = Package(
],

dependencies: [
.Package(url: "https://github.com/Carthage/Commandant.git", versions: Version(0, 12, 0)..<Version(0, 12, .max)),
.Package(url: "https://github.com/jpsim/SourceKitten.git", majorVersion: 0, minor: 18),
.Package(url: "https://github.com/Carthage/Commandant.git", versions: Version(0, 12, 0)..<Version(0, 15, .max)),
.Package(url: "https://github.com/jpsim/SourceKitten.git", majorVersion: 0, minor: 21),
.Package(url: "https://github.com/envoy/Embassy.git", majorVersion: 4),
.Package(url: "https://github.com/felix91gr/XcodeEdit.git", majorVersion: 1),
],
Expand Down
11 changes: 7 additions & 4 deletions Sources/SourceKittenDaemon/Completer/Completer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -148,10 +148,13 @@ class Completer {
contents: contents,
offset: Int64(offset),
arguments: compilerArgs)

let response = CodeCompletionItem.parse(response: request.send())

return .success(result: response)

do {
let response = try CodeCompletionItem.parse(response: request.send())
return .success(result: response)
} catch let e {
return .failure(message: e.localizedDescription)
}
}

func sourceFiles() -> [String] {
Expand Down

0 comments on commit 82e8020

Please sign in to comment.