Calva: jacking in broken in 2.0.127

Created on 17 Oct 2020  路  20Comments  路  Source: BetterThanTomorrow/calva

I launched VS Code against a Lein project this evening (on Windows 10, with WSL 2 accessing an Ubuntu 18.04 install of Clojure etc.).

Immediate problem... jacking in doesn't work... at all.

Downgraded the Calva extension to 2.0.126 and jacking in works again.

bug jack-in

Most helpful comment

Of course.
I have a folder called repos and in there some clojure projects.
So my structure is like

repos
    project A
       project.clj
    project B
       project.clj

So and i have opened this with vsCode and also saved it as a workspace so i can define some settings like envs and so on.
Then i tried to jack-in so i opened a file from project a and used jack-in.
But it said that there is no supported project file found which i assume is like project.clj/deps.edn and so on.

All 20 comments

Similar situation here. I use Mac Catalina and nothing happens when I pressed jack-in shortcut or invoke it from command palette. I downgraded to 2.0.125 and it is working.

same here with deps.edn based project

this is still broken for multi-project structure
i have live-share installed but also when i disable it it doesn't work

it seems to be that the project-root isn't found

@kstehn Can you describe the project set up so I can repro? I don't normally work in multi-project setups, and could guess, but just want to make sure I'm working on the right fix if I get to it soon. Maybe @svdo would have some time to look at this too?

Of course.
I have a folder called repos and in there some clojure projects.
So my structure is like

repos
    project A
       project.clj
    project B
       project.clj

So and i have opened this with vsCode and also saved it as a workspace so i can define some settings like envs and so on.
Then i tried to jack-in so i opened a file from project a and used jack-in.
But it said that there is no supported project file found which i assume is like project.clj/deps.edn and so on.

Thanks for fixing this @bpringe! I was planning to look at it but I didn't have time yet.

This still doesn't work in 129

can confirm this too 馃槄
this time i get
Unable to resolve filesystem provider with relative file path 'd:\<repo-path>/.calva/output-window/.clj-kondo'
The project-root () is correct now also in regards to windows.
But this seems weird regarding that the path gets created by vscode.Uri.

Just to clarify:

  • Is this a Windows-only issue or does anyone still experience this with version 2.0.129 on macOS / Linux?
  • Is this related to multi-project workspaces (i.e. using a .code-workspace file) or is this also broken for "normal" projects?

Normal and workspaces have this problem
my guess would be windows alone but not sure

Right. I don't have a Windows machine that I can use to reproduce this :(

that is okay :)
my guess after doing some quick debugging
that vscode.Uri.join(<ProjectRoot>, ".calva", "window") returns a wrong result
normally it should create a correct Uri depending which plattform is getting used

@svdo No problem!

I'll look into fixing this for Windows and try to get testing on all platforms before another release! I didn't want to change the use of the vscode.Uri because I think @svdo added this as a necessity for live share. I'm guessing this has been an issue on windows since .127, though... I wonder if I can reasonably test this on linux with Windows in a VM...

@kstehn @svdo Do either of you have access to Windows, and if so, can you debug this there? I've looked around the code but it's very hard for me to fix it blindly. This needs to be fixed on Windows, and then we can test the vsix on Mac/Linux. @PEZ

Some info to point anyone who can look into this in the right direction:

I think the error is happening here: https://github.com/BetterThanTomorrow/calva/blob/2cfb94c2b917109b1db4540ce1203b942cbebe91/src/nrepl/jack-in.ts#L159

But it's likely happening as a result of state set here: https://github.com/BetterThanTomorrow/calva/blob/2cfb94c2b917109b1db4540ce1203b942cbebe91/src/nrepl/jack-in.ts#L143

I started the debugging
But as i said the error is the result of Uri.join the path of the Root_Dir is correct 馃

But i can take a look Tomorrow regarding those two lines

Yeah, that line you pointed out looks fine by itself though. There's no real other way to call it (I could be wrong here), if we're talking about this line:
https://github.com/BetterThanTomorrow/calva/blob/2cfb94c2b917109b1db4540ce1203b942cbebe91/src/results-output/results-doc.ts#L36

So I was guessing the issue could be something with the projectRoot uri (even if it looks correct at first glance), which is set in initProjectDir. But like I said, I can only really guess since I'm not using Windows. :smile:

Yes That Was also my thought
So i looked what projectRoot is at this point and it Shows d:\repos\project-dir so in regards to Windows paths it is correct and also points to the correct folder

I see. I was just thinking, specifically, since it's a URI object, something else could have been wrong with it even if the path looked correct, but probably not.

This should be fixed in 2.0.130 :crossed_fingers:

Was this page helpful?
0 / 5 - 0 ratings