<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>Clojure Q&amp;A - Questions without answers in Contrib libs</title>
<link>https://ask.clojure.org/index.php/unanswered/contrib-libs</link>
<description></description>
<item>
<title>`pipeline-blocking` uses `thread` internally instead of `io-thread`</title>
<link>https://ask.clojure.org/index.php/14738/pipeline-blocking-uses-thread-internally-instead-of-thread</link>
<description>&lt;p&gt;&lt;code&gt;pipeline-blocking&lt;/code&gt; is explicitly meant for blocking operations (implying I/O). However, internally it uses &lt;code&gt;thread&lt;/code&gt; rather than &lt;code&gt;io-thread&lt;/code&gt; for processing: &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/clojure/core.async/blob/master/src/main/clojure/clojure/core/async.clj#L637-L640&quot;&gt;https://github.com/clojure/core.async/blob/master/src/main/clojure/clojure/core/async.clj#L637-L640&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Since 1.9.829-alpha2 this has practical implications, as only &lt;code&gt;io-thread&lt;/code&gt; will utilize virtual threads, when available.&lt;/p&gt;
&lt;p&gt;Can this be fixed / changed?&lt;br&gt;
If not, can an explicit &lt;code&gt;pipeline-io&lt;/code&gt; (or similar)  function be added to support this use case?&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;
</description>
<category>core.async</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14738/pipeline-blocking-uses-thread-internally-instead-of-thread</guid>
<pubDate>Wed, 29 Oct 2025 15:54:00 +0000</pubDate>
</item>
<item>
<title>Choosing between core.async pipelines</title>
<link>https://ask.clojure.org/index.php/14732/choosing-between-core-async-pipelines</link>
<description>&lt;p&gt;It's no longer clear what kind of pipeline is suitable for what kind of task in &lt;code&gt;core.async&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Previously, my understanding was that anything I/O-bound should go into &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/clojure/core.async/blob/v1.9.829-alpha2/src/main/clojure/clojure/core/async.clj#L682-L686&quot;&gt;&lt;code&gt;pipeline-blocking&lt;/code&gt;&lt;/a&gt;, while CPU-bound tasks went into regular (i.e. &lt;code&gt;:compute&lt;/code&gt;) &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/clojure/core.async/blob/v1.9.829-alpha2/src/main/clojure/clojure/core/async.clj#L665-L680&quot;&gt;&lt;code&gt;pipeline&lt;/code&gt;&lt;/a&gt;. But a while back &lt;code&gt;:compute&lt;/code&gt; pipelines were &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/clojure/core.async/commit/3429e3e1f1d49403bf9608b36dbd6715ffe4dd4f&quot;&gt;changed&lt;/a&gt; to use threads instead of go-blocks. And now, with the introduction of &lt;a rel=&quot;nofollow&quot; href=&quot;https://clojure.org/news/2025/10/01/async_virtual_threads&quot;&gt;virtual threads&lt;/a&gt;, &lt;code&gt;pipeline-async&lt;/code&gt; seems like the right choice for I/O-bound tasks.&lt;/p&gt;
&lt;p&gt;It seems that workloads are being classified into one of &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/clojure/core.async/blob/v1.9.829-alpha2/src/main/clojure/clojure/core/async/impl/dispatch.clj#L130-L132&quot;&gt;three types&lt;/a&gt;: &lt;code&gt;:compute&lt;/code&gt;, &lt;code&gt;:io&lt;/code&gt;, and &lt;code&gt;:mixed&lt;/code&gt;. Is &lt;code&gt;:async&lt;/code&gt; meant to be the equivalent of &lt;code&gt;:io&lt;/code&gt;, and &lt;code&gt;:blocking&lt;/code&gt; the equivalent of &lt;code&gt;:mixed&lt;/code&gt;? I don't think that's original semantics, but it seems to be the mapping now.&lt;/p&gt;
</description>
<category>core.async</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14732/choosing-between-core-async-pipelines</guid>
<pubDate>Sun, 26 Oct 2025 22:19:12 +0000</pubDate>
</item>
<item>
<title>Allocation churn on generators</title>
<link>https://ask.clojure.org/index.php/14721/allocation-churn-on-generators</link>
<description>&lt;p&gt;When generating moderately large values there is some LazySeq churn that could be avoided. For example, the following snippet allocates over 15GB (measured with async-profiler):&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;(core/let [g (vector (not-empty string-alphanumeric) 1000 5000)]
  (time
   (dotimes [seed 50]
     (dorun (generate g 100 seed)))))
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The pattern of generating multiple (increasingly larger) values is common with quick-check (via deftest et al).&lt;/p&gt;
&lt;p&gt;Many generators are built on top of &lt;code&gt;choose&lt;/code&gt;, and there is an opportunity to reduce churn by special casing &lt;code&gt;shrink-int&lt;/code&gt; for longs (which should be the common case compared to big ints).&lt;/p&gt;
&lt;p&gt;I have a patch that decreases total allocations of the repro above by ~15% and speed up the run time by ~25% (measured on jdk 25, with &lt;code&gt;-Xmx512m -XX:+UseSerialGC&lt;/code&gt; to decrease variance). Happy to share it.&lt;/p&gt;
</description>
<category>test.check</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14721/allocation-churn-on-generators</guid>
<pubDate>Tue, 07 Oct 2025 21:16:10 +0000</pubDate>
</item>
<item>
<title>`create-basis` silently accepts missing aliases</title>
<link>https://ask.clojure.org/index.php/14584/create-basis-silently-accepts-missing-aliases</link>
<description>&lt;p&gt;In &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/clojars/clojars-web/commit/baade8967c7be8abd9a9b27499c511efd41f6164&quot;&gt;this scenario&lt;/a&gt;, the alias for &lt;code&gt;create-basis&lt;/code&gt; was incorrect, preventing security deps overrides from being applied. For 2 years clojars was deployed with these vulnerable deps.&lt;/p&gt;
&lt;p&gt;In this case, I proposed &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/clojars/clojars-web/pull/906&quot;&gt;to inline the alias&lt;/a&gt; into &lt;code&gt;:deps&lt;/code&gt;. However there may be other scenarios where a tools.deps change might be helpful to catch these mistakes earlier, for example a warning or error.&lt;/p&gt;
</description>
<category>tools.deps</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14584/create-basis-silently-accepts-missing-aliases</guid>
<pubDate>Tue, 10 Jun 2025 00:57:37 +0000</pubDate>
</item>
<item>
<title>core.async go block error with clojure 1.12 method values</title>
<link>https://ask.clojure.org/index.php/14425/core-async-go-block-error-with-clojure-1-12-method-values</link>
<description>&lt;p&gt;I haven't seen this reported. &lt;/p&gt;
&lt;pre&gt;&lt;code&gt;(Long/.toString 123) ;;works
(a/&amp;lt;!! (a/thread (Long/.toString 123))) ;;works
(a/go (Long/.toString 123)) ;;error
&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;Note: The following stack trace applies to the reader or compiler, your code was not executed.

