Fork me on GitHub
#calva
<
2023-07-13
>
pez14:07:41

Dear Calva friends, https://github.com/BetterThanTomorrow/calva/releases/tag/v2.0.377https://github.com/BetterThanTomorrow/calva/issues/2245 Thanks @craig373 for pointing this out and for helping with figuring out a behaviour to aim for. 🙏 ❤️ calva

🎉 2
Lukas Domagala15:07:53

Is it just me or are all rich comments now executed in the user ns?

MegaMatt17:07:47

my vscode calva seemed to break this morning after a vs code reboot. Primarily my comments don’t eval and i get sent back to user namespace. is this the fix for my problems?

MegaMatt17:07:41

reverting to the previous release fixes my problem

Lukas Domagala17:07:06

The workaround is to repeat (ns …) at the start of the comment block

MegaMatt17:07:52

is that a temporary work around? i’d rather just use an old version of calva myself for the time being.

Lukas Domagala18:07:28

I think so, although I wasn’t part of the design for this change 😅

pez18:07:40

It is not by design. I’m sorry. Will fix it tonight.

MegaMatt18:07:14

no problem @U0ETXRFEW. there is an easy work around

Craig Brozefsky02:07:22

noone here takes your hard work for granted

🙏 4
pez18:07:29

So, I broke rich comments with v2.0.377. I’m sorry about that! I’ll fix it tonight. Workaround is to have an in-ns or ns form at the start of the comment. Or downgrade to 376 for now.

❤️ 2
pez20:07:43

v2.0.238, containing the fix, is being built right now.

pez20:07:59

https://github.com/BetterThanTomorrow/calva/releases/tag/v2.0.378 • Fix: https://github.com/BetterThanTomorrow/calva/issues/2249 Again, super sorry for the inconvenience! 😢 I don’t know how I could miss that test case…

seancorfield21:07:24

Thanks for the timely fix: about 30 minutes after you released this, I needed to do some debugging on production via the from Calva/Portal and ran into the RCF bug, so a quick update and reload and I was back in debugging business! gratitude

pez21:07:43

Thanks for reporting back about it now working again! 🙏

djblue04:07:28

Not sure if this is related, but all my evals for the latest version (2.0.381) seem to be in the user ns, regardless of what file I'm in

pez05:07:25

Oh, no idea what could be up there, @U1G869VNV. Can you try with some previous versions and see if it is any different?

djblue17:07:53

So I tried all versions after 2.0.376, and none of them seem to work for me. 2.0.376 is the first one that works for me.

djblue17:07:30

Ohh, the cause seems to be related to how complex the ns declaration is: (ns portal.runtime) works as expected, but (ns ^:no-doc portal.runtime) will always eval my code in the user ns.

pez17:07:30

Thanks. I thought I had covered that case, but obviously not. Will fix. Please file an issue.

djblue17:07:26

I was gonna see about fixing it 😂

djblue17:07:44

Already added a test case

🙏 2
djblue18:07:30

I looks like the nsCheckCursor should already be skipping metadata https://github.com/BetterThanTomorrow/calva/blob/published/src/util/ns-form.ts#L41 :thinking_face:

pez18:07:52

I’m afk and can’t check very closely. Is your test case passing?

djblue18:07:29

No, I'm still trying to figure out why the metadata token isn't being skipped

seancorfield18:07:20

Calva treats metadata + symbol as one "thing": if you have (defn ^:foo ^:bar x[]) go back and forth by a single sexp, you'll see it treats ^:foo ^:bar x as a single sexp.

seancorfield18:07:11

I think if it went forward two sexp's and then backward to whitespace instead of forward to whitespace after one sexp (line 42), that might work? Ah, no, that's just skipping whitespace back or forward isn't it... my bad...

2
djblue18:07:55

Not sure, I've gotten spoiled with non-stateful code that I'm a little lost with the mutable cursors here 😂

pez19:07:16

Haha, as mutable as it gets.

pez12:07:16

I have it fixed in my local build. I’ve tripped myself up a bit with the cursor semantics around meta data I’ve invented… I’m considering if I should fix that too or just plaster this case up. Whatever I choose to do, fix should be out tonight.

🙏 2
djblue19:07:02

I pulled in the latest and everything is working for me, thanks for the quick fix! ❤️

🙏 2
pez12:07:16

I have it fixed in my local build. I’ve tripped myself up a bit with the cursor semantics around meta data I’ve invented… I’m considering if I should fix that too or just plaster this case up. Whatever I choose to do, fix should be out tonight.

🙏 2