Please provide a succinct description of the issue.
Repro steps
Provide the steps required to reproduce the problem:
- Checkout
lsp branch
build.cmd -c Debug or just build FSharp.Compiler.LanguageServer project
Expected behavior
Build completes successfully
Actual behavior
We get
error FS0192 : internal error : multiple methods named AddSingleton appear with identical argument types in type Microsoft.Extensions.DependencyInjection.ServiceCollectionSer
viceExtensions [D:\code\fsharp\src\FSharp.Compiler.LanguageServer\FSharp.Compiler.LanguageServer.fsproj]
Related information
Here's the code that triggers the error:
|
let _ = |
|
serviceCollection |
|
.AddSingleton(initialWorkspace) |
|
.AddSingleton<ContextHolder>() |
|
.AddSingleton<IMethodHandler, InitializeHandler<InitializeParams, InitializeResult, FSharpRequestContext>>() |
|
.AddSingleton<IMethodHandler, InitializedHandler<InitializedParams, FSharpRequestContext>>() |
|
.AddSingleton<IMethodHandler, DocumentStateHandler>() |
|
.AddSingleton<IMethodHandler, LanguageFeaturesHandler>() |
|
.AddSingleton<ILspLogger>(logger) |
|
.AddSingleton<IRequestContextFactory<FSharpRequestContext>, FShapRequestContextFactory>() |
|
.AddSingleton<IHandlerProvider>(fun _ -> this.GetBaseHandlerProvider()) |
|
.AddSingleton<IInitializeManager<InitializeParams, InitializeResult>, CapabilitiesManager>() |
|
.AddSingleton(this) |
|
.AddSingleton<ILifeCycleManager>(new LspServiceLifeCycleManager()) |
Please provide a succinct description of the issue.
Repro steps
Provide the steps required to reproduce the problem:
lspbranchbuild.cmd -c Debugor just buildFSharp.Compiler.LanguageServerprojectExpected behavior
Build completes successfully
Actual behavior
We get
Related information
Here's the code that triggers the error:
fsharp/src/FSharp.Compiler.LanguageServer/FSharpLanguageServer.fs
Lines 46 to 59 in c1486be