This showed up in a test failure here:
https://github.com/Dart-Code/Dart-Code/actions/runs/28365384145/job/84029875831
3) dart tooling daemon
should return the current active location:
AssertionError [ERR_ASSERTION]: Expected values to be strictly equal:
+ actual - expected
+ 'extension-output-Dart-Code.dart-code-#1-dart (package:hello_world)'
- '/Users/runner/work/Dart-Code/Dart-Code/src/test/test_projects/hello_world/bin/main.dart'
+ expected - actual
-extension-output-Dart-Code.dart-code-#1-dart (package:hello_world)
+/Users/runner/work/Dart-Code/Dart-Code/src/test/test_projects/hello_world/bin/main.dart
We should never be sending URIs for output panels to DTD. VS Code often triggers editor-change events for non-editors (like output panes) and it appears we have some code that seems to mention this, but it's not clear that it's filtering out non-files, only checking they are still the active editor if there is one?
| // Usually we only send the change if the editor whose selection changed is still | |
| // the active editor. However, if the active editor is a "non-editor" (for example an Output pane | |
| // or embedded Widget Inspector), we will still allow this, to support selection changes triggered | |
| // by the inspector when the inspector retains focus. | |
| if (window.activeTextEditor && editor !== window.activeTextEditor) { | |
| return; | |
| } | |
| const activeLocation = this.editorServices.activeLocation = this.getActiveLocation(editor); | |
| void this.sendActiveLocation(activeLocation); |