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

Don't require the alias key in deps.edn to jack-in #780

Closed
beders opened this issue Sep 6, 2020 · 6 comments
Closed

Don't require the alias key in deps.edn to jack-in #780

beders opened this issue Sep 6, 2020 · 6 comments
Labels

Comments

@beders
Copy link

beders commented Sep 6, 2020

Right now the minimal deps.edn file to get started looks like this:

{ :aliases {}}

However, if the key aliases is not provided, jack-in fails (the first time).

@bpringe
Copy link
Member

bpringe commented Sep 6, 2020

I have not experienced this myself. I just tested by creating an empty directory, opening it in vs code, creating a deps.edn file in the directory with an empty map, {}, and then running jack-in, choosing Clojure CLI, and jack-in succeeds and I can run code in the output/repl window.

I do see, however, that if I delete the contents of deps.edn (so a blank file), then run jack-in, this message appears:
image

Is the above what you did (a blank file)? And in any case is the above message what you mean by jack-in failing (just making sure there's not some other error)?

If the above is not your scenario, can you provide the detailed steps / scenario in which jack-in failed for you? Also what OS are you using?

Either way, we probably should fix Calva to not show that error when the file is empty, because it's misleading.

@bpringe bpringe added the jack-in label Sep 6, 2020
@bpringe
Copy link
Member

bpringe commented Sep 6, 2020

Just read the slack convo, I also tried {:paths ["src"]} in deps.edn, as you mentioned, and jack-in worked with this as well. I'm wondering if it's some system/OS issue.

@beders
Copy link
Author

beders commented Sep 7, 2020

This seems to happen only on fresh installations.
After running jack-in successfully, I was able to delete the alias key and it was still working.
Where is Calva storing its state?

@bpringe
Copy link
Member

bpringe commented Sep 7, 2020

Fresh install of vs code and Calva, or just Calva? I uninstalled and reinstalled and still could not reproduce with just :paths.

State storage in Calva is bit of a mixed bag. We hope to improve that eventually. Though, I don't think Calva intentionally stores anything related to project files. Maybe @PEZ can provide more info.

@PEZ
Copy link
Collaborator

PEZ commented Sep 7, 2020

We don't save any state about the project files. But we do save state about the user choices made in those jack-in/connect prompts. I haven't checked the code yet, but that is a clue anyway. My guess is that we have an assumption about the aliases key being present, that is somehow dodged by the prompt/quick-pick state.

@beders
Copy link
Author

beders commented Sep 7, 2020

I'm unable to reproduce it now. New project, new deps.edn and jack-in is working fine :(
I guess, you can close this. Thanks for investigating

@bpringe bpringe closed this as completed Sep 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants