Fork me on GitHub

Hello again, Calva friends. I'm working on improving stack trace output, but also have done some refactoring regarding how/when the repl prompt shows in the output window, and some other things. Please try out this vsix with the current state of changes. The more testing with this the better. CC @ales.najmann The stack trace file locations aren't clickable yet, but will be. Here's the PR if you want to see the changes.

calva 3
❤️ 9

Wow, it's a lot better now. 👏 😊

💯 3

...and for the first time I installed vscode extension from the side channel (I mean manual install)

🎉 3
Alper Cugun07:10:58

If I try to jack in (or connect otherwise) absolutely nothing seems to happen. Where can I see logs for what is going on? Calva Connection Log is empty.


The Calva Connection Log is wrongly named. It is a log with output from the cljs repl startup process. Can you describe step by step what you do? What ui elements you use, buttons you click, etcetera. Maybe we can get some clues there. Also the dev console might print something. You open that from the help menu.

Alper Cugun08:10:07

I’m looking. Just started code, went into Clojure mode and do CMD-SHFT-P, jack in.

Alper Cugun08:10:16

I haven’t touched any of this stuff in a long time.

Alper Cugun08:10:30

Now I tried reinstalling the extension and restarting code, and it says my Code is corrupt.

Alper Cugun08:10:30

(Never happened to me before. Get a new Code and overwrite the one in my Applications folder.)

Alper Cugun08:10:34

Something should show up in the Developer Tools Console?


@alper is this in a Clojure project?

Alper Cugun10:10:15

It’s a clj file in Clojure mode.


Calva doesn't know how to jack in then. But it doesn't tell you that. It just silently quits trying. We should improve that.

Alper Cugun10:10:06

I tried manually connecting to a lein I have running but that also does nothing?

Alper Cugun10:10:35

What makes a project? I’m here from Getting Started:


I think Calva doesn't handle that you don't have a project or workspace open.


We could probably fix that. In fact I think some of the work that @stefan.van.den.oord is currently doing might lead to this being easier to fix.

Alper Cugun10:10:51

Ah ok. I think it needs a project.clj looking through my old stuff.


Please file an issue about it. Calva should be able to connect from just a clojure mode file, I think.

👍 3
Alper Cugun10:10:24

I haven’t touched this in a while. I thought I’d just drop a clj file into my ~/Downloads folder and start hacking a bit.


Yeah. I think it makes sense to expect that to work.

Alper Cugun11:10:06

Cool. I copy pasted my old project file and moved the entire thing to a folder and now it’s kicking.

Alper Cugun11:10:42

I’m not sure whether it’s possible to forego the stuff in the project file. It seems that most of it could be replaced with your lein defaults?

Alper Cugun11:10:50

Also this is a lot quicker than last time I tried it out.

💯 3

@pez @brandon.ringe I got a question about my PR ( Can somebody help me on how to deal with the quickPickSingle and quickPickMulti (in utilities.ts)? They get a saveAs string, which contains a path. This path is, I believe, used to remember the previous choice that the user made, so that it can be pre-selected in the UI. Currently this is a local path though, so I’m trying to work out how this should work in the remote case. Should each user have its own version of that file? Should there be only one, which is used by all users? (race conditions!)


Can you use a stringyfied URI as the path, maybe? Iirc it is just used as a key.


Right it’s not actually used as a path but as a key into state.extensionContext.workspaceState. Would that be safe to use by multiple users at the same time (i.e. writing to the same key)? Shall we just assume that?


When would it ever be accessed by more than one user?


I guess I just don’t know how the mechanism works and where it is stored. This Memento thing is apparently some key-value store; where is it stored? If it’s always local on the user’s own machine then it’s OK.


I'm pretty sure it is a local thing.

👍 3
☝️ 3

Huh. Interesting. I just noticed that when I start a live share session in a jacked-in shadow-cljs-based project, the web server’s port 3000 is automatically shared over live share. Any idea what causes that?


I also want that for Calva’s CLJ nREPL port 🙂


Not sure if this explains it: > In Visual Studio Code, Live Share attempts to detect the proper application ports and share them.


Probably yes, that’s a nice feature. I guess we’ll have to make nREPL work over HTTP :rolling_on_the_floor_laughing:


There is a HTTP transport for nREPL, but I'm not sure how to use it or if it is any good.


No just joking. But maybe at some point in the future we can do the same using the vsls API. But that’s not a priority for me at this point.


No. manually sharing the port is a minor thing and also feels much safer than automatic sharing.

💯 3

Haha, very cool!


Nice detail by the way: when using this vsls API, VSCode will automatically ask the user to allow sharing the port, so it’s also safe in that respect.


Yeah, that is nice. 👍