-
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactorings to complement large PR in LanguageServerProtocol (#9)
* Update for refactored LanguageServerClient * Message framing moved to generic wrapper in LanguageServerProtocol * Make RestartingServerError public * Refactor ordered event stream handling * hylo-lsp local JSONRPC directory build * Fix non-mac build * Use released JSONRPC 0.9.0 version * Update to match refactor * Refactor * Update example code in readme * Pin to specific version to get tests to run again * Package.swift formatting * Bump swift version to 5.9 * Refactor to not gate FileHandle stuff on ProcessEnv * Depend on LSP 0.11.0 --------- Co-authored-by: Matt <[email protected]>
- Loading branch information
1 parent
b6e5b48
commit eda2fdc
Showing
13 changed files
with
150 additions
and
159 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,70 +1,67 @@ | ||
{ | ||
"object": { | ||
"pins": [ | ||
{ | ||
"package": "FSEventsWrapper", | ||
"repositoryURL": "https://github.com/Frizlab/FSEventsWrapper", | ||
"state": { | ||
"branch": null, | ||
"revision": "70bbea4b108221fcabfce8dbced8502831c0ae04", | ||
"version": "2.1.0" | ||
} | ||
}, | ||
{ | ||
"package": "GlobPattern", | ||
"repositoryURL": "https://github.com/ChimeHQ/GlobPattern", | ||
"state": { | ||
"branch": null, | ||
"revision": "4ebb9e89e07cc475efa74f87dc6d21f4a9e060f8", | ||
"version": "0.1.1" | ||
} | ||
}, | ||
{ | ||
"package": "JSONRPC", | ||
"repositoryURL": "https://github.com/ChimeHQ/JSONRPC", | ||
"state": { | ||
"branch": null, | ||
"revision": "5f48cfdc1c4ce70cd50d996a95ee60d26aa72fee", | ||
"version": "0.8.0" | ||
} | ||
}, | ||
{ | ||
"package": "LanguageServerProtocol", | ||
"repositoryURL": "https://github.com/ChimeHQ/LanguageServerProtocol", | ||
"state": { | ||
"branch": null, | ||
"revision": "a244efe43ac7a42577b4afd9ccc43b5223c7f18d", | ||
"version": "0.10.0" | ||
} | ||
}, | ||
{ | ||
"package": "ProcessEnv", | ||
"repositoryURL": "https://github.com/ChimeHQ/ProcessEnv", | ||
"state": { | ||
"branch": null, | ||
"revision": "83f1ebc9dd6fb1db0bd89a3fcae00488a0f3fdd9", | ||
"version": "1.0.0" | ||
} | ||
}, | ||
{ | ||
"package": "Queue", | ||
"repositoryURL": "https://github.com/mattmassicotte/Queue", | ||
"state": { | ||
"branch": null, | ||
"revision": "8d6f936097888f97011610ced40313655dc5948d", | ||
"version": "0.1.4" | ||
} | ||
}, | ||
{ | ||
"package": "Semaphore", | ||
"repositoryURL": "https://github.com/groue/Semaphore", | ||
"state": { | ||
"branch": null, | ||
"revision": "f1c4a0acabeb591068dea6cffdd39660b86dec28", | ||
"version": "0.0.8" | ||
} | ||
"pins" : [ | ||
{ | ||
"identity" : "fseventswrapper", | ||
"kind" : "remoteSourceControl", | ||
"location" : "https://github.com/Frizlab/FSEventsWrapper", | ||
"state" : { | ||
"revision" : "70bbea4b108221fcabfce8dbced8502831c0ae04", | ||
"version" : "2.1.0" | ||
} | ||
] | ||
}, | ||
"version": 1 | ||
}, | ||
{ | ||
"identity" : "globpattern", | ||
"kind" : "remoteSourceControl", | ||
"location" : "https://github.com/ChimeHQ/GlobPattern", | ||
"state" : { | ||
"revision" : "4ebb9e89e07cc475efa74f87dc6d21f4a9e060f8", | ||
"version" : "0.1.1" | ||
} | ||
}, | ||
{ | ||
"identity" : "jsonrpc", | ||
"kind" : "remoteSourceControl", | ||
"location" : "https://github.com/ChimeHQ/JSONRPC", | ||
"state" : { | ||
"revision" : "c6ec759d41a76ac88fe7327c41a77d9033943374", | ||
"version" : "0.9.0" | ||
} | ||
}, | ||
{ | ||
"identity" : "languageserverprotocol", | ||
"kind" : "remoteSourceControl", | ||
"location" : "https://github.com/ChimeHQ/LanguageServerProtocol", | ||
"state" : { | ||
"revision" : "a355005e6c00775bb567e1d5927a4d57423474c9" | ||
} | ||
}, | ||
{ | ||
"identity" : "processenv", | ||
"kind" : "remoteSourceControl", | ||
"location" : "https://github.com/ChimeHQ/ProcessEnv", | ||
"state" : { | ||
"revision" : "83f1ebc9dd6fb1db0bd89a3fcae00488a0f3fdd9", | ||
"version" : "1.0.0" | ||
} | ||
}, | ||
{ | ||
"identity" : "queue", | ||
"kind" : "remoteSourceControl", | ||
"location" : "https://github.com/mattmassicotte/Queue", | ||
"state" : { | ||
"revision" : "8d6f936097888f97011610ced40313655dc5948d", | ||
"version" : "0.1.4" | ||
} | ||
}, | ||
{ | ||
"identity" : "semaphore", | ||
"kind" : "remoteSourceControl", | ||
"location" : "https://github.com/groue/Semaphore", | ||
"state" : { | ||
"revision" : "f1c4a0acabeb591068dea6cffdd39660b86dec28", | ||
"version" : "0.0.8" | ||
} | ||
} | ||
], | ||
"version" : 2 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import Foundation | ||
|
||
extension FileHandle { | ||
public var dataStream: AsyncStream<Data> { | ||
let (stream, continuation) = AsyncStream<Data>.makeStream() | ||
|
||
readabilityHandler = { handle in | ||
let data = handle.availableData | ||
|
||
if data.isEmpty { | ||
handle.readabilityHandler = nil | ||
continuation.finish() | ||
return | ||
} | ||
|
||
continuation.yield(data) | ||
} | ||
|
||
return stream | ||
} | ||
} |
Oops, something went wrong.