Do not start the Dart analysis server from the root if Dart projects are in subfolders
See original GitHub issueThis plugin always runs the analysis server from the root, resulting in a never terminating or hanging analysis in the dart-sdk. This is because the analyzer does not support analysis from the root of the dart-sdk project.
@dcharkes, thanks for the report! Generally, the use case of starting the analysis server from the root of the sdk is not supported.
@sjindel-google mentioned the Emacs plugin does not have the same issue, because it uses the .packages
or pubspec.yaml
files to determine from which folder to start analysis.
Would it be possible to get this behaviour in the VSCode plugin?
How to reproduce
- clone https://github.com/dart-lang/sdk
- open VSCode
- open the root folder of dart-lang/sdk
- enable Dart Code plugin
Analysis does not terminate, and generates 10000+ errors.
Expected behaviour
Analysis terminates normally (with a bunch of errors, as this is not a normal Dart project).
Issue Analytics
- State:
- Created 5 years ago
- Comments:27 (7 by maintainers)
Top Results From Across the Web
Dart Analysis tool window | IntelliJ IDEA Documentation
Click this button to run the analysis of the Dart source code of the project without stopping the Dart Analysis server. Restart Dart...
Read more >Linter rules - Dart
Use the Dart linter to identify possible problems in your Dart code. You can use the linter through your IDE or with the...
Read more >Visual Studio Code Workspace Trust security
Workspace Trust. Visual Studio Code takes security seriously and wants to help you safely browse and edit code no matter the source or...
Read more >flutter project files - Philadelphia Mixing Solutions
I want to be able to access it in the same file but in a different function when I am trying to access...
Read more >Finding Unused Files With Dart Code Metrics - Medium
dart run dart_code_metrics:metrics check-unused-files lib# or for a Flutter package ... Since second_file.dart doesn't import any of the previous files, ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I don’t actually control the scheduling of analyzer issues, so I can’t say for sure. I think it’s worth opening an issue so that, if nothing else, we have some history in a place where we might be able to find it.
Ok thanks, I’ll close this and leave it to you two to decide if there should be an analyzer issue. Thanks!