-
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-run can't find a java executable or JAVA_HOME #194
Comments
I suspect is related with the shell process spawned by dart to run java is using a "default" shell which is not the same emacs or your terminal is using |
I think that is the poblem too. It's not inheriting the "main buffer" (the one i'm executing lsp-dart-run) Do you know where this process is being started? |
I don't know, but I use doom and they use https://github.com/purcell/exec-path-from-shell IIRC which fix most errors like that |
I use doom here too, but I found a possible solution. If I add (dap--put-if-absent conf :environment-variables '(("GRADLE_OPTS" . "-Dorg.gradle.project.android.aapt2FromMavenOverride=/nix/store/3svzmqsal084m2wffsj7drqk2kzi514c-android-sdk-env/share/android-sdk/build-tools/33.0.2/aapt2"))) To |
@toniz4 you can create your own debugging template to customize that via: (dap-register-debug-template "Flutter :: Debug with custom env vars"
(list :type "flutter"
:environment-variables '(("GRADLE_OPTS" . "-Dorg.gradle.project.android.aapt2FromMavenOverride=/nix/store/3svzmqsal084m2wffsj7drqk2kzi514c-android-sdk-env/share/android-sdk/build-tools/33.0.2/aapt2")))) |
Describe the bug
When trying to run lsp-dart-run, using envrc to populate the env variables based on a shell.nix. The debbuger or runner exits with the following message:
The weird thing is, the flutter and dart executables and sdks and the jdk are being set up in the same way, at the same time. So, if the flutter command is avaliable to emacs, I don't know why it only fails with the java command.
To Reproduce
Have
JAVA_HOME
and thejava
executable path set by envrc.Run
dap-debug
orlsp-dart-run
in a flutter project.Expected behavior
That
lsp-dart-run
executes my appVersion
What I think is hapening is that somewere, the
process-environment
andexec-path
are being reseted to the default value, I tried to identify where, but my skills to debug elisp are not the best. But I found those possible related issues:greghendershott/racket-mode#539
rust-lang/rust-mode#447
magit/magit#4160
purcell/envrc#31
The text was updated successfully, but these errors were encountered: