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

Can't jack-in when no project file is open #734

Closed
diegovdc opened this issue Aug 7, 2020 · 11 comments
Closed

Can't jack-in when no project file is open #734

diegovdc opened this issue Aug 7, 2020 · 11 comments
Labels
bug Something isn't working jack-in

Comments

@diegovdc
Copy link
Contributor

diegovdc commented Aug 7, 2020

I created a new project with https://github.com/seancorfield/clj-new and when trying to jack in I got this:
Command 'Calva: Start a Project REPL and Connect (aka Jack-In)' resulted in an error (Error: EACCES: permission denied, mkdir '/.calva')

Seems like it's trying to create the .calva dir on the root dir, instead of on the project dir.

@diegovdc
Copy link
Contributor Author

diegovdc commented Aug 7, 2020

I was opening the project dir with code . and then immediately calling the jack-in command, but now I realize I first had to open a file within the project.

Closing this.

@diegovdc diegovdc closed this as completed Aug 7, 2020
@PEZ
Copy link
Collaborator

PEZ commented Aug 7, 2020

Actually you shouldn't have to open a file in the project. I'm reopening, so that we keep this on our radar, and so that people find your workaround. Thanks for reporting!

@PEZ PEZ reopened this Aug 7, 2020
@bpringe bpringe added bug Something isn't working jack-in labels Aug 7, 2020
@bpringe
Copy link
Member

bpringe commented Aug 18, 2020

I cannot reproduce this =(. When I open a project and jack-in with no file open, it works as usual. I tried creating a new clj-new project as well.

@bpringe bpringe changed the title Can't jack-in to a fresh clj-new project Can't jack-in when no project file is open Aug 20, 2020
@brdloush
Copy link
Contributor

brdloush commented Aug 26, 2020

I have the same issue. Not a big problem though, there's a simple work-around around this.

Steps to reproduce:

lein new foo
cd foo
code .
press ctrl+alt+c, ctrl+alt+j => doesn't work, throws `Error: EACCES: permission denied, mkdir '/.calva'`
(click on TERMINAL tab, terminal opens)
press ctrl+alt+c, ctrl+alt+j => works now

VS Code version: 1.48.2
Calva 2.0.122

@PEZ
Copy link
Collaborator

PEZ commented Aug 26, 2020

Thanks for the workaround, @brdloush ! Very interesting. Which OS are you on?

@zonky-brejla
Copy link

zonky-brejla commented Aug 27, 2020

Update: sorry, using different github user on my phone.

I'm using Ubuntu budgie 20.04.

Originally I thought I have to run at least lein deps in the terminal. Later I found out that opening the terminal is all that is needed.

The error message shown is strange: as if it was trying to actually create the '/.calva'` folder in filesystem root. I may check later using strace or something.

@bpringe
Copy link
Member

bpringe commented Aug 27, 2020

Yikes, @diegovdc and I thought we fixed this on his machine, but I think the original fix may have been reverted.

await vscode.workspace.fs.createDirectory(vscode.Uri.file(kondoPath));

It has to do with this line, but really the code above that gets the output directory. Maybe @diegovdc can look at it again, if he can still reproduce on his machine.

@bpringe
Copy link
Member

bpringe commented Aug 28, 2020

@brdloush Can you try this vsix and see if the issue is fixed for you? @diegovdc changed something that may work, and seems to work for him. https://7915-125431277-gh.circle-artifacts.com/0/tmp/artifacts/calva-2.0.124-pull-770-21d6640a.vsix

You can hit ctrl+shift+p and search vsix to find and run the command for installing it.

@diegovdc
Copy link
Contributor Author

@bpringe The vsix is working for me.

@brdloush
Copy link
Contributor

I can confirm. That vsix version fixes mentioned isssue. I can jack-in to freshly created project without having to open terminal. 👍 👏

@bpringe
Copy link
Member

bpringe commented Aug 28, 2020

Awesome! Great job @diegovdc 🎉

@bpringe bpringe closed this as completed Dec 24, 2020
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

5 participants