<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>Clojure Q&amp;A - Recent questions and answers in ClojureScript</title>
<link>https://ask.clojure.org/index.php/qa/clojurescript</link>
<description></description>
<item>
<title>Missing protocol error will hang on infinite `(range)` input in ClojureScript but not Clojure</title>
<link>https://ask.clojure.org/index.php/15026/missing-protocol-error-infinite-range-clojurescript-clojure</link>
<description>&lt;p&gt;functions like &lt;code&gt;transient&lt;/code&gt;, &lt;code&gt;assoc&lt;/code&gt;, etc  will throw helpful missing-protocol error when receiving invalid input but it will hang if it receives infinite &lt;code&gt;(range)&lt;/code&gt;.&lt;br&gt;
this is related to issue below&lt;br&gt;
&lt;a rel=&quot;nofollow&quot; href=&quot;https://ask.clojure.org/index.php/14578/even-range-hangs?show=14578#q14578&quot;&gt;https://ask.clojure.org/index.php/14578/even-range-hangs?show=14578#q14578&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;however, missing-protocol only hang in clojurescript but not clojure so I am wondering if this difference is intended.&lt;/p&gt;
&lt;p&gt;example calls that should throws&lt;br&gt;
- &lt;code&gt;(transient (range))&lt;/code&gt;&lt;br&gt;
- &lt;code&gt;(assoc (range) :a 1)&lt;/code&gt;&lt;/p&gt;
</description>
<category>ClojureScript</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/15026/missing-protocol-error-infinite-range-clojurescript-clojure</guid>
<pubDate>Fri, 03 Apr 2026 11:16:47 +0000</pubDate>
</item>
<item>
<title>TypedArrays don't implement ICounted in cljs</title>
<link>https://ask.clojure.org/index.php/14919/typedarrays-dont-implement-icounted-in-cljs</link>
<description>&lt;p&gt;I just discovered that JS TypedArrays (&lt;code&gt;Uint8Array&lt;/code&gt; et al) do not implement &lt;code&gt;ICounted&lt;/code&gt; out of the box, even though it's trivial to make them do so. As a result &lt;code&gt;count&lt;/code&gt; doesn't work on them; this is in contrast to Clojure where &lt;code&gt;count&lt;/code&gt; works on arrays of primitives. Can/should this be added, or is the current behaviour intended?&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;(count (js/Uint8Array. [1 2 3]))
;; Execution error (Error) at (&amp;lt;cljs repl&amp;gt;:1).
;; No protocol method ICounted.-count defined for type object: 1,2,3
;=&amp;gt; :repl/exception!

(extend-protocol ICounted
 js/Uint8Array 
 (-count [this] (alength this)))
;=&amp;gt; #object [Function]

