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

Jack-In doesn't start the repl when there are non-strings in jackInEnv #959

Closed
kstehn opened this issue Jan 18, 2021 · 7 comments
Closed
Labels
bug Something isn't working jack-in

Comments

@kstehn
Copy link
Contributor

kstehn commented Jan 18, 2021

So on the latest version of calva (2.0.151) the jack-in doesn't work on windows.
There seems nothing to happen only the output file gets opened and thats it.

I tested by installing older calva version to see what changes might be the problem.
The version 2.0.148 works fine.
My guess would be that something is wrong with the jack-in env.
I jack-in env-variables but nothing like referencing other env-variables.
Mostly simple strings, number and booleans.
Only two variables are a bit more complex because they are edn-string maps.

Tested on Windows with latest VS-Code version.

@kstehn kstehn added bug Something isn't working jack-in labels Jan 18, 2021
@kstehn kstehn changed the title Jack-In doesn't do anything Jack-In doesn't start the repl Jan 18, 2021
@PEZ
Copy link
Collaborator

PEZ commented Jan 18, 2021

I suspect our env-variable interpolation regex gets tripped up on those more complex edn-string maps then. Can you try to isolate it a bit?

@kstehn
Copy link
Contributor Author

kstehn commented Jan 18, 2021

Mhm dont know.
We have three kinds of map:
Simple: "{:big 150000 :small 400000}"
Nested: "{:default {:url \"https://domain:port\" :label-key \"label\"}"
A bit more complex: "{:classification [{:match {\"identifier\" \"suche\"} :regex {\"label\" \"FOOO.*\"}:=> :big}]}"

@bpringe
Copy link
Member

bpringe commented Jan 18, 2021

Have you verified that jack-in works if you're not using env variables? Just wondering if it's isolated to that.

@kstehn
Copy link
Contributor Author

kstehn commented Jan 18, 2021

Sorry forgot this to do.
I just checked the funny thing is those examples arent the problem but more like
"calva.jackInEnv": { "test_bool": true, "test_integer": 100, "test_string": "foo"

when i remove test_bool and test_integer the jack-in works

@bpringe
Copy link
Member

bpringe commented Jan 18, 2021

It seems maybe it has problems with any env values besides strings, but I haven't looked into it. We'll see what @PEZ says since he was working on this.

@PEZ
Copy link
Collaborator

PEZ commented Jan 18, 2021

Thanks for the clarification. It was very mysterious until then. 😄 Now there's a PR for you to review.

@PEZ PEZ changed the title Jack-In doesn't start the repl Jack-In doesn't start the repl when there are non-strings in jackInEnv Jan 19, 2021
@kstehn
Copy link
Contributor Author

kstehn commented Jan 19, 2021

I tested the vsix and looked at the changes.
It works fine now with the non-string envs.

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

3 participants