scittle

borkdude 2025-08-20T09:51:57.344459Z

@p-himik @chris358 (and possibly others) I have made a scittle-dev branch in scittle. When running bb dist it will produce two version of scittle. One for production and one for development. Each version has source maps too.

$ ls dist
scittle.cljs-ajax.dev.js         scittle.dev.js.map               scittle.nrepl.dev.js             scittle.pprint.js.map            scittle.re-frame.js              scittle.replicant.dev.js.map
scittle.cljs-ajax.dev.js.map     scittle.js                       scittle.nrepl.dev.js.map         scittle.promesa.dev.js           scittle.re-frame.js.map          scittle.replicant.js
scittle.cljs-ajax.js             scittle.js-interop.dev.js        scittle.nrepl.js                 scittle.promesa.dev.js.map       scittle.reagent.dev.js           scittle.replicant.js.map
scittle.cljs-ajax.js.map         scittle.js-interop.dev.js.map    scittle.nrepl.js.map             scittle.promesa.js               scittle.reagent.dev.js.map
scittle.cljs-devtools.dev.js     scittle.js-interop.js            scittle.pprint.dev.js            scittle.promesa.js.map           scittle.reagent.js
scittle.cljs-devtools.dev.js.map scittle.js-interop.js.map        scittle.pprint.dev.js.map        scittle.re-frame.dev.js          scittle.reagent.js.map
scittle.dev.js                   scittle.js.map                   scittle.pprint.js                scittle.re-frame.dev.js.map      scittle.replicant.dev.js
Before I make a final build, perhaps you could try to build this locally and use it, to see if it's useful. Each dev file ends with .dev.js . The dev build also has the for pprinting CLJS data structures.

👍 1
p-himik 2025-08-20T09:53:09.132699Z

Is it different from the one I tried earlier?

borkdude 2025-08-20T09:54:39.914749Z

I'm not sure, probably not much, but would be good to double-check before I make a release later today. I'm also wondering if this is the best setup (naming everything .dev) while duplicating the build. Another way we could do it could be a /dev folder. Maybe this would be easier (at least for me); now I copy-pasted the whole build config and appended .dev to each module...

p-himik 2025-08-20T10:25:05.535929Z

Right, I'll try. I think that a separate dir makes more sense, especially if it's easier for you. Then switching to dev could be a matter of changing a single route on the server.

👍 1
borkdude 2025-08-20T12:49:36.758629Z

ok, this is what it's going to look like. please test again if you can.

borkdude 2025-08-20T12:50:52.760629Z

new commit also pushed to branch

p-himik 2025-08-20T13:09:49.132619Z

In the archive, the cljs-devtools file still has dev in its name. Do the files in the archive not have the stacktrace changes? I opened that reproduction when some JS function is nil while being called inside a JS event handler, and only the intermediate CLJS function is mentioned, with just a single entry in :sci.impl/callstack.

borkdude 2025-08-20T13:11:05.149079Z

it does, but in a JS event handler it doesn't work :-( I'll change the cljs-devtools name and put a release. incremental improvements after that

p-himik 2025-08-20T13:11:20.604549Z

Alright, cool.

p-himik 2025-08-20T13:12:19.209129Z

Huh, but it seems to work in js/setTimeout. Well, there's no pretty message, but at least the reported line is accurate and there are two callstack items.

borkdude 2025-08-20T13:14:44.397299Z

ah crap I didn't bump SCI

borkdude 2025-08-20T13:14:50.022649Z

third release...

borkdude 2025-08-20T13:16:11.441789Z

try scittle@0.7.26 on npm now (not considering the stack improvements though, just the dev build stuff)

p-himik 2025-08-20T13:21:09.425199Z

Ah, alright, that does bring back that missing line in the callstack. BTW, is there a way to pass some custom config to cljs-devtools on the user end? A call back to https://clojurians.slack.com/archives/C034FQN490E/p1755135377651389?thread_ts=1755019363.681209&cid=C034FQN490E.

borkdude 2025-08-20T13:22:02.683779Z

here's the release: https://github.com/babashka/scittle/releases/tag/v0.7.26 I'll come back to your question later...

👍 1
Chris McCormick 2025-08-21T03:47:41.530709Z

Dang this is so cool! I'm confused about the purpose of /dev. Is it to release stuff that's not yet ready for prod for people to test? Or will we always have to load from the /dev path when using devtools?

borkdude 2025-08-21T06:53:11.236469Z

Dev tools only works in dev mode. As a consequence of this you only get to use it with /dev

👍 1
borkdude 2025-08-20T14:14:21.398749Z

New scittle release: https://clojurians.slack.com/archives/C015AL9QYH1/p1755699240904319

🎉 2