ionide / ionide-vscode-fsharp

VS Code plugin for F# development
http://ionide.io
MIT License
859 stars 277 forks source link

Renaming symbols is broken in v6.0.0 #1690

Closed leovalencia10 closed 2 years ago

leovalencia10 commented 2 years ago

When I try to rename a symbol sometimes it works and sometimes the new name goes into the wrong place. This only started to happen after the update to v6.0.0

(a simple code example):

//
// Perform the actual command
//
let goGetUrl (url: string) =
    let query = goGetUrlAsync url
    query.Wait()
    query.Result

let fromCSV csv =
    CsvFile.Parse(csv, hasHeaders = false, ignoreErrors = true)

If I try to renamed the fromCSV function to something like fromCSVBad I get this:

//
// Perform the actual command
//
let goGetUrl (url: string) =
    let query = goGetUrlAsync url
    query.Wait()
    fromCSVBadesult

let fromCSV csv =
    CsvFile.Parse(csv, hasHeaders = false, ignoreErrors = true)

Notice that the line was inserted on the last line of the previous functions (it looks like query was replaced as well) and that the symbol that I wanted to rename is unchanged.

baronfel commented 2 years ago

Yeah, I've seen this off and on for a few versions now - we may have an off by one hiding around.

yuuuxt commented 2 years ago

I'm having this issue with 6.0.6 (vscode 1.68.1, win x64, tried reinstalling ionide, tried restarting vscode&PC)

(also in the gif there is another issue: if the vscode window is new without any folder opened, "click here" triggers not working, inlay hints are always shown) temp