-
Notifications
You must be signed in to change notification settings - Fork 307
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
textDocument/didClose Expected to link dart:core and dart:async first #3625
Comments
@dcharkes does it only occur immediately after you reload the SDK, or does it persist if you restart VS Code? In theory there shouldn't be much difference, but I wonder if the error could be generated by the old server (being down down) after your compile (in which case it might just be that the compile is causing things to get into a bad state?). The code throwing the error is here - I'm not very familiar with it (although I think it's not a Dart-Code bug). @scheglov might be better to ask. |
This issue has been marked stale because it is tagged awaiting-info for 20 days with no activity. Remove the stale label or comment to prevent the issue being closed in 10 days. |
This came up again, I've filed dart-lang/sdk#48051 since it seems like something is wrong in the server (though I'm not yet sure what). |
I get about 20-30 of these messages a day. Restart seems to help for about ~5mins but then I see these again. I just ignore them as they don't seem to affect anything noticeable and my code is still being saved and working. |
@jpSimkins if you have any steps to reproduce this, please post on dart-lang/sdk#48051. It'd be good to track down exactly what's happening. I posted an idea in that thread to reduce the occurrences of it in some situations, but it doesn't resolve the underlying problem. |
After two month of using I started to experience the same issue. I do not know how to reproduce it, but I'll try it later ;) |
Sorry, I upgraded to Ubuntu 22 and I had not had this issue since upgrading. Not sure if that's a factor here but I no longer see these anymore. |
I'm experiencing the same issue. Mostly when opening files of the flutter sdk instead of my own. |
In my case, it usually happens when I select a block of code and hit the Ctrl-C key. Once it happens it shows two identical errors. |
I made a change recently (dart-lang/sdk@0add39a) that I think should reduce the chance of this happening (it doesn't resolve the problem, but it avoids calling the code that fails in some cases where it was unnecessary - which I suspect account for the huge majority of cases). It didn't make the branch for the recent stable releases (Flutter 3.3 / Dart 2.18), but should be included in the next (non-hotfix) releases. |
|
@ragokan scratch that, I misread my own comment. Unfortunately the fix did not make Flutter 3.3 (but should be in a future SDK release). Out of interest, can you reproduce the issue reliably (eg. after restarting VS Code)? |
@DanTup I can reliably reproduce this issue while using package:custom_lint Cloning the repository of Riverpod (https://github.com/rrousselGit/river_pod), running pub get on all sub-projects, then restarting is enough to trigger the error. The issue being |
@rrousselGit I can repro this, taking a look - thanks! |
@rrousselGit actually, I just noticed this error is slightly different when I enabled logging (it's not "Expected to link dart:core and dart:async first"):
I've filed #4295 about this and am taking a look now. |
Bad state: Expected to link dart:core and dart:async first:
from pkg/analyzer/lib/src/summary2/linked_element_factory.dart
An error occurred while handling textDocument/didClose notification
@DanTup I've seen this happen a couple of times. I'm building that SDK and reloading it when DartCode detects the SDK has been updated, in cases that's relevant. (I'm adding new APIs to dart:* libraries.)
Is this an error in how DartCode invokes the summaries? Or is it an error in the SDK?
The text was updated successfully, but these errors were encountered: