ionide-vscode-fsharp
ionide-vscode-fsharp copied to clipboard
Renaming module changing only case breaks Ionide
To reproduce, create a new project:
dotnet new console -lang F# -o CaseChange
Change directory to CaseChange, then open project in VSCode. Using the Ionide Solution Explorer, add a file above Program.fs -- call it FOO.fs. Add the following to FOO.fs:
module FOO
type Point = {x: int; y: int}
At this point, everything is working (hovering over Point brings up the expected tooltip).
Now, using the Solution Explorer, rename the module to 'Foo.fs' (also change the module FOO to module Foo.
Result: Ionide no longer works in Foo.fs. For example, attempting to rename the Point type (using Rename Symbol) brings up an error tooltip with message:
"Couldn't find ...\CaseChange\FOO.fs in LoadedProjects. Have the projects loaded yet or have you tried restoring your project/solution?"
Restoring the solution (Right click project in Solution Explorer and choosing Restore) does not fix the problem.
Renaming the file back to FOO.fs or any name that is not a simple case change allows Ionide to work again in the module.
I'm using Windows 10, VSCode 1.91.1 and Ionide 7.20.3.
Yeah definitely is a bug. After renaming the file to another case, we still seem to get requests for the old File path.