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
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-xlsp-dart-version
I first picked this up running file-tests from a project with multiple sub-packages (eg, a flutter app, with a few library projects in the packages/ directory. You wind up with some fairly convoluted paths such as projectroot/packages/lastlib/packages/currentlib/test/some_test.dart)
I'm not entirely sure if that's not a separate issue, but the two-project scenario seemed to the simplest reproduction case for now.
Describe the bug
There seems to be a bug in
lsp-dart-get-project-root
, where it picks up the wrongdefault-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
Open
proj_one/test/test_widget.dart
(selectingproj_one
as the project root). Confirm that tests can run, egM-x lsp-dart-run-all-tests
.Open
proj_two/test/test_widget.dart
(selectingproj_two
as the project root). Run tests again.Notice that the tests executed are actually in
proj_one
! (This is more obvious if you runlsp-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
The text was updated successfully, but these errors were encountered: