Closed NTaylorMullen closed 2 years ago
Hmm, something seems to be amiss. Looking at LSIF generated / uploaded from the task it looks like hover results aren't being escaped properly during json serialization possibly?
Looking at this hover result:
{"result":{"contents":{"kind":"plaintext","value":"interface Microsoft.VisualStudio.RpcContracts.Editor.ITextEditorSynchronizationServiceContract\r\nThis is a private brokered service running in the main VS process and representing "source of truth" regarding text document content. It provides callers with document content of specific versions and can provide updates as documents are changing. It also applies changes submitted by extensions to documents and text views.\r\n"},"range":{"start":{"line":12,"character":23},"end":{"line":12,"character":64}}},"id":712625,"type":"vertex","label":"hoverResult"}
The quotes "source of truth"
aren't escaped which results in it breaking json deserialization entirely:
Following up to ensure this isn't on the RichNav side
@jasonmalinowski I could reproduce this directly by calling the C# LSIF generator. In the above case the quotes in the docs aren't normal quotes. They're "word" quotes maybe? "fancy" quotes? Lol
Dug into why and you're missing Console.OutputEncoding = Encoding.UTF8;
after setting the console to the output method: https://github.com/dotnet/roslyn/blob/2824abb2fabdc29ede627470b2800ba0d15f787a/src/Features/Lsif/Generator/Program.cs#L46
@NTaylorMullen might be fastest to just submit a PR :)
@NTaylorMullen might be fastest to just submit a PR :)
Already on it, Roslyn takes forever to build though. Maybe I just wont build and wing it😆
Roslyn takes forever to build though.
Version Used:
4.4.0-1.22372.4
Steps to Reproduce:
Expected Behavior: No 0x07 control character generated
Actual Behavior:
Scroll to the right in
value
to see the invalid 0x07 control charactersWhen deserializing this with System.Text.Json you get:
And similarly this fails JSON validation on all web validators