Closed mrakgr closed 1 year ago
Hello,
How can we reproduce this error?
Is it when building with Fable? When running dotnet build
?
open Feliz
prop.type'
I tried doing this in the Vite template just now and it happens. Just hover over the type'
with the cursor inside VS Code. If it doesn't happen for you, tell me and I'll try to come up with a concrete example.
If the bug is inside VSCode, then I don't think the problem is in Feliz but more in the tooltip provider.
It happen in big VS as well. Just now before it fully loaded the error message was different when I hovered over it. It said that it was an unclosed string.
@mrakgr I feel like this is more an issue with editors themselves rather than Feliz. Maybe dotnet/fsharp
is a more suitable place for this issue 🙏
I don't know. Can you show me where the docs for prop.type'
are supposed to be? This part 'M:Feliz.prop.type'(System.String)'
is definitely an unclosed string. But I find it weird that it is using JS strings instead of the .NET strings. I want to study how it is generated. It just feels unlikely for this to be an editor bug.
@mrakgr Because the error happen in the editor while compilation works fine it means that this is an editor related problems.
The error you are seeing is the XMLPath used by the editor to try to find the documentation of method. The problem is that the generated XMLPath is invalid as you can see it generates a non closed string (3 '
):
doc/members/member[@name='M:Feliz.prop.type'(System.String)']
A correct generation should use "
instead of '
.
If you download the package from NuGet and change the extension to .zip
, you can then open the package and see that in the file lib/netstandard2.0/Feliz.xml
, the generated XML does indeed use quotes instead of single quotes
What is left to know is to find if the generated XMLPath is done by each editor independently in which case the fix need to be applied in each of them or if it is provided by the compiler in which case the fix is to be send to dotnet/fsharp
and wait for new release of it.
To summarize, it has been resolved in VS 17.5, and will be resolved in VS Code soon once it moves to the latest compiler service. You were right about this being an editor related issue.
I get the following error when I hover over
prop.type'
in the editor:I am guessing it is the
'
intype'
name that is causing the error.