calva

Wednesdays you might find @U0ETXRFEW in the Gather Calva space. Invite is https://gather.town/invite?token=GZqrm7CR and the password is `Be kind`.
Cris B 2021-02-19T00:22:05.463600Z

Sorry, a bit late coming back to this so I may have missed something - but is this intended to fix the spaces in user dir issue? I'm still getting it when jacking in with the 'fire up the getting started REPL' command: Error: Unable to access jarfile c:\Users\username

Bees 2021-02-19T02:59:17.463800Z

@pez, I added a few issues to the GitHub. I saw that in a commit you fixed one of the ones which stood out to me. "Wit" instead of "with." I didn't look to see if the others were changed. @cb.lists, I'm not sure. I know this fixed the issue I was having, but I didn't have a space in my user name. It seems likely that might still be a problem if the new update isn't working for you. With the released build are you having problems connecting or is it just this beta? pez would probably like to know if this is a persistent problem or something new.

Cris B 2021-02-19T03:04:47.464Z

@slack_clojurians - Not sure about the released version. I normally only use WSL (I don't even have clojure installed natively), and don't have a space in my Linux username 😉 I'll see what @pez has to say and dig further if it's useful. It's possible this test vsix didn't attempt to touch the space in filepaths issue.

pez 2021-02-19T06:37:18.468700Z

I was hoping that the space wasn't the problem. I think I can just quote the path to the jar, though. New vsix soon. I'm happy you have not installed clojure on the Windows side of things. Makes for a perfect test if this feature.

pez 2021-02-19T07:47:27.468900Z

New VSIX. 😃 The quoting doesn’t break it on my machine, at least. Let’s see if you can get this REPL fired up nos, @cb.lists. Please also test that you can start and connect a regular tools/deps project.

pez 2021-02-19T07:50:09.469100Z

Many thanks for your help with vetting the guides, @slack_clojurians. I haven’t had the time yet to go through it all, but have addressed some of the things I’ve found in the email notifications Guthub sends. Will of course examine it all. This will take some work to clean up and get to a shipping state and I really need help with finding the errors and the room for improvement.

pez 2021-02-19T07:57:13.472500Z

For anyone with some time to spare and a heart beating for the newcomers to Clojure or to Calva. https://11500-125431277-gh.circle-artifacts.com/0/tmp/artifacts/calva-2.0.173-814-connect-without-project-fa899f87.vsix) you can help me test. Here’s the relevant documentation page (outdated now, since I have changed my mind about some things while testing this, but still the spirit of the change should shine through). https://github.com/BetterThanTomorrow/calva/blob/814-connect-without-project/docs/site/getting-started.md

pez 2021-02-19T07:59:46.472700Z

For comments on the guides. I’m not sure how to collect those in an efficient way. For now, use this issue that @slack_clojurians started: https://github.com/BetterThanTomorrow/calva/issues/1039

ingesol 2021-02-19T08:34:24.476200Z

Hi! I'm migrating to calva these days, and so far it seems really nice. The one big disappointment so far has been code formatting, since cljfmt has issues with some variants of namespaced keywords: https://github.com/weavejester/cljfmt/issues/106. I know this is a problem that can only get fixed by people doing the job for free, se I'll just have to wait or do it myself. But my question is: Since I've heard so little about this, is the majority of clojure developers not using namespaced keywords in their codebases?

practicalli-john 2021-02-19T08:49:27.476400Z

I never used cljfmt in projects until the current project. There are some interesting formatting rules but some do not seem to fit my workflow. I think I disabled most of them in the end. I don't believe an effective workflow should be constrained by formatting. Cljfmt is an interesting project, although it's not the canonical way to format Clojure code (according to the cljfmt project readme).

ingesol 2021-02-19T08:52:11.476600Z

That's certainly true. But for 95% of my code layout, I fall back to just applying default formatting. It's particularly convenient for when you want the right side aligned in maps and lets. IMO that quickly gets out of sync if I don't auto format

ingesol 2021-02-19T08:52:25.476800Z

Do you not use auto formatting at all?

Stefan 2021-02-19T13:57:00.478600Z

I just posted this question in #reveal, but I’m not sure if it fits better over here, so I’m posting a link over here, hoping that someone recognizes my issue… https://clojurians.slack.com/archives/CUDTFQ152/p1613742962110400

2021-02-19T14:02:47.478800Z

It looks like I have 2 repls running now - I Let the nrepl start on startup then I tried to connect to running repl using deps.edn +shadow.cljs - I get the following error: clj꞉user꞉&gt;  ; Use alt+enter` to evaluate` ; Creating cljs repl session... ; Connecting cljs repl: deps.edn + shadow-cljs... ; The Calva Connection Log might have more connection progress information. ; Execution error (ClassNotFoundException) at <http://java.net|java.net>.URLClassLoader/findClass (URLClassLoader.java:381). shadow.cljs.devtools.api ; Error while connecting cljs REPL: TypeError: Cannot read property 'search' of undefined

pez 2021-02-19T14:56:31.479100Z

Hmmm, two things that might help resolve this. 1. Calva doesn’t have an option for starting the repl at startup. Maybe it had a long time ago, I seem to recall something like that. Check what extensions you have installed related to Clojure. If you have two Calva extensions, remove the one with the ugly logo. If you have the Clojure extension installed, you need to make a choice which one to use, at least per project. It will be confusing for you to know which one you are using. 2. For a deps.edn + shadow-cljs project you will need to configure dependencies and main aliases. There was some discussion about this in this channel not too long ago. Hopefully you can still find it if you search here on Slack. Otherwise the https://clojurians-log.clojureverse.org will have it. There is also some discussion in this issue: https://github.com/BetterThanTomorrow/calva/issues/1032

practicalli-john 2021-02-19T15:03:40.479400Z

I do use auto-formatting, via Emacs. which I just starting with LSP and cljfmt. Calva is a much smoother experience, but I still have a lot to learn. Hope you find some good suggestions.

1👍
pez 2021-02-19T15:08:24.479600Z

I think namespace keywords is very common. I think that it might be the namespace alias syntax that is problematic for the formatter, and maybe not as common. I think that the one who knows the current state of this as far as cljfmt is concerned might be @lee (because he knows stuff about rewrite-cljc). Then there is also that Calva uses an aging fork of cljfmt. There was work started to merge in latest, but it seems to have stopped. https://github.com/PEZ/cljfmt/pull/2

pez 2021-02-19T15:11:19.479900Z

I think it is with reach to make Calva use something like zprint for formatting (still would take a focused effort), but I also think it would run into the same problem. Since upstream it looks the same for both….

pez 2021-02-19T15:13:11.480100Z

Another option we have is to rely on Calva’s indenter as a backup. Then we wouldn’t get full formatting when we hit this problem, but at least get things indented. Of all options I see, this is the one with the least effort needed.

pez 2021-02-19T15:32:58.480300Z

Do you get the error also if you don’t use the middleware?

Stefan 2021-02-19T16:07:17.480500Z

No when I use the dep-only version from the calva doc then I don’t get these errors.

Stefan 2021-02-19T16:21:09.480700Z

I’m starting to suspect the Java version that I’m using. I’m using AdoptOpenJDK 8, and it seems with AdoptOpenJDK 11 it works better. I’ll test a bit more.

pez 2021-02-19T16:30:07.480900Z

There a keyboard shortcut for tapping. So maybe the deps-only option could work pretty well?

pez 2021-02-19T16:33:09.482300Z

Mostly curious. I haven’t quite figured out reveal myself, so have no idea how it is best used. 😃

lread 2021-02-19T16:33:34.482900Z

Hi folks! This issue will be addressed in rewrite-clj v1 which I am currently pushing toward an alpha release.

3👍1🤘
pez 2021-02-19T16:37:43.483200Z

So, then maybe if I update my cljfmt fork and make it use rewrite-cljc we can let Calva users opt in on testing it that way.

lread 2021-02-19T16:41:11.485700Z

rewrite-cljc is dead, but is reborn in the clj-commons/rewrite-clj v1 branch (which when ready, will be merged to main)

pez 2021-02-19T17:09:05.486Z

Awesome. I’m not even sad that you killed my name for it. 😃

lread 2021-02-19T17:32:17.486200Z

Ha!

2021-02-19T19:10:12.486800Z

Gees @pez, thank you! Calva makes it all possible, so thank you in turn for providing me with such a wonderful tool. Makes the sweat a little less salty, and the hours go by a little more quickly!

Cris B 2021-02-19T21:38:30.487100Z

Sorry to bear bad news again @pez, but I'm still getting an error with the 'hello world' task. I can see now the jar path arg is initially quote-wrapped, but somehow it's not again further along: java -jar "c:\Users\Crispin Bennett\.vscode\extensions\betterthantomorrow.calva-2.0.173-814-connect-without-project-fa899f87\deps.clj.jar" -Sdeps "{:deps {nrepl/nrepl {:mvn/version,""0.8.3""},cider/cider-nrepl {:mvn/version,""0.25.8""}}}" -m nrepl.cmdline --middleware "[cider.nrepl/cider-middleware]" ... [dependency downloads] ... Error building classpath. C:\Users\Crispin (Access is denied) <http://java.io|java.io>.FileNotFoundException: C:\Users\Crispin (Access is denied) at <http://java.io|java.io>.FileOutputStream.open0(Native Method)