Fork me on GitHub

Great news to wake up to! 😀


I'm not sure I follow about the task manager and which window is the one with the running java process. Closing the repl windows should not close any tasks, though.


How should people stop the jack-in task then?


The task can be terminated in several ways. Closing the project in vscode, using the Terminate Task command, or typing ctrl+c in the terminal running the task. Also running jack-in again will first terminate the current jack-in.


There's a new build in town. A nice guy sent in some PRs regarding styling of the repl prompt and the cursor. So now it doesn't glitch like it did when matching parens, but instead actually matches them, for instance. Also the cursor doesn't stress you out like before. I've also removed most of the how-to copy, becuase it got too much, imo.


I have gotten reports that the paredit commands start and stop working in mysterious ways both in the regular editors and in the repl window. I know exactly which piece of the code that fails me here, but continue to fail getting it right, appearantly. Quite strange that it behaves so differently on different machines. But anyway, my request for some pair programming partners from yesterday still stands. I think an extra brain on this will have it nailed in a jiffy.


@pez what is the code like for this paredit stuff? I tend to be a good second pair of eyes. I don't know the context here though :)


Awesome! This is not the Paredit code, per se, but rather how we capture the commands and send them to the right place. When the REPL window is active, it should have the commands, otherwise they should go to the active editor. What goes wrong is that we fail when figuring this out. At the very beginning of repl-window.ts there is this code:

export function activeReplWindow() {
    for (let w in replWindows) {
        if (replWindows[w]
            return replWindows[w];
    return undefined;
Which was a bit more complicated two days ago, while not quite working. I changed it to the above yesterday and it worked swell on my machine, but, yeah, it doesn’t work on all machines


Figuring out how that function should work involves wrapping ones head correctly around the vscode APIs. But I am starting to suspect we need to solve it some other way, because this function is hit quite often from different places. In any case, it still requires figuring out things about the vscode API.


What's happening on some machines?


What does active mean in this context?


How does something become active?


Active means ... Hmmm, that if I type something it will appear in the active pane.


I am not sure it is a machine thing, it could also be that I just haven't figured out when the bug appears. You can check if you have the condition by issuing Paredit expand selection (`ctrl+w`) in the repl window and in an editor pane.


What's the difference between active and focused? The vscode api mentions both.


But also, what's the bug? What are people reporting?


I'm not sure what the difference would be.


The bug is that paredit commands stop working.


Can users poke at these variables when this happens?


Well, can they poke at replWindows specifically


The only way to poke at that is to open or close repl windows. And there is only ever one repl window per “type” (`clj` or cljs).


If you have some time for a voice chat, I have too, at least right now.


So my suspicion is that replWindow is in a bad state somehow. I'm not sure what populates it. But a start might be a debug log from wherever it is updated, and some way in vscode to open a developer console and access that variable.


It is just a map from type (`"clj"` or "cljs") to instances of REPLWindow. And it is only manipulated when the window is created and when it is closed. I’ve checked it, it contains what it should contain (two REPLWindow instances) even when the bad behaviour shows up.


And are either of them active?


That is a bit trickier to determine. The function is hit a few times in the transition when the user moves the focus. And on my machine things work and I can’t make it not work


But on my machine it is hit trice. First time the window has the active state it had before the user action, the second and third time it has the new active state. I should go check up that thing with focused you mentioned


It's a shame you can't poke at the var, JavaScript is a very live environment.


How do you mean I should poke at the var? I can probably try to do that somehow


Like opening a console in the browser, and doing global.replWindows


Generally, the whole state management of Calva is a mess and a source of so many errors. When Calva 2 is out, first thing must be to clean that up. If some of you guys consider yourselves to be decent architects, I will appreciate some help with that then. Think about it, please.


(I'm just a poor product owner, remember?)


@pez Just let us know when the release is out! I’d like to go over the code at some point 🙂


ETA mid next week. 😃


Pondering a thing here... Calva + Clojure Warrior and you're set is quite nice. But VS Code allows me to bundle extensions. So instead of telling people to also install Clojure Warrior, maybe I should just bundle it? This would also be a way to handle when I evict the linter from Calva, a move enabled by @marc-omorain, who is going to make a separate extension for that. Calva can bundle that extension. So installing Calva will give you everything you need, REPL, formatter, Paredit, linter, visual paren matching... I think that would be the best beginner experience. What do you guys say?


Yes think it will help when everything you need to start gets bundled. Makes also easier to tell someone how to start 🙂


Haha! That's how I arrived at the thought. I was writing on a ”how to start” text.

😂 4

Hm, I like the idea of bundling everything in an easy to use extension. What about having also the option to install just “Calva Core”?


(Where Calva Core = REPL stuff only)


That's a bit what we have today. It's confusing for many users and a bit of a maintenance hell for me, so that's why Calva 2 goes in the other direction. But who knows if we find the right lines to separate things along it might be easier.


@slack1038, so we don’t have a quoting problem, as far as you know?


Also, I’d like to figure out if we have a zombie problem, or if it that something that can be taken care of with better information to the users.


@pez the quoting is with powershell still a problem (at least for me) Zombie: it seems to work fine when i close/terminate like you said at least for jack-in dont know how to do it when i connect to a nrepl currently i just close the window but i have the feeling that the connection is still open 😅