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.
Or this.
Clicking “show/hide” adds a new callback but doesn’t clear the last one.
it seems the finally block isn't running when you click
Yea.
I'll take a look
Thanks!
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
That was exactly it
Note that this code came verbatim from reagent: https://github.com/reagent-project/reagent/blob/e67d4f8804c109868469d6e81ecd7184cf707575/src/reagent/ratom.clj#L48
I've been meaning to do a scittle release anyway, so this came just in time, thanks :)
Cool!
Hmm, it was something else, but I'll figure it out. Something with advanced compilation
got it now
https://github.com/babashka/sci.configs/commit/2054ec8532604f7b6e60d6de8b9f6418255203dc
Should be fixed with 0.5.12 https://github.com/babashka/scittle/releases/tag/v0.5.12
Cool, I’ll check it out!
1 (ns main
2 (:require
^--- Could not find namespace cljs.pprint.
3 [cljs.pprint :refer [pprint]]
I’m sure it worked before.The other bug is fixed though!
Hmm.... I'll have another look
Did you include the pprint module?
https://cdn.jsdelivr.net/npm/scittle@0.5.12/dist/scittle.pprint.js
I downloaded them so that the page works as a “newtab” extension.
same error
Yea, no error if I use 0.4.11.
Darn, I'll take a look again then
@rgkirch Can you try with 0.5.13?
I should really have some automated tests for this
Maybe @lee will get bored soon and he wants to write some etaoin tests for this ;-)
btw I got where the error came from now
Cool. It looks fixed.
The ultimate release!
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