Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compiler errors in installed package #11

Open
voxoid0 opened this issue Nov 28, 2023 · 1 comment
Open

Compiler errors in installed package #11

voxoid0 opened this issue Nov 28, 2023 · 1 comment

Comments

@voxoid0
Copy link

voxoid0 commented Nov 28, 2023

Hello, do you know why I would get the following compile errors after installing the LanguageClient package into a new XCode CLI project?

.../SourcePackages/checkouts/LanguageServerProtocol/Sources/LanguageServerProtocol/Additions/JSONRPCServer.swift:275:84: error: 'RequestHandler' is not a member type of actor 'JSONRPC.JSONRPCSession'
        private nonisolated func makeErrorOnlyHandler(_ handler: @escaping JSONRPCSession.RequestHandler) -> ServerRequest.ErrorOnlyHandler {
                                                                           ~~~~~~~~~~~~~~ ^
.../SourcePackages/checkouts/JSONRPC/Sources/JSONRPC/JSONRPCSession.swift:46:14: note: 'JSONRPCSession' declared here
public actor JSONRPCSession {
             ^
.../SourcePackages/checkouts/LanguageServerProtocol/Sources/LanguageServerProtocol/Additions/JSONRPCServer.swift:285:78: error: 'RequestHandler' is not a member type of actor 'JSONRPC.JSONRPCSession'
        private nonisolated func makeHandler<T>(_ handler: @escaping JSONRPCSession.RequestHandler) -> ServerRequest.Handler<T> {
                                                                     ~~~~~~~~~~~~~~ ^
.../SourcePackages/checkouts/JSONRPC/Sources/JSONRPC/JSONRPCSession.swift:46:14: note: 'JSONRPCSession' declared here
public actor JSONRPCSession {
             ^
.../SourcePackages/checkouts/LanguageServerProtocol/Sources/LanguageServerProtocol/Additions/JSONRPCServer.swift:293:108: error: 'RequestHandler' is not a member type of actor 'JSONRPC.JSONRPCSession'
        private func handleRequest(_ anyRequest: AnyJSONRPCRequest, data: Data, handler: @escaping JSONRPCSession.RequestHandler) {
                                                                                                   ~~~~~~~~~~~~~~ ^
.../SourcePackages/checkouts/JSONRPC/Sources/JSONRPC/JSONRPCSession.swift:46:14: note: 'JSONRPCSession' declared here
public actor JSONRPCSession {
             ^
.../SourcePackages/checkouts/LanguageServerProtocol/Sources/LanguageServerProtocol/Additions/JSONRPCServer.swift:54:36: error: value of type 'JSONRPCSession' has no member 'notificationSequence'
                let noteSequence = await session.notificationSequence
                                         ~~~~~~~ ^~~~~~~~~~~~~~~~~~~~
.../SourcePackages/checkouts/LanguageServerProtocol/Sources/LanguageServerProtocol/Additions/JSONRPCServer.swift:66:35: error: value of type 'JSONRPCSession' has no member 'requestSequence'
                let reqSequence = await session.requestSequence
                                        ~~~~~~~ ^~~~~~~~~~~~~~~
.../SourcePackages/checkouts/LanguageServerProtocol/Sources/LanguageServerProtocol/Additions/JSONRPCServer.swift:54:22: warning: no 'async' operations occur within 'await' expression
                let noteSequence = await session.notificationSequence
                                   ^
.../SourcePackages/checkouts/LanguageServerProtocol/Sources/LanguageServerProtocol/Additions/JSONRPCServer.swift:278:20: error: cannot infer contextual base in reference to member 'failure'
                                await handler(.failure(error))
                                              ~^~~~~~~
@mattmassicotte
Copy link
Contributor

Ack.

This is caused by using a version of JSONRPC is that is too new. The problem is being fixed for real with #9.

For right now, if you explicitly add a dependency on https://github.com/ChimeHQ/JSONRPC with version 0.8.1 everything should work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants