Fork me on GitHub
#calva
<
2020-10-10
>
bringe01:10:38

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. https://8201-125431277-gh.circle-artifacts.com/0/tmp/artifacts/calva-2.0.126-improve-stacktrace-output-bdc5fa30.vsix. 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. https://github.com/BetterThanTomorrow/calva/pull/806

calva 1
❤️ 3
littleli11:10:28

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

💯 1
littleli11:10:59

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

🎉 1
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.

pez08:10:02

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?

pez10:10:39

@alper is this in a Clojure project?

Alper Cugun10:10:15

It’s a clj file in Clojure mode.

pez10:10:46

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: https://calva.io/workspace-layouts/

pez10:10:00

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

pez10:10:57

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.

pez10:10:05

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

👍 1
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.

pez10:10:51

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.

💯 1
Stefan11:10:01

@pez @brandon.ringe I got a question about my PR (https://github.com/BetterThanTomorrow/calva/pull/805): 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!)

pez11:10:09

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

Stefan12:10:20

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?

pez13:10:44

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

Stefan14:10:43

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.

pez15:10:48

I'm pretty sure it is a local thing.

👍 1
☝️ 1
Stefan15:10:58

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?

Stefan15:10:26

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

pez16:10:24

Not sure if this explains it: https://docs.microsoft.com/en-us/visualstudio/liveshare/reference/security#sharing-a-local-server > In Visual Studio Code, Live Share attempts to detect the proper application ports and share them.

Stefan16:10:57

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

pez16:10:31

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

Stefan16:10:08

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.

pez16:10:18

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

💯 1
pez14:10:42

Haha, very cool!

Stefan14:10:58

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.

pez14:10:51

Yeah, that is nice. 👍