Open ChristianKleineidam opened 1 year ago
Dart has defined library equality to be based on the resolved URI used to refer to the library, and URI's are case sensitive. The two URI's used to refer to the library, even though they resolve to the same file on disk, are taken to be distinct because of the case difference between 'speedy' and 'Speedy'.
I did setup the project initially with the name "Speedy" and then changed it to "speedy" after some process complained about the casing. Now when I search in my project for "Speedy" in a case-sensitive way.
It seems like somehow "import 'package:speedy/blocs/lexeme_flash_bloc.dart';" applies that it's in "\Users\Christian\Documents\Programming\Speedy\lib\blocs\lexeme_flash_bloc.dart'
If either (a) you haven't run pub
since updating the name or (b) the name of the directory on disk is still uppercase, then that might account for the issue.
I have run pub and the directory on the disk is in lowercase.
Then I'm at a loss to explain it. The one thing I can think of is that the tool might have cached the older version of the URI in the .dartServer
directory in your home directory. You can safely delete the contents of that directory, though it will be slower than normal to re-analyze everything. If that doesn't work then I'll have to hope someone else knows what's going on.
I did delete the .dartServer directory which had an amazing number of files in it but that didn't help either.
I copied my whole project into a new folder and now it works. I still have the old folder. Even when this solved the issue on my end, it seems that there's a bug if copying the project into a different folder solves the issue.
I agree. There's definitely a bug somewhere.
@scheglov In case you have any insights to offer.
I'm getting the following error that doesn't make sense:
I have created LexemeRepository in a file containing:
In another file I have:
It underlines (lexemeFlashBloc) and shows me the error for that.