Records break syntax highlighting
333fred opened this issue · comments
Fred Silberberg commented
System.Collections.Generic.KeyNotFoundException: The given key 'record name' was not present in the dictionary.\
at System.Collections.Generic.Dictionary`2[TKey,TValue].get_Item (TKey key) [0x0001e] in <9f0df102fe6e4cfea29d2e46f585d8a5>:0 \
at OmniSharp.Roslyn.CSharp.Services.SemanticHighlight.SemanticHighlightService.CreateSemanticSpan (System.Collections.Generic.IEnumerable`1[T] results, Microsoft.CodeAnalysis.Text.TextLineCollection lines) [0x000db] in <88f2819c12ee464e94d6700e849310cf>:0 \
at OmniSharp.Roslyn.CSharp.Services.SemanticHighlight.SemanticHighlightService+<>c.<Handle>b__1_2 (System.Linq.IGrouping`2[TKey,TElement] grouping) [0x0000c] in <88f2819c12ee464e94d6700e849310cf>:0 \
at System.Linq.Enumerable+SelectEnumerableIterator`2[TSource,TResult].ToArray () [0x0001d] in <9ba54d07696a449db4a4279fc05aa435>:0 \
at System.Linq.Enumerable.ToArray[TSource] (System.Collections.Generic.IEnumerable`1[T] source) [0x0001f] in <9ba54d07696a449db4a4279fc05aa435>:0 \
at OmniSharp.Roslyn.CSharp.Services.SemanticHighlight.SemanticHighlightService.Handle (OmniSharp.Models.SemanticHighlight.SemanticHighlightRequest request) [0x002fa] in <88f2819c12ee464e94d6700e849310cf>:0 \
at OmniSharp.Endpoint.EndpointHandler`2[TRequest,TResponse].GetFirstNotEmptyResponseFromHandlers (OmniSharp.Endpoint.Exports.ExportHandler`2[TRequest,TResponse][] handlers, TRequest request) [0x00099] in <954ed0cf974c4f038a543c1ed1dfaa98>:0 \
at OmniSharp.Endpoint.EndpointHandler`2[TRequest,TResponse].HandleRequestForLanguage (System.String language, TRequest request, OmniSharp.Protocol.RequestPacket packet) [0x00163] in <954ed0cf974c4f038a543c1ed1dfaa98>:0 \
at OmniSharp.Endpoint.EndpointHandler`2[TRequest,TResponse].Process (OmniSharp.Protocol.RequestPacket packet, OmniSharp.Endpoint.LanguageModel model, Newtonsoft.Json.Linq.JToken requestObject) [0x0024b] in <954ed0cf974c4f038a543c1ed1dfaa98>:0 \
at OmniSharp.Stdio.Host.HandleRequest (System.String json, Microsoft.Extensions.Logging.ILogger logger) [0x000e7] in <60d68949688146858c57cddcbc6c56f5>:0
When a record is used as a variable or a type declaration. Looks like the semantic highlight service needs to be updated.
Timo commented
Fred Silberberg commented
You need to set your omnisharp path to latest.
Timo commented
Thanks, that did the trick :)