CompilerException Syntax error macroexpanding a/go at (1:1). {:clojure.error/phase :macro-syntax-check, :clojure.error/line 1, :clojure.error/column 1, :clojure.error/source &quot;NO_SOURCE_PATH&quot;, :clojure.error/symbol a/go}
ExceptionInfo No matching method: .toString for class: class java.lang.Long and arity: 1 {:method .toString, :class java.lang.Long, :argc 1, :file &quot;NO_SOURCE_PATH&quot;, :column 7, :line 1}
	clojure.tools.analyzer.passes.jvm.validate/validate-call (validate.clj:127)
	clojure.tools.analyzer.passes.jvm.validate/validate-call (validate.clj:87)
	clojure.tools.analyzer.passes.jvm.validate/eval4802/fn--4803 (validate.clj:137)
	clojure.lang.MultiFn.invoke (MultiFn.java:229)
	clojure.tools.analyzer.passes.jvm.validate/validate (validate.clj:265)
	clojure.tools.analyzer.passes.jvm.validate/validate (validate.clj:240)
	clojure.lang.Var.invoke (Var.java:386)
	clojure.tools.analyzer.passes/compile-passes/fn--3424/fn--3429 (passes.clj:167)
	clojure.tools.analyzer.passes/compile-passes/fn--3424/fn--3431 (passes.clj:169)
	clojure.tools.analyzer.passes/compile-passes/fn--3424/fn--3431 (passes.clj:169)
	clojure.tools.analyzer.passes/compile-passes/fn--3424/fn--3431 (passes.clj:169)
	clojure.core/partial/fn--5929 (core.clj:2648)
