Skip to content
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

calva.jackInEnv set env not work when use Environment variables #933

Closed
paomian opened this issue Jan 6, 2021 · 7 comments
Closed

calva.jackInEnv set env not work when use Environment variables #933

paomian opened this issue Jan 6, 2021 · 7 comments
Labels
bug Something isn't working jack-in

Comments

@paomian
Copy link

paomian commented Jan 6, 2021

I start a repl and get an error.

lein update-in :dependencies conj '[nrepl,"0.8.3"]' -- update-in :dependencies conj '[clj-kondo,"2020.04.05"]' -- update-in :plugins conj '[cider/cider-nrepl,"0.25.6"]' -- update-in '[:repl-options,:nrepl-middleware]' conj '["cider.nrepl/cider-middleware"]' -- repl :headless
Error: Could not find or load main class ${env:JVM_OPTS}

my setting.json

"calva.jackInEnv": {
        "JVM_OPTS": "${env:JVM_OPTS} -Darchaius.configurationSource.defaultFileName=paomianl_config.properties -Dorg.quartz.properties=quartz.properties"
    }

I don't know this situation is clava or vscode or my setting is wrong?but my setting work on outdated version。

@paomian
Copy link
Author

paomian commented Jan 6, 2021

rollback to 2.0.138 can resolve this error.

@paomian
Copy link
Author

paomian commented Jan 6, 2021

and the latest version go to definition is too slow on my project.but 2.0.138 is fast.

@PEZ PEZ added bug Something isn't working jack-in labels Jan 6, 2021
@PEZ
Copy link
Collaborator

PEZ commented Jan 6, 2021

We changed the jack-in process control mechanism in v2.0.139, which must have caused this problem. The problem with the environment variable that is. Not sure right now how to fix it, since I think it is that the Task system has special support for that syntax, that we don't get when we use childprocess directly. I'll have a look.

That slowness probably is due to our clojure-lsp introduction. Please file a separate issue about it.

@PEZ
Copy link
Collaborator

PEZ commented Jan 6, 2021

It looks like we have lost this functionality, unfortunately. I wasn't aware we had it, but see from your use that it was useful....

I am now thinking how you can work around this, @paomian. And if there is something for your use case that we can make Calva assist with in some other way. If I understand it correctly you need to pass compiler options to Leiningen, while you also have some options in your current environment?

@paomian
Copy link
Author

paomian commented Jan 7, 2021

If I understand it correctly you need to pass compiler options to Leiningen, while you also have some options in your current environment?

yes and this project is development by multi person.I do't want add some env to project.clj because it is tracked by git.Other person can get this env config too.
Can you add some other config to set env can support Environment variables.

@PEZ
Copy link
Collaborator

PEZ commented Jan 7, 2021

I see. It seems to be a really useful feature being able to use existing environment variables. So I have prepared a PR adding that specific resolve to the jackInEnv entries. Which should mean that your current configuration will work.

Please help me test it by installing this VSIX in your vscode: https://9860-125431277-gh.circle-artifacts.com/0/tmp/artifacts/calva-2.0.147-933-jack-in-resolve-env-vars-e5b20ba1.vsix

@paomian
Copy link
Author

paomian commented Jan 8, 2021

It work for me!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working jack-in
Projects
None yet
Development

No branches or pull requests

2 participants