ionide / FsAutoComplete

F# language server using Language Server Protocol
Other
389 stars 151 forks source link

Fix AP signatures for APs with names which are substrings of other APs #1211

Closed dawedawe closed 7 months ago

dawedawe commented 7 months ago

WHAT

🤖[deprecated] Generated by Copilot at 2080072

Fix signature formatting for active pattern cases in SignatureFormatter.fs. Use the case name instead of the function name and ignore casing differences.

🤖[deprecated] Generated by Copilot at 2080072

apcSearchString Finds the right function to show Autumn bug is fixed

🐛🔎📝

WHY

To reproduce the issue:

open Microsoft.FSharp.Quotations.Patterns

let rec exprNames expr =
    match expr with
    | Value(_o, t) -> ()
    | _ -> ()

The signature for Value was taken from other APs, for example DefaultValue ValueWithName etc. because the Displayname is a substring of these other APs DisplayNames. So let's make the search string specific enough to only match on the one we actually want.

HOW

🤖[deprecated] Generated by Copilot at 2080072

baronfel commented 7 months ago

Nice, that looks like a fine fix. Can you try to add a test for this so future refactoring doesn't regress it?

dawedawe commented 7 months ago

Sure thing, added some.

baronfel commented 7 months ago

4 test failures is a bit too many - rerunning to see if it was transient.

TheAngryByrd commented 7 months ago

4 test failures is a bit too many - rerunning to see if it was transient.

We should mark down transients ones we see into an issue and see if there's any commonality.

baronfel commented 7 months ago

Thanks @dawedawe!