&lt;/code&gt;&lt;/pre&gt;
</description>
<category>core.async</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14425/core-async-go-block-error-with-clojure-1-12-method-values</guid>
<pubDate>Tue, 25 Feb 2025 19:17:23 +0000</pubDate>
</item>
<item>
<title>unable to use add-lib on io.github.borkdude/grasp</title>
<link>https://ask.clojure.org/index.php/14342/unable-to-use-add-lib-on-io-github-borkdude-grasp</link>
<description>&lt;p&gt;repro:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;user=&amp;gt; (add-lib 'io.github.borkdude/grasp {:mvn/version &quot;0.1.4&quot;})
Execution error (ExceptionInfo) at clojure.tools.deps.interop/invoke-tool (interop.clj:81).
Could not find artifact org.clojure:clojure:jar:1.11.0-rc1
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This seems strange to me. The deps edn of grasp: &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/borkdude/grasp/blob/master/deps.edn&quot;&gt;https://github.com/borkdude/grasp/blob/master/deps.edn&lt;/a&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;{:deps {org.babashka/sci {:mvn/version &quot;0.3.2&quot;}}
 :aliases {:native {:jvm-opts [&quot;-Dclojure.compiler.direct-linking=true&quot;]
                    :extra-deps {org.clojure/clojure {:mvn/version &quot;1.10.2-alpha3&quot;}
                                 org.clojure/tools.cli {:mvn/version &quot;1.0.194&quot;}}}
           :test {:extra-paths [&quot;test&quot;]
                  :extra-deps {org.clojure/clojure {:mvn/version &quot;1.11.0-rc1&quot;}
                               cognitect-labs/test-runner
                               {:git/url &quot;https://github.com/cognitect-labs/test-runner&quot;
                                :sha &quot;cb96e80f6f3d3b307c59cbeb49bb0dcb3a2a780b&quot;}}
                  :main-opts [&quot;-m&quot; &quot;cognitect.test-runner&quot;]}}}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;It's surprising to me that deps in the &lt;code&gt;:test&lt;/code&gt; alias would cause issues.&lt;/p&gt;
