-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
lsp-dart not work with a new created dart console-full project.(non flutter) #150
Comments
Will try to repro and fix if any issues soon, thank you for the report |
@zw963 couldn't repro creating a new project with the same flutter version, flutter-sample. |
oh, it seems lsp-dart it's considering the dart-sdk of yours as
|
What are the values of |
Hi, it work well when use with flutter, current, i am trying with a dart project instead, it have a folder structure like this:
In fact, it not a flutter project indeed, it just a normally dart new project.
I never set both of them manually. my flutter is just a git repo which live in /home/zw963/flutter, and only add following into PATH PATH="$HOME/flutter/bin:$PATH"
PATH="$HOME/.pub-cache/bin:$PATH" I get following result when start with a minimum config: lsp-dart-sdk-dir => nil I think you can reproduce this with:
you will get following screeshot error. |
Hi, it works now after i specify my dart sdk dir explicitly with my others config. (setq lsp-dart-sdk-dir (expand-file-name "~/flutter/bin/cache/dart-sdk")) |
I couldn't repro following your steps on flutter_sample indeed, not sure if there is a issue here. |
Yes, it works on any new created flutter project for me too. (use flutter create project_name) So, lsp-dart only support auto configuration for flutter project, not support dart (non-flutter) project, right? |
Try to reproduce like me is trival, only need dart create test_dart -t console-full
cd test_dart
git init
emacs lib/test_dart.dart Anyway, it works well after i set correct dart sdk folder, if you think this is expected behavior, i will close it. |
no, lsp-dart works too for dart only projects, even that project is called flutter_sample that branch was created following only your steps |
Sorry for miss |
Hi, lsp-dart still not work for dart only project if not set Following is reproduce: dart create test_dart -t console-full
cd test_dart
git init
git add -A
git commit -m 'initialize commit'
emacs lib/test_dart.dart
# When ask
# i ==> Import project root ~/Dart/test_dart/
# then pressing i Get following error: LSP :: dart_analysis_server has exited (exited abnormally with code 64) i can see log in dart_analysis_server:stderr log.
The currect path should be ~/flutter/bin/cache/dart-sdk/bin/snapshots/analysis_server.dart.snapshot Not ~/flutter/bin/snapshots/analysis_server.dart.snapshot". This issue can be fixed with (setq lsp-dart-sdk-dir (expand-file-name "~/flutter/bin/cache/dart-sdk")) |
Im not sure if this is related or not #199 . The suggested fix above doesnt fix it. |
I lost the context, feel free to close this issue. |
Describe the bug
i create a new project use following command:
when open this folder, and specify the correct lsp root, lsp server start failed.
Following is log:
lsp-log
dart_analysis_server::stderr
The text was updated successfully, but these errors were encountered: