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`.
bringe 2020-10-10T00:38:29.215200Z

Just curious, are you connecting via the command "Connect to a running REPL Serve in the Project?"

bringe 2020-10-10T00:39:03.215400Z

I think as long as you have the browser open to your app, it should work

bringe 2020-10-10T00:39:30.215600Z

What are you currently experiencing when trying?

bringe 2020-10-10T01:04:38.216200Z

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

1
❤️ 3
littleli 2020-10-10T11:29:28.234900Z

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

💯 1
littleli 2020-10-10T11:29:59.235100Z

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

🎉 1
bringe 2020-10-10T01:25:46.216400Z

It may also depend on if you started the repl with the deps Calva uses with jack-in. See here if you haven't: https://calva.io/connect/#connecting-wo-jack-in

Alper Cugun 2020-10-10T07:53:58.217600Z

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.

pez 2020-10-10T08:01:02.222600Z

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 Cugun 2020-10-10T08:04:07.223100Z

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

Alper Cugun 2020-10-10T08:04:16.223300Z

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

Alper Cugun 2020-10-10T08:04:30.223700Z

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

Alper Cugun 2020-10-10T08:06:30.224100Z

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

Alper Cugun 2020-10-10T08:07:34.224400Z

Something should show up in the Developer Tools Console?

borkdude 2020-10-10T09:59:58.224700Z

2
👀 1
🤘 2
pez 2020-10-10T10:44:39.225300Z

@alper is this in a Clojure project?

Alper Cugun 2020-10-10T10:45:15.225700Z

It’s a clj file in Clojure mode.

pez 2020-10-10T10:50:46.227Z

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 Cugun 2020-10-10T10:51:06.227700Z

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

Alper Cugun 2020-10-10T10:51:35.228300Z

What makes a project? I’m here from Getting Started: https://calva.io/workspace-layouts/

pez 2020-10-10T10:52:00.228700Z

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

pez 2020-10-10T10:52:57.229700Z

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 Cugun 2020-10-10T10:53:51.230800Z

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

pez 2020-10-10T10:54:05.231400Z

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

👍 1
Alper Cugun 2020-10-10T10:54:24.231800Z

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.

pez 2020-10-10T10:54:51.232400Z

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

Alper Cugun 2020-10-10T10:58:01.232800Z

Done: https://github.com/BetterThanTomorrow/calva/issues/811

❤️ 2
Alper Cugun 2020-10-10T11:01:06.233500Z

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

Alper Cugun 2020-10-10T11:01:08.233700Z

Thanks!

Alper Cugun 2020-10-10T11:01:42.234500Z

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 Cugun 2020-10-10T11:02:50.234700Z

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

💯 1
pez 2020-10-10T11:42:11.235500Z

Thanks!

Stefan 2020-10-10T11:54:01.239300Z

@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!)

pez 2020-10-10T11:58:09.239700Z

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

Stefan 2020-10-10T12:43:20.239900Z

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?

pez 2020-10-10T13:24:44.241100Z

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

Stefan 2020-10-10T14:34:43.241400Z

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.

pez 2020-10-10T15:40:48.241800Z

I'm pretty sure it is a local thing.

👍 1
☝️ 1
Stefan 2020-10-10T15:50:58.243800Z

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?

Stefan 2020-10-10T15:51:26.244200Z

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

pez 2020-10-10T16:01:24.244700Z

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.

pez 2020-10-11T14:15:42.250700Z

Haha, very cool!

Stefan 2020-10-11T14:18:58.250900Z

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.

pez 2020-10-11T14:20:51.251100Z

Yeah, that is nice. 👍

Stefan 2020-10-10T16:09:57.244900Z

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

pez 2020-10-10T16:14:31.245100Z

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

Stefan 2020-10-10T16:36:08.245300Z

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.

pez 2020-10-10T16:40:18.245500Z

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

💯 1