scittle

Richie 2022-12-22T18:40:27.460509Z

The timeout doesn’t get cleared and “finally” doesn’t print. I pasted this snippet into a shadow-cljs project and it works there but not when I use scittle. I can make a repo with a repro.

Richie 2022-12-22T18:45:25.236679Z

Or this.

Richie 2022-12-22T18:45:34.510969Z

Richie 2022-12-22T18:45:59.670179Z

Clicking “show/hide” adds a new callback but doesn’t clear the last one.

borkdude 2022-12-22T19:17:25.787329Z

it seems the finally block isn't running when you click

Richie 2022-12-22T19:17:38.775819Z

Yea.

borkdude 2022-12-22T19:18:56.150659Z

I'll take a look

Richie 2022-12-22T19:19:02.971039Z

Thanks!

borkdude 2022-12-22T19:19:34.099519Z

it might be because the predicate should be seq? instead of list? here - I've seen that before https://github.com/babashka/sci.configs/blob/0702ea5a21ad92e6d7cca6d36de84271083ea68f/src/sci/configs/reagent/reagent.cljs#L38

borkdude 2022-12-22T19:25:57.598039Z

That was exactly it

🎉 1
borkdude 2022-12-22T19:29:16.256339Z

Note that this code came verbatim from reagent: https://github.com/reagent-project/reagent/blob/e67d4f8804c109868469d6e81ecd7184cf707575/src/reagent/ratom.clj#L48

borkdude 2022-12-22T19:31:25.047839Z

I've been meaning to do a scittle release anyway, so this came just in time, thanks :)

Richie 2022-12-22T19:31:36.132829Z

Cool!

borkdude 2022-12-22T19:38:24.691829Z

Hmm, it was something else, but I'll figure it out. Something with advanced compilation

borkdude 2022-12-22T19:42:10.052279Z

got it now

borkdude 2022-12-22T20:28:14.374679Z

Should be fixed with 0.5.12 https://github.com/babashka/scittle/releases/tag/v0.5.12

Richie 2022-12-22T20:30:10.628199Z

Cool, I’ll check it out!

Richie 2022-12-22T20:56:29.846279Z

1  (ns main
2    (:require
     ^--- Could not find namespace cljs.pprint.
3     [cljs.pprint :refer [pprint]]
I’m sure it worked before.

Richie 2022-12-22T20:58:17.597329Z

The other bug is fixed though!

borkdude 2022-12-22T21:07:17.177619Z

Hmm.... I'll have another look

borkdude 2022-12-22T21:07:25.693569Z

Did you include the pprint module?

Richie 2022-12-22T21:12:29.061219Z

I downloaded them so that the page works as a “newtab” extension.

Richie 2022-12-22T21:17:04.890569Z

same error

Richie 2022-12-22T21:19:33.085259Z

Yea, no error if I use 0.4.11.

borkdude 2022-12-22T21:47:08.335389Z

Darn, I'll take a look again then

borkdude 2022-12-22T21:59:04.015899Z

@rgkirch Can you try with 0.5.13?

borkdude 2022-12-22T21:59:17.059509Z

I should really have some automated tests for this

borkdude 2022-12-22T21:59:45.328799Z

Maybe @lee will get bored soon and he wants to write some etaoin tests for this ;-)

1
borkdude 2022-12-22T22:03:38.469739Z

btw I got where the error came from now

Richie 2022-12-22T22:08:10.821069Z

Cool. It looks fixed.

👍 1
borkdude 2022-12-22T22:08:58.742909Z

The ultimate release!

👍 1
borkdude 2022-12-22T20:34:07.353329Z

https://github.com/babashka/scittle: execute Clojure(Script) directly from browser script tags via SCI! v0.5.13 (2022-12-23) • Fix reagent with-let macro with advanced compiled builds • Upgrade promesa and shadow-cljs • Fix #queue literal • SCI: performance improvements

1