squint 2026-01-24

Hello! Is this intended?

$ npx squint -e '(pr-str js/undefined)'
file:///home/chrism/dev/eucalypt/node_modules/.pnpm/squint-cljs@0.9.183/node_modules/squint-cljs/src/squint/core.js:3026
  return `#object[${value.constructor.name}]`;
                          ^

TypeError: Cannot read properties of undefined (reading 'constructor')
    at toEDN (file:///home/chrism/dev/eucalypt/node_modules/.pnpm/squint-cljs@0.9.183/node_modules/squint-cljs/src/squint/core.js:3026:27)
    at file:///home/chrism/dev/eucalypt/node_modules/.pnpm/squint-cljs@0.9.183/node_modules/squint-cljs/src/squint/core.js:3030:27
    at Array.map (<anonymous>)
    at Module.pr_str (file:///home/chrism/dev/eucalypt/node_modules/.pnpm/squint-cljs@0.9.183/node_modules/squint-cljs/src/squint/core.js:3030:13)
    at file:///home/chrism/dev/eucalypt/.tmp4E5F53/squint.mjs:2:13
    at ModuleJob.run (node:internal/modules/esm/module_job:263:25)
    at async ModuleLoader.import (node:internal/modules/esm/loader:540:24)

Node.js v20.19.4
Latest Squint.

Amazing, will test, thank you!

All of these have been fixed and released

🎉 1

Not intended!

issue/PR welcome!

👍 1

If found another weird one. (I'm upgrading Squint to latest in Eucalypt). A lazy sequence inside and/or/cond causes the Vite compiler to throw an error. Apparently this is not valid JS syntax (although Node runs it, Vite does not like it):

12: if (squint_core.truth_((alive_QMARK_5 && yield* ((function* () {
                                             ^
https://github.com/squint-cljs/squint/issues/793

This was working in 0.9.174 so I guess something changed to do with generators.

oh that's bad

repro welcome

I did some optimizations that were probably too dangerous

1

There's a repro in the issue that should hopefully be simple to deploy.

You create two files in a directory and then run squint and then vite.

ah you already made an issue, great