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
Using a subdirectory named 'tool' in test makes vscode freeze #4809
The reason for the error I'm seeing is that when we see something inside a "tool" folder we assume it's Dart (not Flutter), because it's common to put utility scripts inside a Flutter project inside a tool folder (which should run with the Dart CLI).
It shouldn't be mis-categorising these inside a nested test/tool folder though, I'll work on fixing that.
I don't see VS Code freeze here, but I see this error in the debug console:
Can you confirm exactly the behaviour you're seeing (what specifically you mean by freeze)?
(I'll look into what's causing this error in the meantime)
It should be noted my pubspec.yaml looks like this:
dev_dependencies:
flutter_test:
sdk: flutter
test: any
Which removed the error you are seeing. Furthermore, the freeze I am referring to is that when the test is executing I need to click the stop button some times before it reacts.
It should be noted my pubspec.yaml looks like this:
Ah, having test: in your pubspec is why you're not seeing the same error. If I add that I see the same behaviour as you (and running dart test test/tool/foo_test.dart in that case spews a huge number of errors).
The fix I'm working on for the error I posted should solve both issues (by using flutter to run the tests). Generally I don't think you should have/need test in your pubspec for Flutter tests.
Ah, having test: in your pubspec is why you're not seeing the same error. If I add that I see the same behaviour as you (and running dart test test/tool/foo_test.dart in that case spews a huge number of errors).
Activity
DanTup commentedon Oct 23, 2023
I don't see VS Code freeze here, but I see this error in the debug console:
Can you confirm exactly the behaviour you're seeing (what specifically you mean by freeze)?
(I'll look into what's causing this error in the meantime)
DanTup commentedon Oct 23, 2023
The reason for the error I'm seeing is that when we see something inside a "tool" folder we assume it's Dart (not Flutter), because it's common to put utility scripts inside a Flutter project inside a
toolfolder (which should run with the Dart CLI).It shouldn't be mis-categorising these inside a nested test/tool folder though, I'll work on fixing that.
Use top level folder name instead of finding bin/tool/etc. anywhere i…
Add tests for selecting debugger kinds
giggitygoat commentedon Oct 24, 2023
It should be noted my pubspec.yaml looks like this:
Which removed the error you are seeing. Furthermore, the freeze I am referring to is that when the test is executing I need to click the stop button some times before it reacts.
DanTup commentedon Oct 24, 2023
Ah, having
test:in your pubspec is why you're not seeing the same error. If I add that I see the same behaviour as you (and runningdart test test/tool/foo_test.dartin that case spews a huge number of errors).The fix I'm working on for the error I posted should solve both issues (by using
flutterto run the tests). Generally I don't think you should have/needtestin your pubspec for Flutter tests.giggitygoat commentedon Oct 24, 2023
I see, thanks for clarifying!
DanTup commentedon Oct 24, 2023
Fixed by 74fd1ff