Fork me on GitHub
#calva
<
2023-05-16
>
pez08:05:51

Dear Calva friends: https://github.com/BetterThanTomorrow/calva/releases/tag/v2.0.360 • Fix: https://github.com/BetterThanTomorrow/calva/issues/2194 Please have a look at this ClojureCLR starter project – https://github.com/PEZ/clojure-clr-starter – for why I noticed this misconfiguration. 😃

seancorfield16:05:07

Somewhere in a recent Calva update (prior to 2.0.360), my REPL connect sequences at work have broken:

"calva.replConnectSequences": [
    {
      "name": "World Singles Backend (Jack-In)",
      "projectType": "deps.edn",
      "cljsType": "none",
      "autoSelectForJackIn": true,
      "projectRootPath": ["/var/www/worldsingles"],
      "menuSelections": {
        "cljAliases": ["build", "dev", "+default", "test", "vscode-calva-jack-in"]
      }
    },
    {
      "name": "World Singles Backend (Connect)",
      "projectType": "deps.edn",
      "cljsType": "none",
      "autoSelectForConnect": true,
      "projectRootPath": ["/var/www/worldsingles"]
    }
  ],
I'm guessing I missed some change based on the enhancements recently added? When I jack-in now, I get prompted for project type (and it only offers Babashka, nbb, and Joyride -- even though this is a JVM deps.edn project).

pez16:05:15

I made changes around there, just the other day. Probably 2.0.359 even.

seancorfield16:05:31

I wondered if it was the handling of projectRootPath but the docs seem to indicate what I have above is still valid...?

seancorfield16:05:51

I tried ["/var", "www", "worldsingles"] just in case but no dice.

seancorfield16:05:33

It seems strange that it prompts for a project type tho', given projectType is specified in my custom jack-in...

seancorfield16:05:53

I can confirm that jack-in works with 2.0.358

seancorfield16:05:43

Broken in 2.0.359 and 2.0.360.

pez16:05:39

Then I broke it. Please file an issue.

seancorfield17:05:44

I believe I've identified the change that breaks things. I think absolute projectRootPath no longer works due to the changes in how paths are constructed in state.ts

seancorfield17:05:00

I changed projectRootPath to ["."] in my settings and it "works" (except that now certain pieces of code that expect to run in /var/www/worldsingles get confused because they're running in /home/sean/workspace/wsmain -- which is why projectRootPath needs to specify an absolute path for us).

seancorfield17:05:15

(I added a brief note to the issue)

pez17:05:43

Awesome.

pez20:05:11

Here’s a VSIX with a Calva that fixes this, and which still lets auto-selected connect sequences work on Windows: https://output.circle-artifacts.com/output/job/1d98bd3c-7c33-499d-89d4-733c7c6e3b88/artifacts/0/tmp/artifacts/calva-2.0.361-2197-connect-sequence-abs-root-ed96efc6.vsix I’ll release soon, but would be nice someone else confirming that things now work.

seancorfield21:05:25

For some reason I cannot comment on the GH issue or update my comment to confirm that, yes, the VSIX works for me!!

pez21:05:47

GH can have serious caching issues at times. Thanks for testing it!

pez22:05:24

Dear Calva friends: https://github.com/BetterThanTomorrow/calva/releases/tag/v2.0.361 • Fix regression: https://github.com/BetterThanTomorrow/calva/issues/2197 What broke, specifically, was when absolute paths were used in auto-selected connect sequences. Thanks @seancorfield for reporting and preparing a mise en place for me so that I could quickly just fix it. 🙏 ❤️

gratitude 1
seancorfield22:05:38

My wife teases me about being a mise en place style chef in the kitchen! 😆

pez22:05:59

That’s the only civilized way to be a chef!

💯 3
pez22:05:26

Time to heat the pan.

seancorfield22:05:40

In my head I'm now hearing the Muppets' theme music and have an image of the Swedish Chef in my head... :rolling_on_the_floor_laughing:

😂 3
seancorfield22:05:03

(Time to heat the pan => Time to start the music...)

pez22:05:47

Just before removed from the picture are two bowls with a bags in them that I have beside me while preparing my mise en place. For the garbage. Organic and non-organic. When ready to start the music I throw the bags in their respective bins.

seancorfield22:05:50

I think you are even more organized in the kitchen than I am! :man-bowing::skin-tone-2:

pez22:05:43

I’m not a very creative chef, though. But my wife is, so we make a good team there.