Hi all, love what you doing.
Yesterday renamed one of my widgets from tracking_sheet.dart to Measure_sheet.dart. Of course got warning, immediately renamed it to measure_sheet.dart, but warning didn't go away.
Renamed it to Kmeasure_sheet.dart, then back to measure_sheet.dart, the warning appeared again:

I tried also removing file from the project and re-adding - no luck.
Please help how can I kill the warning.
Best regards,
Dmitry
I'm not able to reproduce this, the error disappears once I rename the file back. In the logs I can see the server sending an update to clear them.
Could you try capturing a log?
Note: The log file may include parts of your source code so it would be better to reproduce on a small sample project, but otherwise be sure to check the log for anything sensitive before sharing.
Thanks!
I was able to reproduce it on a small project, copying and reducing existing measure_sheet.dart.
One note - I renamed file in the vscode using F2 in the project tree, not externally.
After vscode loaded the file looked correctly but then if I click another file and return back to this one it become reported having incorrect cases in its name.
Dart-Code-Log-2021-02-01 11-38-48.txt
vscode v1.54.3 (user setup)
dart-code v3.20.1
Strange - I renamed the same way, though no luck. I tried on Windows too but it seemed fine (I tried both changing only the casing, and also changing the casing and adding more letters at the same time).
Can you confirm exactly what sort of rename you're making? If I can't repro, I'll see if I can trace through the server how this is normally handled to see if I can come up with any theories for why it wouldn't be happening for you.
Thanks!
I think I found the way to reproduce bug:
After these steps on my machine (windows 10) all content in bb_aa.dart undercrossed with blue line and Problem window shows a case problem for Bb_aa.dart file
I have the same issue on Mac OS, but the error is only shown whenever I make any change to the file and remains until I save the file again. Then it disappears. Makes it hard to edit a file...
but the error is only shown whenever I make any change to the file and remains until I save the file again
Aha! I couldn't repro with the instructions above, but when I modified the file the error appeared again. I'll do some digging. Thanks!
Also - after restarting VS Code I could repro it the original way - just renaming the file to Bb and then back to bb - the error remained.
This feels like a VS Code bug. When I change the casing of a file, then reload VS Code, then close and re-open the file, VS Code still keeps giving me the old case - even though it shows the new casing in its UI.
I've opened https://github.com/microsoft/vscode/issues/121106 to get some clarification (but it's not clear based on https://github.com/microsoft/vscode/issues/102627 whether this is intended or not).
Unfortunately the VS Code issue has been resolved as "by design" and it's not clear there's a way to fix this. VS Code shows a file opened with the old casing even though that's not actually the case.
Hey everyone I had the same issue but I think I found a temporary workaround for it. It basically involves clearing any "cache" and "state" files for vs code. This method will reset your workspace (I believe that includes opened folders, window layout, etc). It should not touch extensions or settings.
Steps for windows (mac and linux may be similar but different locations):
Open your local roaming folder:
%appdata%/Code (C:\Users*USERNAME*\AppData\Roaming\Code)
In this folder delete Cache, Cached Data, CachedExtensions, Code Cache, and User/workspaceStorage
You can avoid removing all of your workspaces by looking into the workspace folder and finding the one associated with your project and only removing that (I have not tested that).
This should work around the issue. You will need to do this each time it comes up or if you are refactoring many files you can do it at the end of the refactor.