You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Go to Test doesn't work on some failing tests #5878
Once the tests finish, see essential_lints/test/fixes/add_missing_members_test.dart -> AddMissingMembersTest.test_addsMissingGetters_field fails and you can't navigate to it
See, for example, _internal_plugin/test/invalid_members_test.dart -> InvalidMembersTest.test_consider passes and navigation works fine
I'm trying to navigate using the Test Results tab -> Go to Test button.
Expected behavior
For navigation to work in both cases.
If providing this information as part of reporting a bug, please review the information
below to ensure it only contains things you're comfortable posting publicly.
General info
Dart 3.12.0-edge.2bfdb03c4afd1592ca3c35bfa8e87c19a9db0c95 (main) (Sat Jan 17 17:33:05 2026 -0800) on "windows_x64"
on windows / "Windows 11 Pro" 10.0 (Build 26200)
locale is pt-BR
Project info
sdk constraint: '^3.10.0'
dependencies: analysis_server_plugin, analyzer, essential_lints_annotations, logging, meta
I can repro. If I open the project and just run that one file, I get three results in Test Results, there are three gutter icons and navigation works fine. But if I close the file, then now only the last one navigates, and there is only one gutter icon and only one result in the Test Explorer (the other two seems to disappear when the file closes).
I also notice there's a VERY slow spinner on the file in the Test Explorer (which may or may not be related, but may also be the issue you noted elsewhere).
I'll see if I can figure out why those nodes are vanished when the file closes - that seems very odd.
This treats them like the position was removed, and therefore they look like deleted tests.
On one hand, I see logic in terminating the tracker when the doc closes (it might be modified on-disk and we can't track changes there), but on the other hand it seems like we're going to end up deleting a lot of test nodes.
I'll have to think more about this. Perhaps we just need to keep the tracker active (and reuse it if the doc opens again) and assume/hope the file doesn't change. If it does, we will just potentially navigate incorrectly until the data is refreshed.
If the file was never opened then we won't have any tracker. But arguably, we should be ready to use the ranges from the results and then start tracking them when you open the file. Probably the fix is the same... we support trackers on closed files, and they just don't track while the file is closed (that is, we create them for the closed file during runs, and we persist them instead of removing them when a file is closed).
I need to verify this is the only problem here though, since in your steps you didn't open and close the file like I did!
What if the file was never opened before? What are we doing with that information?
We actually "open" the document if it's not open, but in VS Code opening a text document does not mean showing it. There is a state where the file is open in the model but not visible.
I have a fix that seems to resolve the issue for me, but it'd be good to have you verify once the next pre-release is published.
Activity
DanTup commentedon Jan 19, 2026
I can repro. If I open the project and just run that one file, I get three results in Test Results, there are three gutter icons and navigation works fine. But if I close the file, then now only the last one navigates, and there is only one gutter icon and only one result in the Test Explorer (the other two seems to disappear when the file closes).
I also notice there's a VERY slow spinner on the file in the Test Explorer (which may or may not be related, but may also be the issue you noted elsewhere).
I'll see if I can figure out why those nodes are vanished when the file closes - that seems very odd.
FMorschel commentedon Jan 19, 2026
That would be: #5879
DanTup commentedon Jan 19, 2026
The reason we're losing the tests when the doc closes, is that our position tracker handles the document closed and disposes of the trackers:
Dart-Code/src/shared/vscode/trackers.ts
Lines 198 to 204 in b948bb0
This treats them like the position was removed, and therefore they look like deleted tests.
On one hand, I see logic in terminating the tracker when the doc closes (it might be modified on-disk and we can't track changes there), but on the other hand it seems like we're going to end up deleting a lot of test nodes.
I'll have to think more about this. Perhaps we just need to keep the tracker active (and reuse it if the doc opens again) and assume/hope the file doesn't change. If it does, we will just potentially navigate incorrectly until the data is refreshed.
FMorschel commentedon Jan 19, 2026
What if the file was never opened before? What are we doing with that information?
DanTup commentedon Jan 19, 2026
If the file was never opened then we won't have any tracker. But arguably, we should be ready to use the ranges from the results and then start tracking them when you open the file. Probably the fix is the same... we support trackers on closed files, and they just don't track while the file is closed (that is, we create them for the closed file during runs, and we persist them instead of removing them when a file is closed).
I need to verify this is the only problem here though, since in your steps you didn't open and close the file like I did!
Persist test tracking even if a document is closed
DanTup commentedon Jan 20, 2026
We actually "open" the document if it's not open, but in VS Code opening a text document does not mean showing it. There is a state where the file is open in the model but not visible.
I have a fix that seems to resolve the issue for me, but it'd be good to have you verify once the next pre-release is published.
Persist test tracking even if a document is closed