This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
- # announcements (16)
- # babashka (28)
- # beginners (27)
- # calva (39)
- # chlorine-clover (6)
- # cider (8)
- # clara (28)
- # cljs-dev (19)
- # cljsrn (22)
- # clojure (78)
- # clojure-australia (3)
- # clojure-europe (64)
- # clojure-nl (3)
- # clojure-norway (14)
- # clojure-spec (2)
- # clojure-uk (11)
- # clojurescript (11)
- # core-async (24)
- # datomic (3)
- # deps-new (5)
- # emacs (9)
- # fulcro (4)
- # gis (2)
- # graalvm (9)
- # honeysql (2)
- # hoplon (5)
- # instaparse (1)
- # introduce-yourself (5)
- # jobs (5)
- # luminus (4)
- # observability (7)
- # off-topic (6)
- # pathom (18)
- # pedestal (5)
- # polylith (4)
- # re-frame (2)
- # reagent (1)
- # reitit (1)
- # remote-jobs (7)
- # shadow-cljs (47)
- # specter (1)
- # sql (27)
- # testing (6)
- # tools-deps (4)
- # vim (3)
- # xtdb (8)
@pez Do you mean the WSL-Remote stuff or something else?
I guess I can help test it on my laptop then? All my Clojure code is on Ubuntu (WSL2) and I run Calva on Windows and access everything via the remote extension.
I too use WSL-Remote on one of my machines.
Thanks! It’s this PR https://github.com/BetterThanTomorrow/calva/pull/1187 the latest VSIX is here: https://13743-125431277-gh.circle-artifacts.com/0/tmp/artifacts/calva-2.0.199-pull-1187-7179e66a.vsix What’s mainly under test in the remote setting is that the command works for the “happy path”. That is if the project structure is fairly standard you should be able to switch between test and implementation files and also test and implementation files should be offered to be created, and then be created.
(I’m just heading out for lunch/shopping but will try to remember to test it when I get back)
Switching between src/test works. Creating missing files uses the wrong path.
I was looking at the remote file
/Developer/workspace/wsmain/clojure/login/src/login/handlers/main.clj and it seemed to reuse the path of the previous file I was looking at and wanted to create a test file in
The path would have been correct if it didn’t have that previous path prefix, i.e., if it had been:
If the confirmation popup let you edit the path, that would be nice.
Anyway, hope that helps @pez (not sure if Partik is on here?)?
Thanks @U04V70XH6! Totally appreciate this help. Yes, @U01PG2LDYV8 is around 😃
The odd thing to me was that it used the path of a file I had previously been viewing, not the path of the file I was currently viewing when I asked it to switch to the test file — so maybe some stale state in a global var?
Hey @U04V70XH6 can you help me with the project structure for this, I am trying to reproduce the bug
Well, the switching between source and test works just fine — so that part knows where the corresponding file should be. It’s only when the corresponding file is missing that it seems to compute the wrong path. So the bug is that there’s a difference between where it looks for the file and where wants to create the file if it is not present.
Roger that, but we’d like to see if it is a Remote thing or general so we would like to try repro on Mac w/o Remote in the picture.
OK, I can install the VSIX on Mac and try it out with the exact same project…
Switching does not work on Mac at all: even for the examples that do work on Windows/WSL2.
The path it is offering to create the file in is correct — when the file is actually present.
When I then move to a part of the project where there is no matching test file, I see the same bug I saw on Windows/WSL2: it repeats the entire path and reuses the previous folder location I was in.
So that bug is reproducible between platforms but, in addition, switching on Mac doesn’t work, even when the matching file is present (but at least where it wants to create the file looks correct).
FYI I’ve switched back to 2.0.200 so I can continue working now 🙂
hmm, I’ll have a look, as far as I remembered, file switching and directory creation were working fine on my mac
I can give it a try tonight
Found the culprit! it happens with multiple projects open in VSCode, say I have 2 projects open
tools.cli and I switch run the command on file of one project, and then switch to some other project’s file and run the command there.
I was opening these projects one by one and testing them 😕
Yeah, I pretty much always have at least two projects open, often more.
More than one folder in the workspace.
But the testing I was doing was all within the same project tree.
Thanks. I got worried that state was leaking between VS Code windows (which is how I have more than one project open).
Happy path worked on a
lein new re-frame rftest +test project in WSL remote mode... trying @U04V70XH6's muti folder setup + a few other possible edge cases I've seen in other projects
When I have multiple folders in the workspace, I get prompted to make a new file, and upon clicking create, it brings me to the test impl. It does not create a new file
Going to add comment to pr.
I have fixed some of the issues but seems like when I open multiple projects(in one window),
auto-add-ns functionality is not working. Tested that it works with a single project open.
okay, I see this as an open issue here - https://github.com/clojure-lsp/clojure-lsp/issues/416