ActiveLogin.Identity icon indicating copy to clipboard operation
ActiveLogin.Identity copied to clipboard

Missing xml-comments in metadata for C# api

Open viktorvan opened this issue 6 years ago • 6 comments

Describe the bug Missing xml-comments in metadata for the C# api

What area is it related to SwedishPersonalIdentityNumber.TryParse and SwedishPersonalIdentityNumber.TryParseInSpecificYear

To Reproduce Steps to reproduce the behavior: Try to view xml-comments for the above mentioned methods, for example by hovering on the method names.

In the source code the methods have xml-comments:

    /// <summary>
    /// Converts the string representation of the personal identity number to its <see cref="SwedishPersonalIdentityNumber"/> equivalent  and returns a value that indicates whether the conversion succeeded.
    /// </summary>
    /// <param name="s">A string representation of the Swedish personal identity number to parse.</param>
    /// <param name="parseResult">If valid, an instance of <see cref="SwedishPersonalIdentityNumber"/></param>
    static member TryParse((s : string), [<Out>] parseResult : SwedishPersonalIdentityNumberCSharp byref) =
        let pin = parse s
        match pin with
        | Error _ -> false
        | Ok pin ->
            parseResult <- (pin |> SwedishPersonalIdentityNumberCSharp)
            true

But if you look in the comments file ActiveLogin.Identity.Swedish.xml there are no entries for the two functions with out-parameters.

Expected behavior The xml-comments should be displayed. But they are not.

Screenshots

NuGet package version 2.0.1

Runtime version .net core 2.2.104

Additional context Visual Studio Code 1.31.1

viktorvan avatar Mar 03 '19 21:03 viktorvan

Can someone confirm if this works or not in Visual Studio?

viktorvan avatar Mar 03 '19 21:03 viktorvan

Can someone confirm if this works or not in Visual Studio?

I can confirm :/ Why is this?

image

PeterOrneholm avatar Mar 06 '19 08:03 PeterOrneholm

Some more information. When cloning a fresh project and building I can see that the xml-comments are generated correctly in bin/debug/netstandard2.0/ActiveLogin.Identity.Swedish.xml.

I can get intellisense from within an F# project when using the "CSharp"-facade SwedishPersonalIdentityNumberCSharp.

But if I create a C#-project and reference ActiveLogin.Identity.Swedish I cannot get any intellisense for the TryParse-functions with out-parameters.

viktorvan avatar Mar 08 '19 07:03 viktorvan

I have reported this as a bug in visualfsharp.

https://github.com/Microsoft/visualfsharp/issues/6310

viktorvan avatar Mar 08 '19 20:03 viktorvan

Is this still an issue @viktorvan?

PeterOrneholm avatar Nov 11 '19 11:11 PeterOrneholm

This issue is not yet fixed in the fsharp-compiler. I suggest we keep it open.

viktorvan avatar Nov 15 '19 14:11 viktorvan