sphinxcontrib-dotnetdomain
sphinxcontrib-dotnetdomain copied to clipboard
Fix expected failure with brace syntax
Unknown brace syntax is Foo.Bar{
1}`
Found an unknown brace syntax, failing test here: https://github.com/rtfd/sphinxcontrib-dotnetdomain/blob/083dccdf42b2f960f41770e57e34f1cf668df2de/tests/test_signature.py#L96-L100
@terrajobst @chenkennt @vacancy
Not sure on this one - what's an example of a real .NET type that uses this syntax?
Here are a couple, it seems to be only in parameter lists -- though I can't be certain:
Microsoft.CodeAnalysis.Options.OptionSet.GetOption``1(Microsoft.CodeAnalysis.Options.Option{``0})
System.Collections.Generic.IEnumerable{System.Collections.Generic.KeyValuePair{`0,`0}}
Will revisit this when I have a working BuildMeta environment.
Is this brace syntax another form of generic declaration?
That is, is System.Linq.Expressions.Expression{System.Func{{TUser},System.Boolean}}
equatable to System.Linq.Expressions.Expression<System.Func<<TUser>,System.Boolean>>
And is there any difference?
Foo.Bar{`1} is a generic instantiation using the second parameter of class Foo. @agjohnson, could you share the yaml file generated from docfx?
@chenkennt sorry for the delay, here's a file i've just generated with a few examples of the curly brace syntax: https://gist.github.com/agjohnson/dc09d43375c7ab852a0e#file-iuserclaimstore-1-yml-L71-L88
% docfx --version
Error: xdoc.exe 0.1.120.0
@agjohnson could you point out the place where you think is a problem? I briefly looked at the file and didn't find any problem.
@vwxyzh
So, I think the issue here is with any use of the Foo.Bar{Type}
notation, as this isn't a display notation, or C# notation, that we can use for linking. All of the current definitions and cross references use the C# notation given with the item uid
parameter.
Ideally, the parameter type -- and return type, and several other places that use the brace syntax -- should also include a C# notation that we can use for references. The notation as it stands would require an addition lookup layer to resolve the brace notation on top of our cross reference lookup.