Skip to content

No description is provided for a completion item with a quote in its name #13194

Description

@auduchinok

DeclarationListItem.Description fails to provide any info for items that contain quotes in their names due to an exception:

CompositionError "internal error: 'doc/members/member[@name='M:FSharpx.StringModule.normalize'(System.Text.NormalizationForm,System.String)']' has an invalid token.
Stack Trace
System.Xml.XPath.XPathException: 'doc/members/member[@name='M:FSharpx.StringModule.normalize'(System.Text.NormalizationForm,System.String)']' has an invalid token.
   at MS.Internal.Xml.XPath.XPathParser.CheckToken(LexKind t)
   at MS.Internal.Xml.XPath.XPathParser.ParsePredicate(AstNode qyInput)
   at MS.Internal.Xml.XPath.XPathParser.ParseStep(AstNode qyInput)
   at MS.Internal.Xml.XPath.XPathParser.ParseRelativeLocationPath(AstNode qyInput)
   at MS.Internal.Xml.XPath.XPathParser.ParsePathExpr(AstNode qyInput)
   at MS.Internal.Xml.XPath.XPathParser.ParseUnionExpr(AstNode qyInput)
   at MS.Internal.Xml.XPath.XPathParser.ParseMultiplicativeExpr(AstNode qyInput)
   at MS.Internal.Xml.XPath.XPathParser.ParseAdditiveExpr(AstNode qyInput)
   at MS.Internal.Xml.XPath.XPathParser.ParseRelationalExpr(AstNode qyInput)
   at MS.Internal.Xml.XPath.XPathParser.ParseEqualityExpr(AstNode qyInput)
   at MS.Internal.Xml.XPath.XPathParser.ParseAndExpr(AstNode qyInput)
   at MS.Internal.Xml.XPath.XPathParser.ParseOrExpr(AstNode qyInput)
   at MS.Internal.Xml.XPath.XPathParser.ParseExpresion(AstNode qyInput)
   at MS.Internal.Xml.XPath.XPathParser.ParseXPathExpresion(String xpathExpresion)
   at System.Xml.XPath.XPathExpression.Compile(String xpath, IXmlNamespaceResolver nsResolver)
   at System.Xml.XPath.XPathNavigator.Select(String xpath)
   at System.Xml.XmlNode.SelectNodes(String xpath)
   at System.Xml.XmlNode.SelectSingleNode(String xpath)
   at <StartupCode$FSharp-Compiler-Service>.$XmlDoc.clo@284-27.Invoke(XmlDocument doc) in C:\Developer\fsharp\src\fsharp\XmlDoc.fs:line 285
   at FSharp.Compiler.Xml.XmlDocumentationInfo.TryGetXmlDocBySig(String xmlDocSig) in C:\Developer\fsharp\src\fsharp\XmlDoc.fs:line 291
   at FSharp.Compiler.Symbols.SymbolHelpers.GetXmlDocFromLoader(InfoReader infoReader, FSharpXmlDoc xmlDoc) in C:\Developer\fsharp\src\fsharp\symbols\SymbolHelpers.fs:line 420
   at FSharp.Compiler.Symbols.SymbolHelpers.GetXmlCommentForItem(InfoReader infoReader, Range m, Item item) in C:\Developer\fsharp\src\fsharp\symbols\SymbolHelpers.fs:line 691
   at FSharp.Compiler.EditorServices.DeclarationListHelpers.FormatItemDescriptionToToolTipElement(Boolean displayFullName, InfoReader infoReader, AccessorDomain ad, Range m, DisplayEnv denv, ItemWithInst item) in C:\Developer\fsharp\src\fsharp\service\ServiceDeclarationLists.fs:line 152
   at FSharp.Compiler.EditorServices.DeclarationListHelpers.FormatStructuredDescriptionOfItem@456.Invoke(Unit unitVar0) in C:\Developer\fsharp\src\fsharp\service\ServiceDeclarationLists.fs:line 456
   at FSharp.Compiler.Diagnostics.ErrorScope.Protect[a](Range m, FSharpFunc`2 f, FSharpFunc`2 err) in C:\Developer\fsharp\src\fsharp\symbols\SymbolHelpers.fs:line 147
"

An easy repro is referencing FSharpx.Extras and trying to use functions from it:

Screenshot 2022-05-25 at 13 51 28

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions