-
Notifications
You must be signed in to change notification settings - Fork 23
Description
Describe the bug
There seems to be a bug in lsp-dart-get-project-root, where it picks up the wrong default-directory from an existing test-process buffer (I'm speculating a little here)
Note
Before logging the bug please make sure that the issue is reproducible with latest melpa packages.
To Reproduce
Create two flutter projects, eg
flutter create proj_one
flutter create proj_two
Open proj_one/test/test_widget.dart (selecting proj_one as the project root). Confirm that tests can run, eg M-x lsp-dart-run-all-tests.
Open proj_two/test/test_widget.dart (selecting proj_two as the project root). Run tests again.
Notice that the tests executed are actually in proj_one! (This is more obvious if you run lsp-dart-run-test-file)
If you first kill the *LSP Dart - tests process* buffer, the expected tests are run.
Expected behavior
The tests in proj_two/test/test_widget.dart are run.
Screenshots
If applicable, add screenshots to help explain your problem.
Version
Include here the result of: M-x lsp-dart-version
[LSP Dart] 1.24.3 at 2024年05月25日 @ Emacs 30.0.50
[Dart SDK] Dart SDK version: 3.3.4 (stable) (Tue Apr 16 19:56:12 2024 +0000) on "linux_x64"