-
Notifications
You must be signed in to change notification settings - Fork 426
Closed
Description
This is probably more of a question/note to @david-driscoll . I am trying to bring back unit test functionality to emacs/lsp-mode of which one attempt was #1965 , but then I realized you have already aded interop functionality added with 26e08ce (Upgrade to the latest lsp library). So I am trying to use that.
But then when trying to invoke, e.g. o#/checkalivestatus
and I get this response. The same (or similar error) is raised for other handlers as well. Is this something to do with the server implemention (a bug) or rather an incorrect invocation of the handler? Do you have some code (in vscode or elsewhere) that uses this interop that I could refer to?
The error raised on invocation follows:
lsp-request: Internal Error - System.InvalidOperationException: Error constructing handler for request of type MediatR.IRequestHandler‘2[OmniSharp.Extensions.JsonRpc.DelegatingRequest‘1[Newtonsoft.Json.Linq.JToken],MediatR.Unit]. Register your handlers with the container. See the samples in GitHub for examples. ---> DryIoc.ContainerException: code: Error.NoConversionOperatorFoundWhenInterpretingTheConvertExpression;
message: There is no explicit or implicit conversion operator found when interpreting OmniSharp.Extensions.JsonRpc.DelegatingJsonRequestHandler to MediatR.IRequestHandler<OmniSharp.Extensions.JsonRpc.DelegatingRequest<Newtonsoft.Json.Linq.JToken>, MediatR.Unit> in expression: Convert(value(OmniSharp.Extensions.JsonRpc.DelegatingJsonRequestHandler), IRequestHandler‘2)
at DryIoc.Throw.It (System.Int32 error, System.Object arg0, System.Object arg1, System.Object arg2, System.Object arg3) [0x00012] in <fba9e575570149efaee3484292339424>:0
at DryIoc.Converter.ConvertWithOperator (System.Object source, System.Type targetType, FastExpressionCompiler.LightExpression.Expression expr) [0x0003a] in <fba9e575570149efaee3484292339424>:0
at DryIoc.Interpreter.TryInterpret (DryIoc.IResolverContext r, FastExpressionCompiler.LightExpression.Expression expr, System.Object paramExprs, System.Object paramValues, DryIoc.Interpreter+ParentLambdaArgs parentArgs, System.Boolean useFec, System.Object& result) [0x005dd] in <fba9e575570149efaee3484292339424>:0
at DryIoc.Interpreter.TryInterpretAndUnwrapContainerException (DryIoc.IResolverContext r, FastExpressionCompiler.LightExpression.Expression expr, System.Boolean useFec, System.Object& result) [0x00000] in <fba9e575570149efaee3484292339424>:0
at DryIoc.Container.ResolveAndCache (System.Int32 serviceTypeHash, System.Type serviceType, DryIoc.IfUnresolved ifUnresolved) [0x00106] in <fba9e575570149efaee3484292339424>:0
at DryIoc.Container.DryIoc.IResolver.Resolve (System.Type serviceType, DryIoc.IfUnresolved ifUnresolved) [0x00116] in <fba9e575570149efaee3484292339424>:0
at DryIoc.Resolver.Resolve (DryIoc.IResolver resolver, System.Type serviceType) [0x00000] in <fba9e575570149efaee3484292339424>:0
at MediatR.ServiceFactoryExtensions.GetInstance[T] (MediatR.ServiceFactory factory) [0x00000] in <856ae299ee314304bc3affd17d8d5868>:0
at MediatR.Internal.RequestHandlerBase.GetHandler[THandler] (MediatR.ServiceFactory factory) [0x00000] in <856ae299ee314304bc3affd17d8d5868>:0
--- End of inner exception stack trace ---
at MediatR.Internal.RequestHandlerBase.GetHandler[THandler] (MediatR.ServiceFactory factory) [0x00024] in <856ae299ee314304bc3affd17d8d5868>:0
at MediatR.Internal.RequestHandlerWrapperImpl‘2+<>c__DisplayClass1_0[TRequest,TResponse].<Handle>g__Handler|0 () [0x00000] in <856ae299ee314304bc3affd17d8d5868>:0
at OmniSharp.Extensions.LanguageServer.Server.Pipelines.ResolveCommandPipeline‘2[TRequest,TResponse].Handle (TRequest request, System.Threading.CancellationToken cancellationToken, MediatR.RequestHandlerDelegate‘1[TResponse] next) [0x00011] in <1238dd34c3f54a5080acfb1001dda78e>:0
at MediatR.Pipeline.RequestPreProcessorBehavior‘2[TRequest,TResponse].Handle (TRequest request, System.Threading.CancellationToken cancellationToken, MediatR.RequestHandlerDelegate‘1[TResponse] next) [0x0013e] in <856ae299ee314304bc3affd17d8d5868>:0
at MediatR.Pipeline.RequestPostProcessorBehavior‘2[TRequest,TResponse].Handle (TRequest request, System.Threading.CancellationToken cancellationToken, MediatR.RequestHandlerDelegate‘1[TResponse] next) [0x0007e] in <856ae299ee314304bc3affd17d8d5868>:0
at MediatR.Pipeline.RequestExceptionProcessorBehavior‘2[TRequest,TResponse].Handle (TRequest request, System.Threading.CancellationToken cancellationToken, MediatR.RequestHandlerDelegate‘1[TResponse] next) [0x00084] in <856ae299ee314304bc3affd17d8d5868>:0
at MediatR.Pipeline.RequestExceptionProcessorBehavior‘2[TRequest,TResponse].Handle (TRequest request, System.Threading.CancellationToken cancellationToken, MediatR.RequestHandlerDelegate‘1[TResponse] next) [0x00276] in <856ae299ee314304bc3affd17d8d5868>:0
at MediatR.Pipeline.RequestExceptionActionProcessorBehavior‘2[TRequest,TResponse].Handle (TRequest request, System.Threading.CancellationToken cancellationToken, MediatR.RequestHandlerDelegate‘1[TResponse] next) [0x00084] in <856ae299ee314304bc3affd17d8d5868>:0
at MediatR.Pipeline.RequestExceptionActionProcessorBehavior‘2[TRequest,TResponse].Handle (TRequest request, System.Threading.CancellationToken cancellationToken, MediatR.RequestHandlerDelegate‘1[TResponse] next) [0x001e7] in <856ae299ee314304bc3affd17d8d5868>:0
at OmniSharp.Extensions.JsonRpc.RequestRouterBase‘1[TDescriptor].<RouteRequest>g__InnerRoute|5_0 (Microsoft.Extensions.DependencyInjection.IServiceScopeFactory serviceScopeFactory, OmniSharp.Extensions.JsonRpc.Server.Request request, TDescriptor descriptor, System.Object params, System.Threading.CancellationToken token, Microsoft.Extensions.Logging.ILogger logger) [0x000f2] in <fba9e575570149efaee3484292339424>:0
at OmniSharp.Extensions.JsonRpc.RequestRouterBase‘1[TDescriptor].RouteRequest (OmniSharp.Extensions.JsonRpc.IRequestDescriptor‘1[TDescriptor] descriptors, OmniSharp.Extensions.JsonRpc.Server.Request request, System.Threading.CancellationToken token) [0x005f3] in <fba9e575570149efaee3484292339424>:0
at OmniSharp.Extensions.JsonRpc.InputHandler+<>c__DisplayClass38_0.<RouteRequest>b__5 (System.Threading.CancellationToken ct) [0x000e8] in <fba9e575570149efaee3484292339424>:0
Metadata
Metadata
Assignees
Labels
No labels