Fork me on GitHub
#chlorine-clover
<
2021-12-31
>
seancorfield04:12:31

The problem reappeared today but quitting and restarting VS Code "fixed it". This time, watching the dev tools, it looked like the root of the problem was in VS Code's own JS somewhere since I was also getting ERR reports from inside vscode.desktop.main.js I think (I'm not at my main machine now). It had been working fine all day and then I went to eval a small form in the middle of a function and nothing happened -- and the dev tools just showed a cascade of errors 😕

mauricio.szabo13:12:26

These kinds of bugs are really, really hard to debug. I remember once at Chlorine that on Atom, on a specific Mac version, if you never installed Chlorine before, the package refused to activate. No errors at console, no debug info, nothing - and only at release, minified, builds...

seancorfield16:12:28

I'll keep an eye out and see if there's any sort of pattern to it happening. I don't use my laptop enough to see whether it happens there too (Windows/WSL2).

Mattias13:12:35

Apropos (and tell me if I'm lazy asking) - how should I think of Clover compared to Calva? How much do they overlap and/or complement each other? I'm happy with what Clover/Chlorine does but don't know what I might be missing.

mauricio.szabo13:12:27

Clover shares almost 100% of Chlorine, with the exception of inline results and renderers based on node.js libraries 🙂

mauricio.szabo13:12:53

These 2 features are only missing in Clover because VSCode don't have the APIs that we need to support it (inline results can't render HTML, and the console tab is a webview that can't access the filesystem at all). If I could work-around these limitations, they would overlap 100%

mauricio.szabo13:12:01

(Did that answer your question, @UCW3QKWKT? I could expand more on that if you want!)

pez13:12:26

Calva provides a lot of static features (including formatting, Paredit, and all the nice things brought in via clojure-lsp). You can use it together with Clover. The overlap is with the dynamic side of things. You can choose which one to connect to the REPL on a case by case basis. Calva even has a setting where it will hide some of its REPL UI.

mauricio.szabo13:12:56

Oh, I misread that - I though that the question was how Chlorine compares to Clover 😄.

😂 1
mauricio.szabo13:12:11

Calva supports only nREPL, but supports it really well IMHO. Clover supports both nREPL and Socket-REPL, but nREPL support is subpar. Clover does try to not inject any code in your REPL, so it uses what it can detect (if you want autocomplete and don't have Compliment at the classpath, it'll use a simplified version for example). Calva does support more things out-of-the-box, and some that Clover will probably never support (like jack-in for example)

mauricio.szabo14:12:14

Clover does have "custom rendering" where you can customize the way you render things (see https://www.youtube.com/watch?v=_8z1r8KV9uk for an example) and you can define "custom commands" with ClojureScript too. Also, Clover only supports Shadow-CLJS for ClojureScript (for now) and it does have some interesting features at CLJS side like tap> support and automatic promise resolution (so you'll see the contents of a promise results instead of only Promise<~>).

seancorfield16:12:35

@UCW3QKWKT For me, as a long time Atom/Chlorine user and now VS Code/Clover user, the two big "selling points" for me are: 1) the ability to connect to a plain socket REPL running in any Clojure process (we run socket REPLs in QA and production, and having the same experience with VS Code as for local dev is awesome) and 2) not needing nREPL/Orchard/stuff added to my running app (nREPL "helps" by messing with the REPL in ways I find annoying -- see the many Qs in this Slack where someone gets "weird" results in their editor via nREPL but things work "properly" with a plain REPL).

seancorfield16:12:05

And then Chlorine/Clover let me write arbitrary commands for the editor in ClojureScript -- see my https://github.com/seancorfield/vscode-clover-setup/ for the customization I have around tap>, test running, integration with Portal and so on (the latter is mostly in my https://github.com/seancorfield/dot-clojure repo at this point).

seancorfield16:12:55

I also use Calva, but with the nREPL UI turned off. Calva brings a lot of useful "static" stuff, via LSP/clj-kondo, better formatting and highlighting, a well-maintained Paredit -- as @U0ETXRFEW said above. So I would recommend installing Calva with Clover and just turning off Calva's nREPL UI via that setting. That additional stuff is definitely worth having!

Mattias19:12:43

Thanks for the very patient and informative answers! It is a lot to take in take try out. And also New Year's Eve 😂 🎉

mauricio.szabo15:12:10

BTW, I found a bug on Clover: icons are indeed not showing. There's some "security policies" errors that don't allow me add a specific font to the console on the newer versions (gosh, it sounds insane just typing this...). I'll try to fix this too

1
mauricio.szabo19:12:00

Just published Clover with a new command editor/run-command that allows you to dispatch VSCode commands

metal 1
pez20:12:53

I think that can get very powerful.

seancorfield20:12:13

Nice! Can you provide an example invocation of it? Perhaps to open the SimpleBrowser to a specific URL?

seancorfield20:12:38

I don't see any updates here https://github.com/mauricioszabo/clover -- am I looking in the wrong place @U3Y18N0UC?

seancorfield00:01:02

Figured it out! Updated my VS Code config to open the Simple Browser for ClojureDocs and JavaDocs URLs: https://github.com/seancorfield/vscode-clover-setup/blob/develop/config.cljs#L219-L259

mauricio.szabo02:01:08

Wonderful, sorry I was away from the keyboard. Yeah, I updated the project's README to point to the gitlab repository

seancorfield07:01:43

@U3Y18N0UC Just read your post about why you're moving from GH to GitLab. I do share your frustrations about CircleCI. I used TravisCI until it became too unreliable and switched to CircleCI but I was never very happy with their setup. I added GH Actions to all my projects but initially kept CircleCI in place as well because their matrix testing was better and their caching story was better -- but GH Actions has overtaken them and I recently dropped CircleCI from all my projects and beefed up my GH Actions CI to do matrix testing and caching. GitLab is always going to be an also-ran / at-best-second in this space -- even if MS hadn't bought GH. I used to be very anti-MS but I've actually been very impressed with their increasing support for OSS across the board and I think the integrations between GH and VS Code are "best of breed" at this point. I think Copilot is "interesting" but neither very compelling nor something to get terribly upset about. I certainly have no plans to move my projects to inferior services over dogma... 🙂

seancorfield07:01:39

I find it a bit ironic that your GH version of Clover doesn't actually have a license as far as I can see -- and your GitLab version does (but does not state what the license is in the README -- I think it's MIT?)

mauricio.szabo17:01:21

Yeah, it's MIT. I actually forgot to add a license, and now I'm only updating the gitlab repo

mauricio.szabo18:01:36

As for circleci, I do like it a lot :). I did not have good experiences with GitHub Actions, so I would not use it even if I decide to keep using GH. As for Microsoft, they indeed increased support for OSS but I still see some of the same patterns and questionable practices (to day the least) with their software. I'm not really a "free software activist", at least not anymore, but I can't really agree on how they are doing things at their side. In fact, none of my projects at GitHub have a "copyleft license" so in theory copilot would not be an issue for me. But not having a way to opt out, the transcribing of verbatim code, and Microsoft increasing incorrect and misleading info about the product =to the point of multiple Microsoft posts disagreeing with each other) doesn't sound like something I would agree.

mauricio.szabo18:01:30

My experience with gitlab, so far, was not really bad. It's just slower, and uglier. Things would be different if I had to migrate to bitbucket, for example :rolling_on_the_floor_laughing:

mauricio.szabo19:12:05

Also fixes the icons 🙂