This may not directly be a CodeLens issue because all C# ends up dying after rename as well.
Throwing this into the LSP Preview 1 milestone even though we're overbooked because this is a pretty nasty bug given all C# IntelliSense ends up dying.
I'm unable to reproduce this. Looks like @NTaylorMullen's fix for https://github.com/dotnet/aspnetcore-tooling/pull/1506 may have fixed this as well.
I'm unable to reproduce this. Looks like @NTaylorMullen's fix for dotnet/aspnetcore-tooling#1506 may have fixed this as well.
Feel free to close out whenever you feel is right 馃槃
Looks like this can still be reproduced on macOS. Re-opening this but since this is low priority, moving this to backlog.
This also explodes provideCodeActions request. Pulling this back in to the next release to try and find a mitigation for this. @ryanbrandenburg FYI.
Here is the stacktraces,
StackTraces
--------------------------------------------------------------------------------
Razor.VSCode version 1.0.0-alpha3-5.0.0-alpha.1.20073.7
--------------------------------------------------------------------------------
Razor's trace level is currently set to 'Off'
- To change Razor's trace level set 'razor.trace' to 'Off', 'Messages' or 'Verbose' and then restart VSCode.
- To report issues invoke the 'Report a Razor issue' command via the command palette.
-----------------------------------------------------------------------------------------------------------------------------
[Client - 12:45:10 PM] (Warning) resolveCodeLens failed with Error: Internal Error - System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values. (Parameter 'index')
at Microsoft.CodeAnalysis.Text.SourceText.LineInfo.get_Item(Int32 index)
at Microsoft.CodeAnalysis.Text.TextLineCollection.GetPosition(LinePosition position)
at Microsoft.AspNetCore.Razor.LanguageServer.RazorLanguageEndpoint.Handle(RazorLanguageQueryParams request, CancellationToken cancellationToken) in /_/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/RazorLanguageEndpoint.cs:line 135
at OmniSharp.Extensions.LanguageServer.Server.Pipelines.ResolveCommandPipeline`2.Handle(TRequest request, CancellationToken cancellationToken, RequestHandlerDelegate`1 next)
at MediatR.Pipeline.RequestPostProcessorBehavior`2.Handle(TRequest request, CancellationToken cancellationToken, RequestHandlerDelegate`1 next)
at MediatR.Pipeline.RequestPreProcessorBehavior`2.Handle(TRequest request, CancellationToken cancellationToken, RequestHandlerDelegate`1 next)
at OmniSharp.Extensions.JsonRpc.RequestRouterBase`1.RouteRequest(TDescriptor descriptor, Request request, CancellationToken token)
[Client - 12:45:10 PM] (Warning) resolveCodeLens failed with Error: Internal Error - System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values. (Parameter 'index')
at Microsoft.CodeAnalysis.Text.SourceText.LineInfo.get_Item(Int32 index)
at Microsoft.CodeAnalysis.Text.TextLineCollection.GetPosition(LinePosition position)
at Microsoft.AspNetCore.Razor.LanguageServer.RazorLanguageEndpoint.Handle(RazorLanguageQueryParams request, CancellationToken cancellationToken) in /_/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/RazorLanguageEndpoint.cs:line 135
at OmniSharp.Extensions.LanguageServer.Server.Pipelines.ResolveCommandPipeline`2.Handle(TRequest request, CancellationToken cancellationToken, RequestHandlerDelegate`1 next)
at MediatR.Pipeline.RequestPostProcessorBehavior`2.Handle(TRequest request, CancellationToken cancellationToken, RequestHandlerDelegate`1 next)
at MediatR.Pipeline.RequestPreProcessorBehavior`2.Handle(TRequest request, CancellationToken cancellationToken, RequestHandlerDelegate`1 next)
at OmniSharp.Extensions.JsonRpc.RequestRouterBase`1.RouteRequest(TDescriptor descriptor, Request request, CancellationToken token)
[Client - 12:45:10 PM] (Warning) resolveCodeLens failed with Error: Internal Error - System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values. (Parameter 'index')
at Microsoft.CodeAnalysis.Text.SourceText.LineInfo.get_Item(Int32 index)
at Microsoft.CodeAnalysis.Text.TextLineCollection.GetPosition(LinePosition position)
at Microsoft.AspNetCore.Razor.LanguageServer.RazorLanguageEndpoint.Handle(RazorLanguageQueryParams request, CancellationToken cancellationToken) in /_/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/RazorLanguageEndpoint.cs:line 135
at OmniSharp.Extensions.LanguageServer.Server.Pipelines.ResolveCommandPipeline`2.Handle(TRequest request, CancellationToken cancellationToken, RequestHandlerDelegate`1 next)
at MediatR.Pipeline.RequestPostProcessorBehavior`2.Handle(TRequest request, CancellationToken cancellationToken, RequestHandlerDelegate`1 next)
at MediatR.Pipeline.RequestPreProcessorBehavior`2.Handle(TRequest request, CancellationToken cancellationToken, RequestHandlerDelegate`1 next)
at OmniSharp.Extensions.JsonRpc.RequestRouterBase`1.RouteRequest(TDescriptor descriptor, Request request, CancellationToken token)
[Client - 12:45:10 PM] (Warning) provideCodeActions failed with Error: Internal Error - System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values. (Parameter 'index')
at Microsoft.CodeAnalysis.Text.SourceText.LineInfo.get_Item(Int32 index)
at Microsoft.CodeAnalysis.Text.TextLineCollection.GetPosition(LinePosition position)
at Microsoft.AspNetCore.Razor.LanguageServer.RazorLanguageEndpoint.Handle(RazorLanguageQueryParams request, CancellationToken cancellationToken) in /_/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/RazorLanguageEndpoint.cs:line 135
at OmniSharp.Extensions.LanguageServer.Server.Pipelines.ResolveCommandPipeline`2.Handle(TRequest request, CancellationToken cancellationToken, RequestHandlerDelegate`1 next)
at MediatR.Pipeline.RequestPostProcessorBehavior`2.Handle(TRequest request, CancellationToken cancellationToken, RequestHandlerDelegate`1 next)
at MediatR.Pipeline.RequestPreProcessorBehavior`2.Handle(TRequest request, CancellationToken cancellationToken, RequestHandlerDelegate`1 next)
at OmniSharp.Extensions.JsonRpc.RequestRouterBase`1.RouteRequest(TDescriptor descriptor, Request request, CancellationToken token)
[Client - 12:45:10 PM] (Warning) provideCodeActions failed with Error: Internal Error - System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values. (Parameter 'index')
at Microsoft.CodeAnalysis.Text.SourceText.LineInfo.get_Item(Int32 index)
at Microsoft.CodeAnalysis.Text.TextLineCollection.GetPosition(LinePosition position)
at Microsoft.AspNetCore.Razor.LanguageServer.RazorLanguageEndpoint.Handle(RazorLanguageQueryParams request, CancellationToken cancellationToken) in /_/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/RazorLanguageEndpoint.cs:line 135
at OmniSharp.Extensions.LanguageServer.Server.Pipelines.ResolveCommandPipeline`2.Handle(TRequest request, CancellationToken cancellationToken, RequestHandlerDelegate`1 next)
at MediatR.Pipeline.RequestPostProcessorBehavior`2.Handle(TRequest request, CancellationToken cancellationToken, RequestHandlerDelegate`1 next)
at MediatR.Pipeline.RequestPreProcessorBehavior`2.Handle(TRequest request, CancellationToken cancellationToken, RequestHandlerDelegate`1 next)
at OmniSharp.Extensions.JsonRpc.RequestRouterBase`1.RouteRequest(TDescriptor descriptor, Request request, CancellationToken token)
[Client - 12:45:10 PM] (Warning) provideCodeActions failed with Error: Internal Error - System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values. (Parameter 'index')
at Microsoft.CodeAnalysis.Text.SourceText.LineInfo.get_Item(Int32 index)
at Microsoft.CodeAnalysis.Text.TextLineCollection.GetPosition(LinePosition position)
at Microsoft.AspNetCore.Razor.LanguageServer.RazorLanguageEndpoint.Handle(RazorLanguageQueryParams request, CancellationToken cancellationToken) in /_/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/RazorLanguageEndpoint.cs:line 135
at OmniSharp.Extensions.LanguageServer.Server.Pipelines.ResolveCommandPipeline`2.Handle(TRequest request, CancellationToken cancellationToken, RequestHandlerDelegate`1 next)
at MediatR.Pipeline.RequestPostProcessorBehavior`2.Handle(TRequest request, CancellationToken cancellationToken, RequestHandlerDelegate`1 next)
at MediatR.Pipeline.RequestPreProcessorBehavior`2.Handle(TRequest request, CancellationToken cancellationToken, RequestHandlerDelegate`1 next)
at OmniSharp.Extensions.JsonRpc.RequestRouterBase`1.RouteRequest(TDescriptor descriptor, Request request, CancellationToken token)
[Client - 12:45:10 PM] (Warning) provideCodeActions failed with Error: Internal Error - System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values. (Parameter 'index')
at Microsoft.CodeAnalysis.Text.SourceText.LineInfo.get_Item(Int32 index)
at Microsoft.CodeAnalysis.Text.TextLineCollection.GetPosition(LinePosition position)
at Microsoft.AspNetCore.Razor.LanguageServer.RazorLanguageEndpoint.Handle(RazorLanguageQueryParams request, CancellationToken cancellationToken) in /_/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/RazorLanguageEndpoint.cs:line 135
at OmniSharp.Extensions.LanguageServer.Server.Pipelines.ResolveCommandPipeline`2.Handle(TRequest request, CancellationToken cancellationToken, RequestHandlerDelegate`1 next)
at MediatR.Pipeline.RequestPostProcessorBehavior`2.Handle(TRequest request, CancellationToken cancellationToken, RequestHandlerDelegate`1 next)
at MediatR.Pipeline.RequestPreProcessorBehavior`2.Handle(TRequest request, CancellationToken cancellationToken, RequestHandlerDelegate`1 next)
at OmniSharp.Extensions.JsonRpc.RequestRouterBase`1.RouteRequest(TDescriptor descriptor, Request request, CancellationToken token)
[Error - 12:45:10 PM] Request textDocument/hover failed.
Message: Internal Error - System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values. (Parameter 'index')
at Microsoft.CodeAnalysis.Text.SourceText.LineInfo.get_Item(Int32 index)
at Microsoft.CodeAnalysis.Text.TextLineCollection.GetPosition(LinePosition position)
at Microsoft.AspNetCore.Razor.LanguageServer.Hover.RazorHoverEndpoint.Handle(HoverParams request, CancellationToken cancellationToken) in /_/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Hover/RazorHoverEndpoint.cs:line 97
at OmniSharp.Extensions.LanguageServer.Server.Pipelines.ResolveCommandPipeline`2.Handle(TRequest request, CancellationToken cancellationToken, RequestHandlerDelegate`1 next)
at MediatR.Pipeline.RequestPostProcessorBehavior`2.Handle(TRequest request, CancellationToken cancellationToken, RequestHandlerDelegate`1 next)
at MediatR.Pipeline.RequestPreProcessorBehavior`2.Handle(TRequest request, CancellationToken cancellationToken, RequestHandlerDelegate`1 next)
at OmniSharp.Extensions.JsonRpc.RequestRouterBase`1.RouteRequest(TDescriptor descriptor, Request request, CancellationToken token)
Code: -32602
[Error - 12:45:10 PM] Request textDocument/hover failed.
Message: Internal Error - System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values. (Parameter 'index')
at Microsoft.CodeAnalysis.Text.SourceText.LineInfo.get_Item(Int32 index)
at Microsoft.CodeAnalysis.Text.TextLineCollection.GetPosition(LinePosition position)
at Microsoft.AspNetCore.Razor.LanguageServer.Hover.RazorHoverEndpoint.Handle(HoverParams request, CancellationToken cancellationToken) in /_/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Hover/RazorHoverEndpoint.cs:line 97
at OmniSharp.Extensions.LanguageServer.Server.Pipelines.ResolveCommandPipeline`2.Handle(TRequest request, CancellationToken cancellationToken, RequestHandlerDelegate`1 next)
at MediatR.Pipeline.RequestPostProcessorBehavior`2.Handle(TRequest request, CancellationToken cancellationToken, RequestHandlerDelegate`1 next)
at MediatR.Pipeline.RequestPreProcessorBehavior`2.Handle(TRequest request, CancellationToken cancellationToken, RequestHandlerDelegate`1 next)
at OmniSharp.Extensions.JsonRpc.RequestRouterBase`1.RouteRequest(TDescriptor descriptor, Request request, CancellationToken token)
Code: -32602
[Client - 12:45:11 PM] (Warning) provideCodeActions failed with Error: Internal Error - System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values. (Parameter 'index')
at Microsoft.CodeAnalysis.Text.SourceText.LineInfo.get_Item(Int32 index)
at Microsoft.CodeAnalysis.Text.TextLineCollection.GetPosition(LinePosition position)
at Microsoft.AspNetCore.Razor.LanguageServer.RazorLanguageEndpoint.Handle(RazorLanguageQueryParams request, CancellationToken cancellationToken) in /_/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/RazorLanguageEndpoint.cs:line 135
at OmniSharp.Extensions.LanguageServer.Server.Pipelines.ResolveCommandPipeline`2.Handle(TRequest request, CancellationToken cancellationToken, RequestHandlerDelegate`1 next)
at MediatR.Pipeline.RequestPostProcessorBehavior`2.Handle(TRequest request, CancellationToken cancellationToken, RequestHandlerDelegate`1 next)
at MediatR.Pipeline.RequestPreProcessorBehavior`2.Handle(TRequest request, CancellationToken cancellationToken, RequestHandlerDelegate`1 next)
at OmniSharp.Extensions.JsonRpc.RequestRouterBase`1.RouteRequest(TDescriptor descriptor, Request request, CancellationToken token)
[Client - 12:46:14 PM] (Warning) provideCodeActions failed with Error: Internal Error - System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values. (Parameter 'index')
at Microsoft.CodeAnalysis.Text.SourceText.LineInfo.get_Item(Int32 index)
at Microsoft.CodeAnalysis.Text.TextLineCollection.GetPosition(LinePosition position)
at Microsoft.AspNetCore.Razor.LanguageServer.RazorLanguageEndpoint.Handle(RazorLanguageQueryParams request, CancellationToken cancellationToken) in /_/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/RazorLanguageEndpoint.cs:line 135
at OmniSharp.Extensions.LanguageServer.Server.Pipelines.ResolveCommandPipeline`2.Handle(TRequest request, CancellationToken cancellationToken, RequestHandlerDelegate`1 next)
at MediatR.Pipeline.RequestPostProcessorBehavior`2.Handle(TRequest request, CancellationToken cancellationToken, RequestHandlerDelegate`1 next)
at MediatR.Pipeline.RequestPreProcessorBehavior`2.Handle(TRequest request, CancellationToken cancellationToken, RequestHandlerDelegate`1 next)
at OmniSharp.Extensions.JsonRpc.RequestRouterBase`1.RouteRequest(TDescriptor descriptor, Request request, CancellationToken token)
[Error - 12:46:15 PM] Request textDocument/hover failed.
Message: Internal Error - System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values. (Parameter 'index')
at Microsoft.CodeAnalysis.Text.SourceText.LineInfo.get_Item(Int32 index)
at Microsoft.CodeAnalysis.Text.TextLineCollection.GetPosition(LinePosition position)
at Microsoft.AspNetCore.Razor.LanguageServer.Hover.RazorHoverEndpoint.Handle(HoverParams request, CancellationToken cancellationToken) in /_/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Hover/RazorHoverEndpoint.cs:line 97
at OmniSharp.Extensions.LanguageServer.Server.Pipelines.ResolveCommandPipeline`2.Handle(TRequest request, CancellationToken cancellationToken, RequestHandlerDelegate`1 next)
at MediatR.Pipeline.RequestPostProcessorBehavior`2.Handle(TRequest request, CancellationToken cancellationToken, RequestHandlerDelegate`1 next)
at MediatR.Pipeline.RequestPreProcessorBehavior`2.Handle(TRequest request, CancellationToken cancellationToken, RequestHandlerDelegate`1 next)
at OmniSharp.Extensions.JsonRpc.RequestRouterBase`1.RouteRequest(TDescriptor descriptor, Request request, CancellationToken token)
Code: -32602
[Error - 12:46:17 PM] Request textDocument/hover failed.
Message: Internal Error - System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values. (Parameter 'index')
at Microsoft.CodeAnalysis.Text.SourceText.LineInfo.get_Item(Int32 index)
at Microsoft.CodeAnalysis.Text.TextLineCollection.GetPosition(LinePosition position)
at Microsoft.AspNetCore.Razor.LanguageServer.Hover.RazorHoverEndpoint.Handle(HoverParams request, CancellationToken cancellationToken) in /_/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Hover/RazorHoverEndpoint.cs:line 97
at OmniSharp.Extensions.LanguageServer.Server.Pipelines.ResolveCommandPipeline`2.Handle(TRequest request, CancellationToken cancellationToken, RequestHandlerDelegate`1 next)
at MediatR.Pipeline.RequestPostProcessorBehavior`2.Handle(TRequest request, CancellationToken cancellationToken, RequestHandlerDelegate`1 next)
at MediatR.Pipeline.RequestPreProcessorBehavior`2.Handle(TRequest request, CancellationToken cancellationToken, RequestHandlerDelegate`1 next)
at OmniSharp.Extensions.JsonRpc.RequestRouterBase`1.RouteRequest(TDescriptor descriptor, Request request, CancellationToken token)
Code: -32602
[Error - 12:46:18 PM] Request textDocument/hover failed.
Message: Internal Error - System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values. (Parameter 'index')
at Microsoft.CodeAnalysis.Text.SourceText.LineInfo.get_Item(Int32 index)
at Microsoft.CodeAnalysis.Text.TextLineCollection.GetPosition(LinePosition position)
at Microsoft.AspNetCore.Razor.LanguageServer.Hover.RazorHoverEndpoint.Handle(HoverParams request, CancellationToken cancellationToken) in /_/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Hover/RazorHoverEndpoint.cs:line 97
at OmniSharp.Extensions.LanguageServer.Server.Pipelines.ResolveCommandPipeline`2.Handle(TRequest request, CancellationToken cancellationToken, RequestHandlerDelegate`1 next)
at MediatR.Pipeline.RequestPostProcessorBehavior`2.Handle(TRequest request, CancellationToken cancellationToken, RequestHandlerDelegate`1 next)
at MediatR.Pipeline.RequestPreProcessorBehavior`2.Handle(TRequest request, CancellationToken cancellationToken, RequestHandlerDelegate`1 next)
at OmniSharp.Extensions.JsonRpc.RequestRouterBase`1.RouteRequest(TDescriptor descriptor, Request request, CancellationToken token)
Code: -32602
Here is the stacktraces,
Interesting, there's also some hover failures in there as well for similar issues. This screams us not having our SourceText's up-to-date with what's ton the client?