&lt;p&gt;EDIT: seems to work now. Here's the stacktrace from a socket repl where i first encountered it&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;user=&amp;gt; (add-lib 'io.github.borkdude/grasp {:mvn/version &quot;0.1.4&quot;})
Execution error (ExceptionInfo) at clojure.tools.deps.interop/invoke-tool (interop.clj:81).
Could not find artifact org.clojure:clojure:jar:1.11.0-rc1
user=&amp;gt; nil
user=&amp;gt; (pst)
ExceptionInfo Could not find artifact org.clojure:clojure:jar:1.11.0-rc1 {:via [{:type clojure.lang.ExceptionInfo, :message &quot;Could not find artifact org.clojure:clojure:jar:1.11.0-rc1&quot;, :data {:lib org.clojure/clojure, :coord {:mvn/version &quot;1.11.0-rc1&quot;, :deps/manifest :mvn, :dependents [io.github.borkdude/grasp], :parents #{[io.github.borkdude/grasp]}}}, :at [clojure.tools.deps.extensions.maven$get_artifact invokeStatic &quot;maven.clj&quot; 167]}], :trace [[clojure.tools.deps.extensions.maven$get_artifact invokeStatic &quot;maven.clj&quot; 167] [clojure.tools.deps.extensions.maven$get_artifact invoke &quot;maven.clj&quot; 155] [clojure.tools.deps.extensions.maven$eval1225$fn__1228 invoke &quot;maven.clj&quot; 178] [clojure.lang.MultiFn invoke &quot;MultiFn.java&quot; 244] [clojure.tools.deps$download_libs$fn__802$fn__803 invoke &quot;deps.clj&quot; 466] [clojure.lang.AFn applyToHelper &quot;AFn.java&quot; 152] [clojure.lang.AFn applyTo &quot;AFn.java&quot; 144] [clojure.core$apply invokeStatic &quot;core.clj&quot; 667] [clojure.core$with_bindings_STAR_ invokeStatic &quot;core.clj&quot; 1990] [clojure.core$with_bindings_STAR_ doInvoke &quot;core.clj&quot; 1990] [clojure.lang.RestFn invoke &quot;RestFn.java&quot; 428] [clojure.lang.AFn applyToHelper &quot;AFn.java&quot; 156] [clojure.lang.RestFn applyTo &quot;RestFn.java&quot; 135] [clojure.core$apply invokeStatic &quot;core.clj&quot; 671] [clojure.core$bound_fn_STAR_$fn__5837 doInvoke &quot;core.clj&quot; 2020] [clojure.lang.RestFn invoke &quot;RestFn.java&quot; 400] [clojure.lang.AFn call &quot;AFn.java&quot; 18] [java.util.concurrent.FutureTask run &quot;FutureTask.java&quot; 317] [java.util.concurrent.ThreadPoolExecutor runWorker &quot;ThreadPoolExecutor.java&quot; 1144] [java.util.concurrent.ThreadPoolExecutor$Worker run &quot;ThreadPoolExecutor.java&quot; 642] [java.lang.Thread run &quot;Thread.java&quot; 1583]], :cause &quot;Could not find artifact org.clojure:clojure:jar:1.11.0-rc1&quot;, :data {:lib org.clojure/clojure, :coord {:mvn/version &quot;1.11.0-rc1&quot;, :deps/manifest :mvn, :dependents [io.github.borkdude/grasp], :parents #{[io.github.borkdude/grasp]}}}}
	clojure.tools.deps.interop/invoke-tool (interop.clj:81)
	clojure.tools.deps.interop/invoke-tool (interop.clj:41)
	clojure.repl.deps/add-libs (deps.clj:48)
	clojure.repl.deps/add-lib (deps.clj:59)
	clojure.repl.deps/add-lib (deps.clj:59)
	user/eval310956 (NO_SOURCE_FILE:320)
	user/eval310956 (NO_SOURCE_FILE:320)
	clojure.lang.Compiler.eval (Compiler.java:7700)
	clojure.lang.Compiler.eval (Compiler.java:7655)
	clojure.core/eval (core.clj:3232)
	clojure.core/eval (core.clj:3228)
	user/eval257807/fn--257810 (NO_SOURCE_FILE:8)
&lt;/code&gt;&lt;/pre&gt;
</description>
<category>tools.deps</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14342/unable-to-use-add-lib-on-io-github-borkdude-grasp</guid>
<pubDate>Fri, 17 Jan 2025 14:15:15 +0000</pubDate>
</item>
<item>
<title>clojure.data.priority-map's IKVReduce implementation doesn’t support `reduced`</title>
<link>https://ask.clojure.org/index.php/14149/clojure-priority-ikvreduce-implementation-support-reduced</link>
<description>&lt;p&gt;Hi folks! &lt;/p&gt;
&lt;p&gt;Just a heads-up that clojure.data.priority-map’s IKVReduce implementation doesn’t support &lt;code&gt;reduced&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;The current implementation (v1.2.0, 2024-02-19):&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;clojure.core.protocols/IKVReduce
(kv-reduce [this f init]
  (if keyfn            
    (reduce-kv (fn [a k v] (reduce (fn [a v] (f a v (item-&amp;gt;priority v))) a v))
      init priority-&amp;gt;set-of-items)
    (reduce-kv (fn [a k v] (reduce (fn [a v] (f a v k)) a v))
      init priority-&amp;gt;set-of-items)))
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;But the nested reduce means that something like this’d be needed:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;(defn- convey-reduced [x] (if (reduced? x) (reduced x) x))

clojure.core.protocols/IKVReduce
(kv-reduce [this f init]
  (if keyfn            
    (reduce-kv (fn [a k v] (reduce (fn [a v] (convey-reduced (f a v (item-&amp;gt;priority v))) a v)))
      init priority-&amp;gt;set-of-items)
    (reduce-kv (fn [a k v] (reduce (fn [a v] (convey-reduced (f a v k)) a v)))
      init priority-&amp;gt;set-of-items)))
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Note that the issue affects only &lt;code&gt;(reduce-kv a-priority-map …)&lt;/code&gt;, not &lt;code&gt;(reduce a-priority-map …)&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Thanks, cheers! :-)&lt;/p&gt;
</description>
<category>data.priority-map</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14149/clojure-priority-ikvreduce-implementation-support-reduced</guid>
<pubDate>Sat, 28 Sep 2024 23:52:55 +0000</pubDate>
</item>
<item>
<title>Warn about user.clj during build compilation</title>
<link>https://ask.clojure.org/index.php/13770/warn-about-user-clj-during-build-compilation</link>
<description>&lt;p&gt;We’ve had a few cases where people encountered issues due to the existence of user.clj during uberjar building with tools.build. &lt;/p&gt;
&lt;p&gt;Because user loads early, anything it loads is not (typically) reloaded during compilation, which can lead to some namespaces not being compiled.&lt;/p&gt;
&lt;p&gt;Should maybe warn if user is on classpath or even actively recompile with something like &lt;/p&gt;
&lt;pre&gt;&lt;code&gt;(binding [*compile-files* true] (require 'user :reload-all))
&lt;/code&gt;&lt;/pre&gt;
</description>
<category>tools.build</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/13770/warn-about-user-clj-during-build-compilation</guid>
<pubDate>Wed, 28 Feb 2024 13:20:46 +0000</pubDate>
</item>
<item>
<title>Abstract env var reading in tools.deps</title>
<link>https://ask.clojure.org/index.php/13300/abstract-env-var-reading-in-tools-deps</link>
<description>&lt;p&gt;I have a Cursive user wanting to use the &lt;code&gt;CLOJURE_CLI_ALLOW_HTTP_REPO &lt;/code&gt; env var. Since Cursive invokes tools.deps in-process, there's no way for me to set an env var in the current process. deps.clj has a &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/borkdude/deps.clj/blob/441a53821f6106ea86f33c0e9431110cb713c2e7/deps.clj#L239-L242&quot;&gt;nice abstraction&lt;/a&gt; for this - would it be possible to use this or something similar for tools.deps too? I assume this problem will affect any process using tools.deps as a library.&lt;/p&gt;
</description>
<category>tools.deps</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/13300/abstract-env-var-reading-in-tools-deps</guid>
<pubDate>Sat, 16 Sep 2023 02:35:57 +0000</pubDate>
</item>
<item>
<title>switch tools.build to pull from jars rather than exploding onto disk</title>
<link>https://ask.clojure.org/index.php/13231/switch-tools-build-pull-from-jars-rather-than-exploding-onto</link>
<description>&lt;p&gt;Following on from &lt;a rel=&quot;nofollow&quot; href=&quot;https://ask.clojure.org/index.php/10854/getting-an-error-with-tools-build-uberjar?show=10854#q10854&quot;&gt;https://ask.clojure.org/index.php/10854/getting-an-error-with-tools-build-uberjar?show=10854#q10854&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Jars are case-sensitive. This means that an uberjar can have a file named &lt;code&gt;license&lt;/code&gt; and &lt;code&gt;LICENSE/epl.txt&lt;/code&gt; simultaneously inside them. But if you explode these to disk when building an uberjar in a file system that is case-sensitive (in particular, OSX), you can an error along the lines of&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;Execution error (ExceptionInfo) at clojure.tools.build.tasks.uber/explode1 (uber.clj:166).&lt;br&gt;
Cannot write META-INF/license/LICENSE.aix-netbsd.txt from io.grpc/grpc-netty-shaded as parent dir is a file from another lib. One of them must be excluded.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;The solution to this is to track down the conflicting files and add them to exclusions. But often this can be tedious if the single file you want ot exclude &lt;code&gt;license&lt;/code&gt; exists and the error message is about one of several files that conflicts &lt;code&gt;LICENSE/epl.txt&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;The error is annoying also because these files can sit together just fine in an uberjar, but not in their temporary location on disk. It would be nice if the uberjar could just pull files from each jar rather than copy them onto disk in an intermediate step.&lt;/p&gt;
</description>
<category>tools.build</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/13231/switch-tools-build-pull-from-jars-rather-than-exploding-onto</guid>
<pubDate>Tue, 29 Aug 2023 20:49:38 +0000</pubDate>
</item>
<item>
<title>Tools deps perform sanity checking on deps.edn file</title>
<link>https://ask.clojure.org/index.php/12803/tools-deps-perform-sanity-checking-on-deps-edn-file</link>
<description>&lt;p&gt;Peform validation of deps.edn files, providing useful error messages and information about misspelled keywords, invalid types, valid data in the wrong location.&lt;/p&gt;
&lt;p&gt;Some motivating examples:&lt;/p&gt;
&lt;p&gt;misspelled keywords: &lt;br&gt;
&lt;code&gt;:overide-deps&lt;/code&gt;&lt;br&gt;
&lt;a rel=&quot;nofollow&quot; href=&quot;https://groups.google.com/g/clojure/c/g-Gy3Q7jHfk&quot;&gt;https://groups.google.com/g/clojure/c/g-Gy3Q7jHfk&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;including valid options in incorrect locations&lt;/p&gt;
&lt;p&gt;&lt;code&gt;:jvm-opts&lt;/code&gt; in the top level&lt;br&gt;
&lt;a rel=&quot;nofollow&quot; href=&quot;https://app.slack.com/client/T03RZGPFR/C6QH853H8&quot;&gt;https://app.slack.com/client/T03RZGPFR/C6QH853H8&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;invalid data types in valid edn files:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;{:deps 
  :org.clojure/tools.reader {:mvn/version &quot;1.2.3&quot;}
  org.clojure/tools.reader {mvn/version &quot;1.2.3&quot;}}&lt;/code&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p&gt;first dep has a keyword where a symbol should be present&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;second dep has a symbol where a keyword should be present&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;For implementation&lt;br&gt;
spell-spec is a great tool to do this&lt;br&gt;
&lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/bhauman/spell-spec&quot;&gt;https://github.com/bhauman/spell-spec&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;related JIRA ticket&lt;br&gt;
&lt;a rel=&quot;nofollow&quot; href=&quot;https://clojure.atlassian.net/browse/TDEPS-238&quot;&gt;https://clojure.atlassian.net/browse/TDEPS-238&lt;/a&gt;&lt;/p&gt;
</description>
<category>tools.deps</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/12803/tools-deps-perform-sanity-checking-on-deps-edn-file</guid>
<pubDate>Thu, 23 Mar 2023 19:46:07 +0000</pubDate>
</item>
<item>
<title>Document that clojure.data.int-map is sorted</title>
<link>https://ask.clojure.org/index.php/12778/document-that-clojure-data-int-map-is-sorted</link>
<description>&lt;p&gt;Recently a question about it &lt;a rel=&quot;nofollow&quot; href=&quot;https://clojurians.slack.com/archives/C03S1KBA2/p1679007293266749&quot;&gt;was asked on Slack&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;This &lt;a rel=&quot;nofollow&quot; href=&quot;https://clojure.atlassian.net/browse/DIMAP-4&quot;&gt;DIMAP-4 Jira ticket&lt;/a&gt; has made the map and the set deliberately sorted, but it was never mentioned in the docs.&lt;br&gt;
Seems like it could be explicitly mentioned in the docstrings?&lt;/p&gt;
</description>
<category>data.int-map</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/12778/document-that-clojure-data-int-map-is-sorted</guid>
<pubDate>Fri, 17 Mar 2023 08:58:14 +0000</pubDate>
</item>
<item>
<title>`intersection` and `union` do not support `nil` punning</title>
<link>https://ask.clojure.org/index.php/10996/intersection-and-union-do-not-support-nil-punning</link>
<description>&lt;p&gt;This is for org.clojure/data.int-map  v 1.0.0.&lt;br&gt;
At the same time &lt;code&gt;clojure.set/intersection&lt;/code&gt; and &lt;code&gt;clojure.set/union&lt;/code&gt; handle the case well.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;(ns sandbox
  (:require
   [clojure.data.int-map :as int-map]
   [clojure.set]))

(clojure.set/intersection #{1 3} #{1 2 3}) ; =&amp;gt; #{1 3}
(clojure.set/intersection #{1 3} nil) ; =&amp;gt; nil
(clojure.set/intersection nil #{1 2 3}) ; =&amp;gt; nil

(int-map/intersection (int-map/int-set #{1 3}) (int-map/int-set #{1 2 3})) ; =&amp;gt; #{1 3}
(int-map/intersection (int-map/int-set #{1 3}) nil) ; =&amp;gt; NullPointerException
(int-map/intersection nil (int-map/int-set #{1 2 3})) ; =&amp;gt; NullPointerException

(clojure.set/union #{1 3} #{2}) ; =&amp;gt; #{1 3 2}
(clojure.set/union #{1 3} nil) ; =&amp;gt; #{1 3}
(clojure.set/union nil #{2}) ; =&amp;gt; #{2}

(int-map/union (int-map/int-set #{1 3}) (int-map/int-set #{2})) ; =&amp;gt; #{1 2 3}
(int-map/union (int-map/int-set #{1 3}) nil) ; =&amp;gt; NullPointerException
(int-map/union nil (int-map/int-set #{2})) ; =&amp;gt; NullPointerException
&lt;/code&gt;&lt;/pre&gt;
</description>
<category>data.int-map</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/10996/intersection-and-union-do-not-support-nil-punning</guid>
<pubDate>Tue, 31 Aug 2021 16:51:39 +0000</pubDate>
</item>
<item>
<title>`Ambiguous method signature for method: close` thrown where clojure.core wouldn't</title>
<link>https://ask.clojure.org/index.php/10391/ambiguous-method-signature-method-thrown-clojure-wouldnt</link>
<description>&lt;p&gt;The following code will throw an exception:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;(ana.jvm/analyze '(reify
                    java.io.Closeable
                    (close [_])
                    example.foo/EventClient
                    (close [_])))
                    ;; =&amp;gt; clojure.lang.ExceptionInfo: Ambiguous method signature for method: close
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;...where &lt;code&gt;example.foo/EventClient&lt;/code&gt; is a a real, resolvable defprotocol that does in fact define a &lt;code&gt;close [_]&lt;/code&gt; method.&lt;/p&gt;
&lt;p&gt;Here is a reproducible patch that can be applied over &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/clojure/tools.analyzer.jvm/commit/f00d92317307c3e9e326fd99d337292925dc9db1&quot;&gt;https://github.com/clojure/tools.analyzer.jvm/commit/f00d92317307c3e9e326fd99d337292925dc9db1&lt;/a&gt; :&lt;/p&gt;
&lt;p&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://gist.githubusercontent.com/vemv/ae450c380ac96683bc06275323e7e322/raw/91ad4b60502b32f4f57bd0d5707bcf51740f8e7b/gistfile1.patch&quot;&gt;https://gist.githubusercontent.com/vemv/ae450c380ac96683bc06275323e7e322/raw/91ad4b60502b32f4f57bd0d5707bcf51740f8e7b/gistfile1.patch&lt;/a&gt;&lt;/p&gt;
</description>
<category>tools.analyzer</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/10391/ambiguous-method-signature-method-thrown-clojure-wouldnt</guid>
<pubDate>Thu, 01 Apr 2021 17:15:51 +0000</pubDate>
</item>
<item>
<title>Can core.match LiteralPattern emit more specialized code?</title>
<link>https://ask.clojure.org/index.php/9909/can-core-match-literalpattern-emit-more-specialized-code</link>
<description>&lt;p&gt;Hello,&lt;br&gt;
Looking at the code emitted by core.match, I see that literals are always compared using &lt;code&gt;=&lt;/code&gt;. &lt;br&gt;
While it works, wouldn't it be faster to specialize equality for different literals, such as:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt; (number? l) `(and (number? ~ocr) (== ~l ~ocr))
 (keyword? l) `(identical? ~l ~ocr)
 (nil? l) `(nil? ~ocr)
 (true? l) `(true? ~ocr)
 (false? l) `(false? ~ocr)
 (string? l) `(.equals ~l ~ocr)
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;(snippet added to &lt;code&gt;LiteralPattern&lt;/code&gt; cond.&lt;/p&gt;
&lt;p&gt;Crude benchmarks show it's faster than &lt;code&gt;=&lt;/code&gt; and all the tests pass, too.&lt;/p&gt;
&lt;p&gt;Think this warrants a patch?&lt;/p&gt;
</description>
<category>core.match</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/9909/can-core-match-literalpattern-emit-more-specialized-code</guid>
<pubDate>Tue, 01 Dec 2020 07:29:48 +0000</pubDate>
</item>
<item>
<title>Form emitting by cljs.analyzer</title>
<link>https://ask.clojure.org/index.php/9524/form-emitting-by-cljs-analyzer</link>
<description>&lt;p&gt;Hi!&lt;br&gt;
I want to write a code to code compiler for both Clojure and ClojureScript.&lt;br&gt;
So I need something like &lt;code&gt;clojure.tools.analyzer.passes.js.emit-form/emit-form&lt;/code&gt;, but tools.analyzer.js is abandoned and &lt;code&gt;cljs.analyzer&lt;/code&gt; can't emit clojure form from AST.&lt;/p&gt;
&lt;p&gt;How can I write my code transformation in terms of AST with &lt;code&gt;tools.analyzer.jvm&lt;/code&gt; and &lt;code&gt;cljs.analyzer&lt;/code&gt;? &lt;br&gt;
Should I use both &lt;code&gt;cljs.analyzer&lt;/code&gt; and  &lt;code&gt;clojure.tools.analyzer.passes.js.emit-form/emit-form&lt;/code&gt;? &lt;/p&gt;
&lt;p&gt;Can I use &lt;code&gt;clojure.tools.analyzer.ast/walk&lt;/code&gt; with &lt;code&gt;cljs.analyzer&lt;/code&gt;?&lt;/p&gt;
&lt;p&gt;How to use passes in terms of &lt;code&gt;tools.analyzer&lt;/code&gt; with &lt;code&gt;cljs.analyzer&lt;/code&gt;? I think it's impossible.&lt;/p&gt;
</description>
<category>tools.analyzer</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/9524/form-emitting-by-cljs-analyzer</guid>
<pubDate>Wed, 05 Aug 2020 10:51:06 +0000</pubDate>
</item>
<item>
<title>Let RoseTree satisfy (implement) Datafiable</title>
<link>https://ask.clojure.org/index.php/9412/let-rosetree-satisfy-implement-datafiable</link>
<description>&lt;p&gt;I think for debugging it would be awesome to be able to navigate through the rose trees.&lt;/p&gt;
</description>
<category>test.check</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/9412/let-rosetree-satisfy-implement-datafiable</guid>
<pubDate>Thu, 02 Jul 2020 18:36:54 +0000</pubDate>
</item>
</channel>
</rss>