(count (js/Uint8Array. [1 2 3]))
;=&amp;gt; 3
&lt;/code&gt;&lt;/pre&gt;
</description>
<category>ClojureScript</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14919/typedarrays-dont-implement-icounted-in-cljs</guid>
<pubDate>Thu, 05 Feb 2026 12:37:54 +0000</pubDate>
</item>
<item>
<title>Answered: false positive warning: &quot;cljs.core/+, all arguments must be numbers&quot;</title>
<link>https://ask.clojure.org/index.php/14870/false-positive-warning-cljs-core-all-arguments-must-numbers?show=14871#a14871</link>
<description>&lt;p&gt;The problem is the &lt;code&gt;when&lt;/code&gt;. The inference mechanism isn't strong enough to narrow the return type (number|nil) if the type of the argument is known.&lt;/p&gt;
</description>
<category>ClojureScript</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14870/false-positive-warning-cljs-core-all-arguments-must-numbers?show=14871#a14871</guid>
<pubDate>Tue, 06 Jan 2026 20:07:06 +0000</pubDate>
</item>
<item>
<title>Answered: ClojureScript :preloads doesn't work with just cljs.main --repl</title>
<link>https://ask.clojure.org/index.php/14863/clojurescript-preloads-doesnt-work-with-just-cljs-main-repl?show=14867#a14867</link>
<description>&lt;p&gt;I just figured that the preloads do get compiled, it is just that the goog.requires aren't being added to the on-the-fly generated main.js.&lt;/p&gt;
&lt;p&gt; Leaving a possible patch here in case there is interest :&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;diff --git a/src/main/clojure/cljs/cli.clj b/src/main/clojure/cljs/cli.clj
index da4f2761..9087151c 100644
--- a/src/main/clojure/cljs/cli.clj
+++ b/src/main/clojure/cljs/cli.clj
@@ -321,7 +321,8 @@ present&quot;
         reopts (merge repl-env-options (select-keys opts [:main :output-dir]))
         _      (when (or ana/*verbose* (:verbose opts))
                  (util/debug-prn &quot;REPL env options:&quot; (pr-str reopts)))
-        renv   (apply (target-&amp;gt;repl-env (:target options) repl-env) (mapcat identity reopts))]
+        renv   (-&amp;gt; (apply (target-&amp;gt;repl-env (:target options) repl-env) (mapcat identity reopts))
+                   (assoc :compiler-opts opts))]
     (repl/repl* renv
       (assoc opts
         ::repl/fast-initial-prompt?
diff --git a/src/main/clojure/cljs/repl/browser.clj b/src/main/clojure/cljs/repl/browser.clj
index 2c907c6d..9b333127 100644
--- a/src/main/clojure/cljs/repl/browser.clj
+++ b/src/main/clojure/cljs/repl/browser.clj
@@ -182,7 +182,7 @@
 
 (defn send-static
   [{path :path :as request} conn
-   {:keys [static-dir output-dir host port gzip?] :or {output-dir &quot;out&quot;} :as opts}]
+   {:keys [static-dir output-dir host port gzip? compiler-opts] :or {output-dir &quot;out&quot;} :as opts}]
   (let [output-dir (when-not (.isAbsolute (io/file output-dir)) output-dir)]
     (if (and static-dir (not= &quot;/favicon.ico&quot; path))
       (let [path (if (= &quot;/&quot; path) &quot;/index.html&quot; path)
@@ -224,7 +224,11 @@
                                       clojure.browser.repl/PORT ~port}
                                   (merge (:closure-defines @browser-state))
                                   cljsc/normalize-closure-defines
-                                  json/write-str)]
+                                  json/write-str)
+                preloads (when-let [preloads (:preloads compiler-opts)]
+                           (mapv (fn [ns-symb]
+                                   (str &quot;document.write('&amp;lt;script&amp;gt;goog.require(\&quot;&quot; (munge ns-symb) &quot;\&quot;);&amp;lt;/script&amp;gt;');&quot;))
+                                 preloads))]
             (server/send-and-close conn 200
               (str &quot;var CLOSURE_UNCOMPILED_DEFINES = &quot; closure-defines &quot;;\n&quot;
                    &quot;var CLOSURE_NO_DEPS = true;\n&quot;
@@ -233,6 +237,7 @@
                    (when (.exists (io/file output-dir &quot;cljs_deps.js&quot;))
                      (str &quot;document.write('&amp;lt;script src=\&quot;&quot; output-dir &quot;/cljs_deps.js\&quot;&amp;gt;&amp;lt;/script&amp;gt;');\n&quot;))
                    &quot;document.write('&amp;lt;script src=\&quot;&quot; output-dir &quot;/brepl_deps.js\&quot;&amp;gt;&amp;lt;/script&amp;gt;');\n&quot;
+                   (when preloads (str/join &quot;\n&quot; preloads))
                    &quot;document.write('&amp;lt;script&amp;gt;goog.require(\&quot;clojure.browser.repl.preload\&quot;);&amp;lt;/script&amp;gt;');\n&quot;)
               &quot;text/javascript&quot; &quot;UTF-8&quot;))
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;It is basically adding the compiler options to the repl environment, so they are available when generating main.js, then adding one goog.require per preload.&lt;/p&gt;
</description>
<category>ClojureScript</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14863/clojurescript-preloads-doesnt-work-with-just-cljs-main-repl?show=14867#a14867</guid>
<pubDate>Fri, 26 Dec 2025 20:13:53 +0000</pubDate>
</item>
<item>
<title>Answered: `(max &quot;x&quot; &quot;y&quot;)` used to return &quot;y&quot;, now it returns &quot;x&quot;</title>
<link>https://ask.clojure.org/index.php/14847/max-x-y-used-to-return-y-now-it-returns-x?show=14850#a14850</link>
<description>&lt;p&gt;The docstring of max implies that it should be used for numbers.&lt;/p&gt;
</description>
<category>ClojureScript</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14847/max-x-y-used-to-return-y-now-it-returns-x?show=14850#a14850</guid>
<pubDate>Mon, 22 Dec 2025 16:57:28 +0000</pubDate>
</item>
<item>
<title>Answered: `derive [tag] [parent]` accepts non namespaced keyword/symbol as `tag` ?</title>
<link>https://ask.clojure.org/index.php/14759/derive-tag-parent-accepts-non-namespaced-keyword-symbol-tag?show=14844#a14844</link>
<description>&lt;p&gt;Reading between the lines of this &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/clojure/clojure/commit/d49f0d32473d8387696049b8b10b8403d86e05e4&quot;&gt;commit message&lt;/a&gt;, it seems like the intent was to relax the requirements on namespacing for private hierarchies (so, required for global but not for private).&lt;/p&gt;
&lt;p&gt;Thus, I'm going to treat this as documentation issue in Clojure (presumably adding this constraint would break some existing code). Logged as &lt;a rel=&quot;nofollow&quot; href=&quot;https://clojure.atlassian.net/browse/CLJ-2934&quot;&gt;https://clojure.atlassian.net/browse/CLJ-2934&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Not sure on CLJS.&lt;/p&gt;
</description>
<category>ClojureScript</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14759/derive-tag-parent-accepts-non-namespaced-keyword-symbol-tag?show=14844#a14844</guid>
<pubDate>Mon, 15 Dec 2025 20:54:55 +0000</pubDate>
</item>
<item>
<title>Answered: How does `parents` work for JavaScript inheritance?</title>
<link>https://ask.clojure.org/index.php/14764/how-does-parents-work-for-javascript-inheritance?show=14780#a14780</link>
<description>&lt;p&gt;Hi! We can probably walk the prototype chain. It's just an oversight as this is not a commonly used feature. I created &lt;a rel=&quot;nofollow&quot; href=&quot;https://clojure.atlassian.net/browse/CLJS-3464&quot;&gt;https://clojure.atlassian.net/browse/CLJS-3464&lt;/a&gt;. Patch welcome of course!&lt;/p&gt;
</description>
<category>ClojureScript</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14764/how-does-parents-work-for-javascript-inheritance?show=14780#a14780</guid>
<pubDate>Tue, 25 Nov 2025 20:41:00 +0000</pubDate>
</item>
<item>
<title>Possible ClojureScript bug: corner case with regex literal compilation</title>
<link>https://ask.clojure.org/index.php/14717/possible-clojurescript-corner-regex-literal-compilation</link>
<description>&lt;p&gt;I've found what I believe to be a bug in ClojureScript regarding compilation of certain regex literals to JavaScript, a specific example being &lt;code&gt;#&quot;(?i)&quot;&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;In some cases, &lt;code&gt;#&quot;(?i)&quot;&lt;/code&gt; will be compiled to the JavaScript syntax &lt;code&gt;//i&lt;/code&gt;, which is in fact &lt;em&gt;not&lt;/em&gt; a JavaScript regex literal, but rather a JavaScript single line comment.  This then comments out all remaining code on the same generated line, resulting in a syntax error when the code is run on a JavaScript runtime.&lt;/p&gt;
&lt;p&gt;This minimal unit test example demonstrates the issue:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;(ns regex-test&lt;/code&gt;&lt;br&gt;
&lt;code&gt;  (:require [cljs.test :refer-macros [deftest testing is]]))&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;(deftest failing-test&lt;/code&gt;&lt;br&gt;
&lt;code&gt;  (testing &quot;Minimal reproduction&quot;&lt;/code&gt;&lt;br&gt;
&lt;code&gt;    (is (not (nil? #&quot;(?i)&quot;)))))&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;As a side note, it's worth mentioning that &lt;code&gt;(?i)&lt;/code&gt; is not a valid native JavaScript regex in the first place, so I assume ClojureScript is trying to emulate compatibility with JVM regexes (where this is valid), and converting it to the nearest valid JS equivalent - either &lt;code&gt;(?i:)&lt;/code&gt; (e.g. at the REPL), or &lt;code&gt;//i&lt;/code&gt; (in compiled code, but which is syntactically not a JS regex literal at all).&lt;/p&gt;
</description>
<category>ClojureScript</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14717/possible-clojurescript-corner-regex-literal-compilation</guid>
<pubDate>Sun, 21 Sep 2025 02:59:22 +0000</pubDate>
</item>
<item>
<title>Answered: Is it possible to get ClojureScript hot reload in a Chrome Extension?</title>
<link>https://ask.clojure.org/index.php/13786/is-possible-get-clojurescript-hot-reload-chrome-extension?show=14590#a14590</link>
<description>&lt;p&gt;I also went down this rabbit hole &amp;amp; discovered a JS-library that enables Hot Module Reloading even for content scripts -&lt;/p&gt;
&lt;p&gt; &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/crxjs/chrome-extension-tools&quot;&gt;https://github.com/crxjs/chrome-extension-tools&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I wonder could shadow-cljs take advantage of the same trick to allow creating a REPL connection&lt;/p&gt;
</description>
<category>ClojureScript</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/13786/is-possible-get-clojurescript-hot-reload-chrome-extension?show=14590#a14590</guid>
<pubDate>Wed, 25 Jun 2025 08:23:19 +0000</pubDate>
</item>
<item>
<title>Answered: Cannot compile namespace including `+` in clojurescript</title>
<link>https://ask.clojure.org/index.php/14551/cannot-compile-namespace-including-in-clojurescript?show=14552#a14552</link>
<description>&lt;p&gt;Similar issue: &lt;a rel=&quot;nofollow&quot; href=&quot;https://clojure.atlassian.net/browse/CLJS-3430&quot;&gt;https://clojure.atlassian.net/browse/CLJS-3430&lt;/a&gt;&lt;/p&gt;
</description>
<category>ClojureScript</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14551/cannot-compile-namespace-including-in-clojurescript?show=14552#a14552</guid>
<pubDate>Tue, 20 May 2025 15:31:44 +0000</pubDate>
</item>
<item>
<title>Answered: Bug in Clojurescript string/split with limit?</title>
<link>https://ask.clojure.org/index.php/14514/bug-in-clojurescript-string-split-with-limit?show=14519#a14519</link>
<description>&lt;p&gt;I have done some more digging and found other problems. The regex &lt;code&gt;#&quot;&amp;amp;([^;\s&amp;lt;&amp;amp;]+);?&quot;&lt;/code&gt; should (a) work and (b) include capturing groups in the result.&lt;/p&gt;
&lt;p&gt;As far as I understand, this regex does not include lookaheads or -behinds.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;(string/split &quot;a&amp;amp;amp;b&amp;amp;amp;c&quot; #&quot;&amp;amp;([^;\s&amp;lt;&amp;amp;]+);?&quot;)
;=&amp;gt; [&quot;a&quot; &quot;amp&quot; &quot;b&quot; &quot;amp&quot; &quot;c&quot;]
(string/split &quot;a&amp;amp;amp;b&amp;amp;amp;c&quot; #&quot;&amp;amp;([^;\s&amp;lt;&amp;amp;]+);?&quot; 5)
;=&amp;gt; [&quot;&quot; &quot;&quot; &quot;&quot; &quot;&quot; &quot;p;b&amp;amp;amp;c&quot;]
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The &lt;a rel=&quot;nofollow&quot; href=&quot;https://clojure.atlassian.net/browse/CLJS-2528&quot;&gt;https://clojure.atlassian.net/browse/CLJS-2528&lt;/a&gt; patch no 5 does not resolve this problem, as far as I've been able to implement it.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;(let [limit 100
    re #&quot;&amp;amp;([^;\s&amp;lt;&amp;amp;]+);?&quot;
    s &quot;a&amp;amp;amp;b&amp;amp;amp;c&quot;]
(let [limit (dec limit)
      re (js/RegExp. (.-source re)
                     (cond-&amp;gt; &quot;g&quot;
                             (.-ignoreCase re) (str &quot;i&quot;)
                             (.-multiline re) (str &quot;m&quot;)
                             (.-unicode re) (str &quot;u&quot;)))]
  (loop [s s, parts []]
    (if (or (&amp;lt;= limit (count parts))
            (string/blank? s))
      (conj parts s)
      (let [m (.exec re s)]
        (if (nil? m)
          (conj parts s)
          (let [_ (println m)
                index (.-index m)
                matched-str (aget m 0)
                matched-str-len (count matched-str)
                next-parts (cond-&amp;gt; parts
                                   (and (or (&amp;lt; 0 index)
                                            (&amp;lt; 0 matched-str-len))
                                        (not= s matched-str))
                                   (conj (.substring s 0 index)))]
            (if (&amp;lt;= (count s) (+ index (count matched-str)))
              next-parts
              (do
                (set! (.-lastIndex re)
                      (if (and (== 0 index)
                               (== 0 matched-str-len))
                        1 0))
                (recur (.substring s (+ index (count matched-str)))
                                    next-parts))))))))))
;=&amp;gt;  [&quot;a&quot; &quot;b&quot; &quot;c&quot;]
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The string is correctly split but does not include the capturing groups.&lt;/p&gt;
</description>
<category>ClojureScript</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14514/bug-in-clojurescript-string-split-with-limit?show=14519#a14519</guid>
<pubDate>Wed, 23 Apr 2025 13:27:37 +0000</pubDate>
</item>
<item>
<title>regular expression with Classes for Unicode scripts, blocks, categories and binary properties</title>
<link>https://ask.clojure.org/index.php/14513/regular-expression-classes-unicode-categories-properties</link>
<description>&lt;p&gt;In Clojure, the following expression works fine:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;(re-matches #&quot;\p{Lu}&quot; &quot;Á&quot;) ;; =&amp;gt; &quot;Á&quot;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;But in Clojurescript, it returns &lt;code&gt;nil&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;It is not that Javascript doesn't support that kind of Unicode classess, but you have to activate them explicitly, whether in Java, they are activated by default.&lt;/p&gt;
&lt;p&gt;E.g. In Javascript, the following code returns true:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;/\p{Lu}/u.test(&quot;Á&quot;) // =&amp;gt; true
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;But if I omit the Unicode flag (&lt;code&gt;/u&lt;/code&gt;) I get false:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;/\p{Lu}/.test(&quot;Á&quot;) // =&amp;gt; false
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;I think this is probably because Clojure Script doesn't activates the Unicode flag for us.&lt;/p&gt;
&lt;p&gt;If that the case, I think consistency between Clojurescript and Clojure could benefit a lot if the flag is activated by default.&lt;/p&gt;
</description>
<category>ClojureScript</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14513/regular-expression-classes-unicode-categories-properties</guid>
<pubDate>Tue, 22 Apr 2025 15:39:14 +0000</pubDate>
</item>
<item>
<title>Is cljs.test swallowing exceptions?</title>
<link>https://ask.clojure.org/index.php/14509/is-cljs-test-swallowing-exceptions</link>
<description>&lt;p&gt;Hi! Thanks for ClojureScript - we're using it more and more and it's amazing.&lt;/p&gt;
&lt;p&gt;Something has been bothering me about testing in the repl, and I figured out what it is today.&lt;/p&gt;
&lt;p&gt;Check this out:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;harold@straylight:~/src/cljs-test-exception$ cat deps.edn 
{:deps {org.clojure/clojurescript {:mvn/version &quot;1.11.132&quot;}}}
harold@straylight:~/src/cljs-test-exception$ clj -M --main cljs.main --repl
ClojureScript 1.11.132
cljs.user=&amp;gt; (require '[cljs.test :refer [deftest]])
nil
cljs.user=&amp;gt; (deftest foo [] (throw (js/Error. &quot;oops!&quot;)))
#'cljs.user/foo
cljs.user=&amp;gt; (foo)

ERROR in (foo) (Error:NaN:NaN)
Uncaught exception, not in assertion.
expected: nil
  actual: #object[Error Error: oops!]
nil
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;When I have a test that's calling into buggy code and an exception is thrown, I don't get the stack trace.&lt;/p&gt;
&lt;p&gt;Compare this with &lt;code&gt;clojure.test&lt;/code&gt;, which has more helpful output:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;user&amp;gt; (require '[clojure.test :refer [deftest]])
nil
user&amp;gt; (deftest foo [] (throw (Exception. &quot;Ooops!&quot;)))
#'user/foo
user&amp;gt; (foo)

ERROR in (foo) (NO_SOURCE_FILE:13)
Uncaught exception, not in assertion.
expected: nil
  actual: java.lang.Exception: Ooops!
 at user$fn__10841.invokeStatic (NO_SOURCE_FILE:13)
    user/fn (NO_SOURCE_FILE:13)
    clojure.test$test_var$fn__9894.invoke (test.clj:717)
    clojure.test$test_var.invokeStatic (test.clj:717)
    clojure.test$test_var.invoke (test.clj:708)
    user$foo.invokeStatic (NO_SOURCE_FILE:13)
    user$foo.invoke (NO_SOURCE_FILE:13)
    user$eval10844.invokeStatic (NO_SOURCE_FILE:15)
    user$eval10844.invoke (NO_SOURCE_FILE:15)
    clojure.lang.Compiler.eval (Compiler.java:7700)
    nrepl.middleware.interruptible_eval$evaluator$run__1435$fn__1446.invoke (interruptible_eval.clj:106)
    nrepl.middleware.interruptible_eval$evaluator$run__1435.invoke (interruptible_eval.clj:101)
    nrepl.middleware.session$session_exec$session_loop__1519.invoke (session.clj:230)
    nrepl.SessionThread.run (SessionThread.java:21)
nil
&lt;/code&gt;&lt;/pre&gt;
&lt;hr&gt;
&lt;p&gt;Maybe cljs.test could be improved to also include this useful information. I believe it would help with repl test/debugging workflows.&lt;/p&gt;
&lt;p&gt;Thanks so much for your time and consideration.&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;Edit:&lt;/p&gt;
&lt;p&gt;Eugene makes an interesting point in the comments.&lt;/p&gt;
&lt;p&gt;There is a similar difference in exception/error printing:&lt;/p&gt;
&lt;p&gt;In cljs:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;harold@straylight:~/src/cljs-test-exception$ clj -M --main cljs.main --repl
ClojureScript 1.11.132
cljs.user=&amp;gt; (ex-info &quot;hi&quot; {})
#error {:message &quot;hi&quot;, :data {}}
cljs.user=&amp;gt; 
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;In clj:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;user&amp;gt; (ex-info &quot;hi&quot; {})
#error {
 :cause &quot;hi&quot;
 :data {}
 :via
 [{:type clojure.lang.ExceptionInfo
   :message &quot;hi&quot;
   :data {}
   :at [user$eval8563 invokeStatic &quot;NO_SOURCE_FILE&quot; 11]}]
 :trace
 [[user$eval8563 invokeStatic &quot;NO_SOURCE_FILE&quot; 11]
  [user$eval8563 invoke &quot;NO_SOURCE_FILE&quot; 11]
  [clojure.lang.Compiler eval &quot;Compiler.java&quot; 7700]
  [nrepl.middleware.interruptible_eval$evaluator$run__1435$fn__1446 invoke &quot;interruptible_eval.clj&quot; 106]
  [nrepl.middleware.interruptible_eval$evaluator$run__1435 invoke &quot;interruptible_eval.clj&quot; 101]
  [nrepl.middleware.session$session_exec$session_loop__1519 invoke &quot;session.clj&quot; 230]
  [nrepl.SessionThread run &quot;SessionThread.java&quot; 21]]}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;However, in the testing case, &lt;code&gt;clojure.test&lt;/code&gt; explicitly prints the stack trace:&lt;/p&gt;
&lt;p&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/clojure/clojure/blob/fb22fd778a272b034684a4ee94509552b46ee8a9/src/clj/clojure/test.clj#L394&quot;&gt;https://github.com/clojure/clojure/blob/fb22fd778a272b034684a4ee94509552b46ee8a9/src/clj/clojure/test.clj#L394&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;While cljs does not:&lt;/p&gt;
&lt;p&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/clojure/clojurescript/blob/d701b452b3f0b09f13191094bff9d5763a449191/src/main/cljs/cljs/test.cljs#L338-L344&quot;&gt;https://github.com/clojure/clojurescript/blob/d701b452b3f0b09f13191094bff9d5763a449191/src/main/cljs/cljs/test.cljs#L338-L344&lt;/a&gt;&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;It does still seem like the Error object is being swallowed, I don't see a way to gain access to it after running the test that threw.&lt;/p&gt;
</description>
<category>ClojureScript</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14509/is-cljs-test-swallowing-exceptions</guid>
<pubDate>Fri, 18 Apr 2025 16:09:48 +0000</pubDate>
</item>
<item>
<title>Answered: Protocol function with placeholder _ arguments doesn't work as in Clojure</title>
<link>https://ask.clojure.org/index.php/14469/protocol-function-with-placeholder-arguments-doesnt-clojure?show=14470#a14470</link>
<description>&lt;p&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://clojure.atlassian.net/browse/CLJS-3431&quot;&gt;https://clojure.atlassian.net/browse/CLJS-3431&lt;/a&gt;&lt;br&gt;
This issue was made in response&lt;/p&gt;
</description>
<category>ClojureScript</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14469/protocol-function-with-placeholder-arguments-doesnt-clojure?show=14470#a14470</guid>
<pubDate>Mon, 17 Mar 2025 18:30:27 +0000</pubDate>
</item>
<item>
<title>Answered: Source maps show the wrong row in ClojureScript</title>
<link>https://ask.clojure.org/index.php/14441/source-maps-show-the-wrong-row-in-clojurescript?show=14451#a14451</link>
<description>&lt;p&gt;What optimization setting are we talking about here, &lt;code&gt;:none&lt;/code&gt;?&lt;/p&gt;
</description>
<category>ClojureScript</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14441/source-maps-show-the-wrong-row-in-clojurescript?show=14451#a14451</guid>
<pubDate>Thu, 06 Mar 2025 21:56:33 +0000</pubDate>
</item>
<item>
<title>Answered: ClojureScript: Destructuring two keys differing only on dash vs underscore doesn't work</title>
<link>https://ask.clojure.org/index.php/14370/clojurescript-destructuring-differing-underscore-doesnt?show=14383#a14383</link>
<description>&lt;p&gt;I think this is just a bug, not a limitation - thanks for the report tracking here - &lt;a rel=&quot;nofollow&quot; href=&quot;https://clojure.atlassian.net/browse/CLJS-3426&quot;&gt;https://clojure.atlassian.net/browse/CLJS-3426&lt;/a&gt;&lt;/p&gt;
</description>
<category>ClojureScript</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14370/clojurescript-destructuring-differing-underscore-doesnt?show=14383#a14383</guid>
<pubDate>Mon, 10 Feb 2025 17:33:28 +0000</pubDate>
</item>
<item>
<title>Answered: How to get interactive programming back when using shadow-cljs with dynamically rendered html</title>
<link>https://ask.clojure.org/index.php/14250/interactive-programming-using-shadow-dynamically-rendered?show=14267#a14267</link>
<description>&lt;p&gt;Are you talking about stoping autoreload? &lt;a rel=&quot;nofollow&quot; href=&quot;https://shadow-cljs.github.io/docs/UsersGuide.html#_config&quot;&gt;https://shadow-cljs.github.io/docs/UsersGuide.html#_config&lt;/a&gt;&lt;/p&gt;
</description>
<category>ClojureScript</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14250/interactive-programming-using-shadow-dynamically-rendered?show=14267#a14267</guid>
<pubDate>Wed, 20 Nov 2024 20:09:20 +0000</pubDate>
</item>
<item>
<title>Answered: For shadow-cljs, how do you get humane-test-output working for the `:browser-test` build target?</title>
<link>https://ask.clojure.org/index.php/14215/shadow-humane-test-output-working-browser-test-build-target?show=14221#a14221</link>
<description>&lt;p&gt;shadow-cljs currently uses &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/bhauman/cljs-test-display&quot;&gt;cljs-test-display&lt;/a&gt; for &lt;code&gt;:browser-test&lt;/code&gt;. This makes the UI slightly prettier.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;cljs-test-display&lt;/code&gt; sets its own &lt;code&gt;:reporter&lt;/code&gt; value when running the tests (see &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/bhauman/cljs-test-display/blob/727a08d298b1ce380de4c8f0145254b95eb957cd/src/cljs_test_display/core.cljs#L383-L384&quot;&gt;code&lt;/a&gt;).&lt;/p&gt;
&lt;p&gt;As far as I can tell this then bypasses the overwritten &lt;code&gt;:fail&lt;/code&gt; reporter created by &lt;code&gt;humane-test-output&lt;/code&gt; &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/pjstadig/humane-test-output/blob/7c4c868aa9d7424248761941cd736ac0a5f4a75b/src/pjstadig/util.cljc#L68-L74&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The problem is that &lt;code&gt;cljs-test-display&lt;/code&gt; seems to be relying on that custom reporter to create its own UI, so replacing that bit will likely break the UI in some way.&lt;/p&gt;
&lt;p&gt;I'm guessing you'd need to overwrite &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/bhauman/cljs-test-display/blob/727a08d298b1ce380de4c8f0145254b95eb957cd/src/cljs_test_display/core.cljs#L330-L338&quot;&gt;this bit&lt;/a&gt; and hook up &lt;code&gt;humane-test-output&lt;/code&gt; into that. I'm not sure how feasible this is.&lt;/p&gt;
</description>
<category>ClojureScript</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14215/shadow-humane-test-output-working-browser-test-build-target?show=14221#a14221</guid>
<pubDate>Sat, 02 Nov 2024 08:48:07 +0000</pubDate>
</item>
<item>
<title>Answered: ClojureScript compiler does not transpile &quot;es8&quot; closure libraries</title>
<link>https://ask.clojure.org/index.php/14063/clojurescript-compiler-does-transpile-closure-libraries?show=14072#a14072</link>
<description>&lt;p&gt;Thanks for the report, I created an issue here &lt;a rel=&quot;nofollow&quot; href=&quot;https://clojure.atlassian.net/browse/CLJS-3418&quot;&gt;https://clojure.atlassian.net/browse/CLJS-3418&lt;/a&gt;&lt;/p&gt;
</description>
<category>ClojureScript</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14063/clojurescript-compiler-does-transpile-closure-libraries?show=14072#a14072</guid>
<pubDate>Tue, 20 Aug 2024 23:28:22 +0000</pubDate>
</item>
<item>
<title>How to load couple of modules with cljs.loader/load?</title>
<link>https://ask.clojure.org/index.php/13807/how-to-load-couple-of-modules-with-cljs-loader-load</link>
<description>&lt;p&gt;I didn't expect any problems with the task initially. Just loaded them one by one with cljs.loader/load until....&lt;br&gt;
Until I got 'beforeLoadModuleCode called with module module2 while module module1 is loading'&lt;br&gt;
First I realized that load was asynchronous and module loading wasn't actually finished when load exited. Digging goog.module.ModuleManager left me with an impression that its load() function is capable to queue new module loading until the previous one finishes loading.&lt;/p&gt;
&lt;p&gt;My impression that the problem is that cljs.loader/load calls beforeLoadModuleCode() at the wrong moment of time. It seems that it must be called at the very begining of evaluating the module code, not before it even starts to download it as it is now, i.e., setLoaded is the last instruction of the module and beforeLoadModuleCode must be the first.&lt;br&gt;
However, I'm still unsure I'm getting the whole idea behind ModuleManager correctly so I need a confirmation that I'm correct.&lt;/p&gt;
</description>
<category>ClojureScript</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/13807/how-to-load-couple-of-modules-with-cljs-loader-load</guid>
<pubDate>Sat, 06 Apr 2024 08:19:03 +0000</pubDate>
</item>
<item>
<title>Clojurescript unable to use arrow constructors in body of defrecord, while Clojure does</title>
<link>https://ask.clojure.org/index.php/13785/clojurescript-unable-arrow-constructors-defrecord-clojure</link>
<description>&lt;p&gt;I get a warning if I try to compile a defrecord where a method tries to call the arrow constructor.&lt;/p&gt;
&lt;p&gt;This:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;(defrecord Foo [a b]
  SomeProtocol
  (some-method [_]
    (-&amp;gt;Foo new-a new-b)))
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;gives the message &quot;WARNING: Use of undeclared Var some.ns/-&amp;gt;Foo at line X&quot;. Clojure accepts this form ok.&lt;/p&gt;
&lt;p&gt;If I switch to the dot constructor version, like &lt;code&gt;(Foo. _ _)&lt;/code&gt; it compiles.&lt;/p&gt;
&lt;p&gt;I noticed that in the clj &lt;code&gt;defrecord&lt;/code&gt; macro, the symbols for &lt;code&gt;-&amp;gt;Foo&lt;/code&gt; and &lt;code&gt;map-&amp;gt;Foo&lt;/code&gt; are declared first thing, but in cljs, the related &lt;code&gt;build-positional-factory&lt;/code&gt; and &lt;code&gt;build-map-factory&lt;/code&gt; fns are called at the end, after &lt;code&gt;emit-defrecord&lt;/code&gt;. Perhaps that's the issue?&lt;/p&gt;
&lt;p&gt;It looks like deftype should have a similar issue, but I haven't tested it.&lt;/p&gt;
</description>
<category>ClojureScript</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/13785/clojurescript-unable-arrow-constructors-defrecord-clojure</guid>
<pubDate>Sat, 16 Mar 2024 08:14:12 +0000</pubDate>
</item>
<item>
<title>Answered: Var metadata leaves functions in non-evaluated state</title>
<link>https://ask.clojure.org/index.php/13775/var-metadata-leaves-functions-in-non-evaluated-state?show=13776#a13776</link>
<description>&lt;p&gt;It has nothing to do with macroexpansion. Metadata on vars in CLJS is not evaluated, that's it. Why exactly - I don't know. There's some discussion at &lt;a rel=&quot;nofollow&quot; href=&quot;https://clojure.atlassian.net/browse/CLJS-2390&quot;&gt;https://clojure.atlassian.net/browse/CLJS-2390&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Your example with vectors works because the function form is mentioned not in the metadata position of the &lt;code&gt;def&lt;/code&gt; macro, so its evaluation happens in a regular way.&lt;/p&gt;
</description>
<category>ClojureScript</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/13775/var-metadata-leaves-functions-in-non-evaluated-state?show=13776#a13776</guid>
<pubDate>Sat, 02 Mar 2024 22:06:29 +0000</pubDate>
</item>
<item>
<title>Answered: cljs.core/test does not work as the docstring describes</title>
<link>https://ask.clojure.org/index.php/13756/cljs-core-test-does-not-work-as-the-docstring-describes?show=13762#a13762</link>
<description>&lt;p&gt;Thanks for the report - &lt;a rel=&quot;nofollow&quot; href=&quot;https://clojure.atlassian.net/browse/CLJS-3411&quot;&gt;https://clojure.atlassian.net/browse/CLJS-3411&lt;/a&gt;&lt;/p&gt;
</description>
<category>ClojureScript</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/13756/cljs-core-test-does-not-work-as-the-docstring-describes?show=13762#a13762</guid>
<pubDate>Tue, 27 Feb 2024 17:32:14 +0000</pubDate>
</item>
<item>
<title>Answered: How  does cljs require npm package</title>
<link>https://ask.clojure.org/index.php/10706/how-does-cljs-require-npm-package?show=13754#a13754</link>
<description>&lt;p&gt;It seems cljs already fix this issue.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;  :dependencies [[org.clojure/clojure &quot;1.11.1&quot;]
                 [org.clojure/clojurescript &quot;1.11.132&quot;]]
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;With those version, the following code works as expected:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;(ns cljs-demo.core
  (:require [pdfjs]
            [puppeteer]))

(enable-console-print!)

(defn -main [&amp;amp; args]
  (println &quot;Hello, World!&quot; puppeteer)
  (println &quot;Hello, World!&quot; pdfjs)
  )

(set! *main-cli-fn* -main)
&lt;/code&gt;&lt;/pre&gt;
</description>
<category>ClojureScript</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/10706/how-does-cljs-require-npm-package?show=13754#a13754</guid>
<pubDate>Sun, 25 Feb 2024 06:58:30 +0000</pubDate>
</item>
<item>
<title>Answered: Support for js/BigInt</title>
<link>https://ask.clojure.org/index.php/13676/support-for-js-bigint?show=13705#a13705</link>
<description>&lt;p&gt;Supporting them as keys in hash maps should be fairly straightforward. Supporting them in numeric ops is more challenging as big integers and JavaScript double values cannot be used together which is a big departure from Clojure's numeric tower. Some experimental work has been done to assess but it will take more thought.&lt;/p&gt;
</description>
<category>ClojureScript</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/13676/support-for-js-bigint?show=13705#a13705</guid>
<pubDate>Mon, 12 Feb 2024 13:43:11 +0000</pubDate>
</item>
<item>
<title>Incorrect deprecation warnings</title>
<link>https://ask.clojure.org/index.php/13645/incorrect-deprecation-warnings</link>
<description>&lt;p&gt;Using this minimal project, I get deprecation warnings regarding unused library code:&lt;/p&gt;
&lt;p&gt;deps.edn&lt;br&gt;
&lt;code&gt;`&lt;/code&gt;clojure&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;{:deps {org.clojure/clojurescript {:mvn/version &quot;1.11.54&quot;}
com.taoensso/timbre {:mvn/version &quot;6.3.1&quot;}
}}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;code&gt;`&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;src/hello_world/core.cljs&lt;br&gt;
&lt;code&gt;`&lt;/code&gt;clojure&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;(ns hello-world.core
  (:require [taoensso.timbre :as log]))

(log/info &quot;Hello&quot;)
(println &quot;Hello world!&quot;)
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;code&gt;`&lt;/code&gt;&lt;br&gt;
&lt;code&gt;`&lt;/code&gt;clojure&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;yenda@project2503:~/test-warning$ clj -M -m cljs.main -c hello-world.core
WARNING: taoensso.encore/compile-ns-filter is deprecated at line 6125 /home/yenda/.cljs/.aot_cache/1.11.54/02F6365/taoensso/encore.cljc
WARNING: taoensso.encore/rate-limiter* is deprecated at line 6202 /home/yenda/.cljs/.aot_cache/1.11.54/02F6365/taoensso/encore.cljc
WARNING: taoensso.encore/rate-limiter* is deprecated at line 6209 /home/yenda/.cljs/.aot_cache/1.11.54/02F6365/taoensso/encore.cljc
WARNING: taoensso.encore/rate-limiter* is deprecated at line 6211 /home/yenda/.cljs/.aot_cache/1.11.54/02F6365/taoensso/encore.cljc
WARNING: taoensso.encore/distinctv is deprecated at line 6266 /home/yenda/.cljs/.aot_cache/1.11.54/02F6365/taoensso/encore.cljc
WARNING: taoensso.encore/-swap-val! is deprecated at line 6306 /home/yenda/.cljs/.aot_cache/1.11.54/02F6365/taoensso/encore.cljc
WARNING: taoensso.encore/sub-indexes is deprecated at line 6334 /home/yenda/.cljs/.aot_cache/1.11.54/02F6365/taoensso/encore.cljc
WARNING: taoensso.encore/sub-indexes is deprecated at line 6343 /home/yenda/.cljs/.aot_cache/1.11.54/02F6365/taoensso/encore.cljc
WARNING: taoensso.encore/sentinel? is deprecated at line 6349 /home/yenda/.cljs/.aot_cache/1.11.54/02F6365/taoensso/encore.cljc
WARNING: taoensso.encore/singleton? is deprecated at line 6352 /home/yenda/.cljs/.aot_cache/1.11.54/02F6365/taoensso/encore.cljc
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;code&gt;`&lt;/code&gt;&lt;/p&gt;
</description>
<category>ClojureScript</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/13645/incorrect-deprecation-warnings</guid>
<pubDate>Sun, 28 Jan 2024 16:39:42 +0000</pubDate>
</item>
<item>
<title>Answered: ClojureScript and the deprecation of Google Closure Library</title>
<link>https://ask.clojure.org/index.php/13612/clojurescript-and-the-deprecation-google-closure-library?show=13640#a13640</link>
<description>&lt;p&gt;See David Nolen's update here in the latest ClojureScript release: &lt;a rel=&quot;nofollow&quot; href=&quot;https://clojurescript.org/news/2024-01-24-release&quot;&gt;https://clojurescript.org/news/2024-01-24-release&lt;/a&gt;&lt;/p&gt;
</description>
<category>ClojureScript</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/13612/clojurescript-and-the-deprecation-google-closure-library?show=13640#a13640</guid>
<pubDate>Thu, 25 Jan 2024 01:50:34 +0000</pubDate>
</item>
<item>
<title>Answered: MUI Select - add deselect function</title>
<link>https://ask.clojure.org/index.php/13551/mui-select-add-deselect-function?show=13552#a13552</link>
<description>&lt;p&gt;Don't know for absolute certain, but it seems that by passing &lt;code&gt;:checked&lt;/code&gt;, you have made the checkbox component controlled - it will not react to anything apart from a change to that value, and you have to do that yourself by also providing an &lt;code&gt;:on-change&lt;/code&gt; function and changing the underlying value.&lt;/p&gt;
&lt;p&gt;Also note that you shouldn't be using sequential indices as React keys. Either don't use keys at all by avoiding lazy collections or figure out a natural key for components.&lt;/p&gt;
&lt;p&gt;As a final note, IMO it's better to ask such specific support questions on the Clojurians Slack where we have multiple channels. For this case, there's &lt;code&gt;#reagent&lt;/code&gt;. It's much easier to have an ongoing conversation there.&lt;/p&gt;
</description>
<category>ClojureScript</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/13551/mui-select-add-deselect-function?show=13552#a13552</guid>
<pubDate>Wed, 13 Dec 2023 12:25:02 +0000</pubDate>
</item>
<item>
<title>Answered: Why doesn't `type` in CLJS check `:type` on its arguments meta like CLJ does?</title>
<link>https://ask.clojure.org/index.php/13095/why-doesnt-type-cljs-check-type-its-arguments-meta-like-does?show=13550#a13550</link>
<description>&lt;p&gt;Hi Colin,&lt;/p&gt;
&lt;p&gt;Was wondering the same thing and I found some discussions in the slack channel:&lt;/p&gt;
&lt;p&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://clojurians.slack.com/archives/C07UQ678E/p1593166172290700&quot;&gt;https://clojurians.slack.com/archives/C07UQ678E/p1593166172290700&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://clojurians.slack.com/archives/C07UQ678E/p1610190759145100&quot;&gt;https://clojurians.slack.com/archives/C07UQ678E/p1610190759145100&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;TLDR:&lt;br&gt;
Yeah, bummer. No one wants inconsistencies.&lt;br&gt;
At this point in time, too scary to change :)&lt;br&gt;
+ Not enough incentive (use-cases) identified.&lt;/p&gt;
</description>
<category>ClojureScript</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/13095/why-doesnt-type-cljs-check-type-its-arguments-meta-like-does?show=13550#a13550</guid>
<pubDate>Wed, 13 Dec 2023 10:00:57 +0000</pubDate>
</item>
<item>
<title>Answered: ClojureScript doesn't respect the provided :line and :column meta for functions</title>
<link>https://ask.clojure.org/index.php/13085/clojurescript-doesnt-respect-provided-line-column-functions?show=13472#a13472</link>
<description>&lt;p&gt;Please create an issue + patch in JIRA, thanks :)&lt;/p&gt;
</description>
<category>ClojureScript</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/13085/clojurescript-doesnt-respect-provided-line-column-functions?show=13472#a13472</guid>
<pubDate>Thu, 16 Nov 2023 16:57:26 +0000</pubDate>
</item>
<item>
<title>Answered: sorted-map with heterogeneous keys crashes on lookup</title>
<link>https://ask.clojure.org/index.php/13396/sorted-map-with-heterogeneous-keys-crashes-on-lookup?show=13400#a13400</link>
<description>&lt;p&gt;This is the expected behavior (matches Java's behavior when looking up a key in a map sorted by a comparator that doesn't handle the lookup key type).&lt;/p&gt;
</description>
<category>ClojureScript</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/13396/sorted-map-with-heterogeneous-keys-crashes-on-lookup?show=13400#a13400</guid>
<pubDate>Tue, 24 Oct 2023 14:14:28 +0000</pubDate>
</item>
<item>
<title>Answered: clojure.pprint/pprint prints superfluous spaces before newlines</title>
<link>https://ask.clojure.org/index.php/13378/clojure-pprint-pprint-prints-superfluous-spaces-newlines?show=13382#a13382</link>
<description>&lt;p&gt;I don't think so. Notice that &lt;code&gt;pprint&lt;/code&gt; should print to stdout, and the extra spaces that you're seeing is actually the indentation which makes the print, well, pretty.&lt;/p&gt;
</description>
<category>ClojureScript</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/13378/clojure-pprint-pprint-prints-superfluous-spaces-newlines?show=13382#a13382</guid>
<pubDate>Fri, 20 Oct 2023 13:44:39 +0000</pubDate>
</item>
<item>
<title>Answered: Can't add #inst values to var metadata. Error: Not supported: class java.time.Instant</title>
<link>https://ask.clojure.org/index.php/13362/cant-inst-values-metadata-error-supported-class-java-instant?show=13363#a13363</link>
<description>&lt;p&gt;&lt;code&gt;java --version&lt;/code&gt; ?&lt;/p&gt;
</description>
<category>ClojureScript</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/13362/cant-inst-values-metadata-error-supported-class-java-instant?show=13363#a13363</guid>
<pubDate>Sun, 08 Oct 2023 01:28:55 +0000</pubDate>
</item>
<item>
<title>Answered: Clojurescript issue in 1.11.121 and master when compiling</title>
<link>https://ask.clojure.org/index.php/13279/clojurescript-issue-in-1-11-121-and-master-when-compiling?show=13280#a13280</link>
<description>&lt;p&gt;Thanks reverted - to be honest no longer sure of the rationale of the original change - tracking again in the original issue - &lt;a rel=&quot;nofollow&quot; href=&quot;https://clojure.atlassian.net/browse/CLJS-3383&quot;&gt;https://clojure.atlassian.net/browse/CLJS-3383&lt;/a&gt;&lt;/p&gt;
</description>
<category>ClojureScript</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/13279/clojurescript-issue-in-1-11-121-and-master-when-compiling?show=13280#a13280</guid>
<pubDate>Wed, 13 Sep 2023 13:28:58 +0000</pubDate>
</item>
<item>
<title>Answered: How to transform js/Error to a clojurescript map?</title>
<link>https://ask.clojure.org/index.php/13176/how-to-transform-js-error-to-a-clojurescript-map?show=13177#a13177</link>
<description>&lt;p&gt;&lt;code&gt;js-&amp;gt;clj&lt;/code&gt; only transforms regular JavaScript Object and Arrays. Error is a sub-type, so it isn't converted. You can implement the &lt;code&gt;cljs.core/IEncodeClojure&lt;/code&gt; protocol in theory, so that it does get converted. It is not done by default since the stack information in &lt;code&gt;js/Error&lt;/code&gt; is not standardized in any way, so each JS runtime more or less does it own thing. Handling all of them is kinda tedius and would bloat the code too much for very rare use cases.&lt;/p&gt;
&lt;p&gt;There is a &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/clojure/clojurescript/blob/8a4f8d1025151ae1281185ed9d101c389661554d/src/main/cljs/cljs/core.cljs#L11825-L11860&quot;&gt;cljs.core/Throwable-&amp;gt;map&lt;/a&gt; fn coming, but I believe that is unreleased as of yet. You could just copy it until then.&lt;/p&gt;
</description>
<category>ClojureScript</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/13176/how-to-transform-js-error-to-a-clojurescript-map?show=13177#a13177</guid>
<pubDate>Mon, 21 Aug 2023 16:50:54 +0000</pubDate>
</item>
<item>
<title>Setting `warning-handlers` in a config file fails with &quot;Wrong number of args (3) passed to: clojure.lang.Symbol&quot;</title>
<link>https://ask.clojure.org/index.php/13175/setting-warning-handlers-config-number-passed-clojure-symbol</link>
<description>&lt;p&gt;This config:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;{:main             warning-handlers
 :warning-handlers [cljs.analyzer/default-warning-handler]}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Which set &lt;code&gt;:warning-handlers&lt;/code&gt; to the default as listed in &lt;a rel=&quot;nofollow&quot; href=&quot;https://clojurescript.org/reference/compiler-options#warning-handlers&quot;&gt;https://clojurescript.org/reference/compiler-options#warning-handlers&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Compiled using: &lt;/p&gt;
&lt;pre&gt;&lt;code&gt;clj -M --main cljs.main --compile-opts compile.edn --compile
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Fails with:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;   {:type clojure.lang.ExceptionInfo,
    :message
    &quot;Wrong number of args (3) passed to: clojure.lang.Symbol at line 1 /Users/danie/matter/source/cljs-config/src/warning_handlers.cljs&quot;,
    :data
    {:file
     #object[java.io.File 0x27f8f1cc &quot;/Users/danie/matter/source/cljs-config/src/warning_handlers.cljs&quot;],
     :line 1,
     :column 1,
     :tag :cljs/analysis-error},
    :at [cljs.analyzer$error invokeStatic &quot;analyzer.cljc&quot; 780]}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Full repro here: &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/danieroux/cljs-config&quot;&gt;https://github.com/danieroux/cljs-config&lt;/a&gt;&lt;/p&gt;
</description>
<category>ClojureScript</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/13175/setting-warning-handlers-config-number-passed-clojure-symbol</guid>
<pubDate>Sun, 20 Aug 2023 23:30:21 +0000</pubDate>
</item>
<item>
<title>Answered: Add requiring-resolve to ClojureScript</title>
<link>https://ask.clojure.org/index.php/13099/add-requiring-resolve-to-clojurescript?show=13101#a13101</link>
<description>&lt;p&gt;ClojureScript needs namespaces to be static and they also need to be statically required in the ns form. That technical limitation probably prevents requiring-resolve to work in ClojureScript, although in some environments it might works, such as self-hosted ClojureScript. &lt;/p&gt;
</description>
<category>ClojureScript</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/13099/add-requiring-resolve-to-clojurescript?show=13101#a13101</guid>
<pubDate>Wed, 26 Jul 2023 10:53:33 +0000</pubDate>
</item>
<item>
<title>Answered: cljs range fn does odd things with nil, is this a bug?</title>
<link>https://ask.clojure.org/index.php/13081/cljs-range-fn-does-odd-things-with-nil-is-this-a-bug?show=13087#a13087</link>
<description>&lt;p&gt;The behavior of non-numeric args passed to &lt;code&gt;range&lt;/code&gt; is undefined.&lt;/p&gt;
</description>
<category>ClojureScript</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/13081/cljs-range-fn-does-odd-things-with-nil-is-this-a-bug?show=13087#a13087</guid>
<pubDate>Sun, 16 Jul 2023 18:00:58 +0000</pubDate>
</item>
<item>
<title>Answered: Should documentation be added to explain the default browser console representation of CLJS collections and seqs?</title>
<link>https://ask.clojure.org/index.php/12932/documentation-explain-default-representation-collections?show=12983#a12983</link>
<description>&lt;p&gt;Logged as &lt;a rel=&quot;nofollow&quot; href=&quot;https://clojure.atlassian.net/browse/CLJS-3403&quot;&gt;https://clojure.atlassian.net/browse/CLJS-3403&lt;/a&gt;&lt;/p&gt;
</description>
<category>ClojureScript</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/12932/documentation-explain-default-representation-collections?show=12983#a12983</guid>
<pubDate>Tue, 30 May 2023 17:07:57 +0000</pubDate>
</item>
<item>
<title>Answered: `specify!` and `set!` silently fail if object is not extensible</title>
<link>https://ask.clojure.org/index.php/12898/specify-and-set-silently-fail-if-object-is-not-extensible?show=12976#a12976</link>
<description>&lt;p&gt;Logged as &lt;a rel=&quot;nofollow&quot; href=&quot;https://clojure.atlassian.net/browse/CLJS-3402&quot;&gt;https://clojure.atlassian.net/browse/CLJS-3402&lt;/a&gt;&lt;/p&gt;
</description>
<category>ClojureScript</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/12898/specify-and-set-silently-fail-if-object-is-not-extensible?show=12976#a12976</guid>
<pubDate>Tue, 30 May 2023 14:42:05 +0000</pubDate>
</item>
<item>
<title>Answered: cljs compile warning: JavaScript file found on classpath for library `...`, but does not contain a corresponding...</title>
<link>https://ask.clojure.org/index.php/12946/compile-warning-javascript-classpath-library-corresponding?show=12953#a12953</link>
<description>&lt;p&gt;This was not an issue with cljs at all - sorry for the noise.&lt;/p&gt;
&lt;p&gt;For future generations of searchers, the change was in the &lt;code&gt;google-closure-library&lt;/code&gt;, &lt;code&gt;&quot;goog.net.cookies&quot;&lt;/code&gt; was deprecated and removed in favor of &lt;code&gt;&quot;goog.net.Cookies&quot;&lt;/code&gt; and a more enterprise-y factory singleton getter initialization. &lt;/p&gt;
&lt;p&gt;Link: &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/google/closure-library/releases/tag/v20220301&quot;&gt;https://github.com/google/closure-library/releases/tag/v20220301&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;When cljs does upgrade to newer closure library versions uses of this will break.&lt;/p&gt;
&lt;p&gt;Thanks to everyone for your help tracking this down.&lt;/p&gt;
</description>
<category>ClojureScript</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/12946/compile-warning-javascript-classpath-library-corresponding?show=12953#a12953</guid>
<pubDate>Thu, 18 May 2023 15:29:27 +0000</pubDate>
</item>
<item>
<title>Answered: Custom printing method for records</title>
<link>https://ask.clojure.org/index.php/12921/custom-printing-method-for-records?show=12922#a12922</link>
<description>&lt;p&gt;I ran into a similar problem, gave up and just converted my data into a JS objects and then printed it with console.log (in browser) or as pretty stringified json (not browser). I basically just needed something quick and dirty for debugging and didn't care to find the proper cljs way. &lt;/p&gt;
&lt;p&gt;Also since the browser console has a great interface to interact with logged data, I was a great solution for my use case. &lt;/p&gt;
</description>
<category>ClojureScript</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/12921/custom-printing-method-for-records?show=12922#a12922</guid>
<pubDate>Sun, 07 May 2023 08:39:55 +0000</pubDate>
</item>
<item>
<title>Why does this work in CLJS but doesn't in JVM Clojure?</title>
<link>https://ask.clojure.org/index.php/12903/why-does-this-work-in-cljs-but-doesnt-in-jvm-clojure</link>
<description>&lt;p&gt;This looks like a bug in ClojureScript 1.11.54 :&lt;/p&gt;
&lt;p&gt;&lt;code&gt;(conj {} [:a 1] '([:b 2] [:c 3]) '([:d 4]))&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;In Clojure on the JVM this is an error:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;cljs.user&amp;gt; (conj {} [:a 1] '([:b 2] [:c 3]) '([:d 4]))
{:a 1, :b 2, :c 3, :d 4}
cljs.user&amp;gt; :cljs/quit
nil
user&amp;gt; (conj {} [:a 1] '([:b 2] [:c 3]) '([:d 4]))
Execution error (ClassCastException) at user/eval17754 (REPL:25).
class clojure.lang.PersistentVector cannot be cast to class java.util.Map$Entry (clojure.lang.PersistentVector is in unnamed module of loader 'app'; java.util.Map$Entry is in module java.base of loader 'bootstrap')
&lt;/code&gt;&lt;/pre&gt;
</description>
<category>ClojureScript</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/12903/why-does-this-work-in-cljs-but-doesnt-in-jvm-clojure</guid>
<pubDate>Thu, 27 Apr 2023 19:12:03 +0000</pubDate>
</item>
<item>
<title>Answered: Questions about cljs.core/prefers* (maybe bugs?)</title>
<link>https://ask.clojure.org/index.php/12867/questions-about-cljs-core-prefers-maybe-bugs?show=12868#a12868</link>
<description>&lt;p&gt;I suspect that code probably derives from the Clojure code in MultiFn, which had that bug with the hierarchy (and was fixed in 1.11 - see &lt;a rel=&quot;nofollow&quot; href=&quot;https://clojure.atlassian.net/browse/CLJ-2234&quot;&gt;https://clojure.atlassian.net/browse/CLJ-2234&lt;/a&gt; ).&lt;/p&gt;
</description>
<category>ClojureScript</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/12867/questions-about-cljs-core-prefers-maybe-bugs?show=12868#a12868</guid>
<pubDate>Mon, 17 Apr 2023 21:29:21 +0000</pubDate>
</item>
<item>
<title>Answered: Firefox addon written in cljs can't pass Mozilla's review</title>
<link>https://ask.clojure.org/index.php/12821/firefox-addon-written-in-cljs-cant-pass-mozillas-review?show=12822#a12822</link>
<description>&lt;p&gt;A couple of years ago, I had a similar question (only in my case it was for better caching) and at least back then the answer was &quot;no&quot;. But you might try to build with the optimizations set to &lt;code&gt;simple&lt;/code&gt;. It also does some renaming but I &lt;em&gt;think&lt;/em&gt; it's stable. If that doesn't work, &lt;code&gt;whitespace&lt;/code&gt; should.&lt;/p&gt;
</description>
<category>ClojureScript</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/12821/firefox-addon-written-in-cljs-cant-pass-mozillas-review?show=12822#a12822</guid>
<pubDate>Thu, 30 Mar 2023 14:24:02 +0000</pubDate>
</item>
<item>
<title>Answered: Feature request: async/await support in CLJS</title>
<link>https://ask.clojure.org/index.php/12806/feature-request-async-await-support-in-cljs?show=12811#a12811</link>
<description>&lt;p&gt;Note that shadow-cljs has had support for &lt;code&gt;js-await&lt;/code&gt; for a while now.&lt;/p&gt;
&lt;p&gt;See the announcement post here:&lt;br&gt;
&lt;a rel=&quot;nofollow&quot; href=&quot;https://clojureverse.org/t/promise-handling-in-cljs-using-js-await/8998&quot;&gt;https://clojureverse.org/t/promise-handling-in-cljs-using-js-await/8998&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;This isn't quite &lt;code&gt;async/await&lt;/code&gt;, but if you ask me if doesn't have to be. &lt;br&gt;
It is implemented as a quite &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/thheller/shadow-cljs/blob/f5bc7364538cb1c0ea8de33b05bf4dd3f1fb8d39/src/main/shadow/cljs/modern.cljc#L311-L326&quot;&gt;trivial macro&lt;/a&gt;. It has the same syntactical semantics and there is absolutely no need to &quot;tag&quot; any function as async. It just becomes so by nature of returning a promise.&lt;/p&gt;
&lt;p&gt;I don't think changing the compiler to emit actual &lt;code&gt;async/await&lt;/code&gt; is worth the effort. The macro gives you 90% of the solution for 1% of the effort. Same goes for libs such as &lt;code&gt;promesa&lt;/code&gt;. This is easily solved in user space.&lt;/p&gt;
</description>
<category>ClojureScript</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/12806/feature-request-async-await-support-in-cljs?show=12811#a12811</guid>
<pubDate>Tue, 28 Mar 2023 13:25:25 +0000</pubDate>
</item>
<item>
<title>Answered: Docstring of with-redefs should mention usage of ^:dynamic in production</title>
<link>https://ask.clojure.org/index.php/12766/docstring-redefs-should-mention-usage-dynamic-production?show=12767#a12767</link>
<description>&lt;p&gt;Just a side-note:&lt;/p&gt;
&lt;p&gt;In JVM Clojure you &lt;code&gt;^:redef&lt;/code&gt; metadata is sufficient. See also the docs on direct linking:&lt;/p&gt;
&lt;p&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://clojure.org/reference/compilation#directlinking&quot;&gt;https://clojure.org/reference/compilation#directlinking&lt;/a&gt;&lt;/p&gt;
</description>
<category>ClojureScript</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/12766/docstring-redefs-should-mention-usage-dynamic-production?show=12767#a12767</guid>
<pubDate>Tue, 14 Mar 2023 13:42:57 +0000</pubDate>
</item>
<item>
<title>Answered: Feature request: option to demunge keys in `js-&gt;clj` function</title>
<link>https://ask.clojure.org/index.php/12642/feature-request-option-to-demunge-keys-in-js-clj-function?show=12643#a12643</link>
<description>&lt;p&gt;Wouldn't it be more flexible if keywordize-keys received a function instead of a boolean, so you can do whatever you want, including demunging?&lt;/p&gt;
</description>
<category>ClojureScript</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/12642/feature-request-option-to-demunge-keys-in-js-clj-function?show=12643#a12643</guid>
<pubDate>Sun, 05 Feb 2023 11:08:35 +0000</pubDate>
</item>
<item>
<title>Answered: `(set! a -x false)` doesn't work due to a bug</title>
<link>https://ask.clojure.org/index.php/12065/set-a-x-false-doesnt-work-due-to-a-bug?show=12616#a12616</link>
<description>&lt;p&gt;Logged as &lt;a rel=&quot;nofollow&quot; href=&quot;https://clojure.atlassian.net/browse/CLJS-3395&quot;&gt;https://clojure.atlassian.net/browse/CLJS-3395&lt;/a&gt;&lt;/p&gt;
</description>
<category>ClojureScript</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/12065/set-a-x-false-doesnt-work-due-to-a-bug?show=12616#a12616</guid>
<pubDate>Mon, 30 Jan 2023 20:07:27 +0000</pubDate>
</item>
<item>
<title>Answered: cljs.js/eval: def not working when using :simple optimization (works with :none/:whitespace)</title>
<link>https://ask.clojure.org/index.php/12512/cljs-eval-working-using-simple-optimization-works-whitespace?show=12522#a12522</link>
<description>&lt;p&gt;I didn't run the code, but my guess is that the code is compiled to emit&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;cljs.user.x = 10;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;with &lt;code&gt;cljs.user&lt;/code&gt; not being defined yet. Thus it fails when you try to run this since it tries to set &lt;code&gt;x&lt;/code&gt; on &lt;code&gt;cljs.user&lt;/code&gt;. Try creating &lt;code&gt;cljs.user&lt;/code&gt; first, or by supplying an already existing &lt;code&gt;:ns&lt;/code&gt; option when compiling.&lt;/p&gt;
</description>
<category>ClojureScript</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/12512/cljs-eval-working-using-simple-optimization-works-whitespace?show=12522#a12522</guid>
<pubDate>Mon, 02 Jan 2023 08:17:05 +0000</pubDate>
</item>
</channel>
</rss>