<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>Clojure Q&amp;A - Recent questions and answers in Contrib libs</title>
<link>https://ask.clojure.org/index.php/qa/contrib-libs</link>
<description></description>
<item>
<title>Default implementation of AsElements to treat numbers as numbers, not strings</title>
<link>https://ask.clojure.org/index.php/15060/default-implementation-aselements-numbers-numbers-strings</link>
<description>&lt;p&gt;I'm slowly converting some code from using &lt;code&gt;xml/element&lt;/code&gt; to &lt;code&gt;xml/sexp-as-element&lt;/code&gt;, and I've noticed a discrepancy. &lt;code&gt;xml/element&lt;/code&gt; does (almost) no processing of the &quot;content&quot;, inserting it directly (unless it's &lt;code&gt;nil&lt;/code&gt;). &lt;code&gt;xml/sexp-as-element&lt;/code&gt; calls &lt;code&gt;(str)&lt;/code&gt; on the &quot;content&quot; if it's not seq of some kind (vector or ISeq) or a keyword. This means that &lt;code&gt;(= (xml/element :foo {} 1) (xml/sexp-as-element [:foo 1]))&lt;/code&gt; is false.&lt;/p&gt;
&lt;p&gt;There are probably other differences, but this one seems relatively big, as there's no way to use numbers in &lt;code&gt;xml/sexp-as-element&lt;/code&gt; without calling &lt;code&gt;extend-protocol&lt;/code&gt; yourself.&lt;/p&gt;
&lt;p&gt;May I recommend/request adding this extension? It will make &lt;code&gt;xml/sexp-as-element&lt;/code&gt; match &lt;code&gt;xml/element&lt;/code&gt; for numbers, and make &lt;code&gt;xml/sexp-as-element&lt;/code&gt; match hiccup in general.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;(extend-protocol clojure.data.xml.protocols/AsElements
  java.lang.Number
  (as-elements [n] [n]))
&lt;/code&gt;&lt;/pre&gt;
</description>
<category>data.xml</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/15060/default-implementation-aselements-numbers-numbers-strings</guid>
<pubDate>Tue, 28 Apr 2026 16:10:26 +0000</pubDate>
</item>
<item>
<title>Answered: Is the recent change to flow's futurize safe?</title>
<link>https://ask.clojure.org/index.php/14994/is-the-recent-change-to-flows-futurize-safe?show=14996#a14996</link>
<description>&lt;p&gt;Created &lt;a rel=&quot;nofollow&quot; href=&quot;https://clojure.atlassian.net/browse/ASYNC-275&quot;&gt;ASYNC-275&lt;/a&gt;.&lt;/p&gt;
</description>
<category>core.async</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14994/is-the-recent-change-to-flows-futurize-safe?show=14996#a14996</guid>
<pubDate>Wed, 18 Mar 2026 13:41:35 +0000</pubDate>
</item>
<item>
<title>Answered: tools.cli: capture unrecognized options as unparsed arguments</title>
<link>https://ask.clojure.org/index.php/14977/tools-cli-capture-unrecognized-options-unparsed-arguments?show=14985#a14985</link>
<description>&lt;p&gt;Logged as &lt;a rel=&quot;nofollow&quot; href=&quot;https://clojure.atlassian.net/browse/TCLI-107&quot;&gt;https://clojure.atlassian.net/browse/TCLI-107&lt;/a&gt; with a proposed syntax:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;:subcommand :explicit&lt;/code&gt; will have the same meaning as &lt;code&gt;:in-order true&lt;/code&gt; does today&lt;/li&gt;
&lt;li&gt;&lt;code&gt;:subcommand :implicit&lt;/code&gt; will have the behavior the OP wants here, i.e., an unknown option is treated as if there were an implicit subcommand present&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Deprecate &lt;code&gt;:in-order true&lt;/code&gt; (in favor of &lt;code&gt;:subcommand :explicit&lt;/code&gt;).&lt;/p&gt;
</description>
<category>tools.cli</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14977/tools-cli-capture-unrecognized-options-unparsed-arguments?show=14985#a14985</guid>
<pubDate>Fri, 06 Mar 2026 01:40:33 +0000</pubDate>
</item>
<item>
<title>Answered: Could some calls to clojure.core/= be replaced by clojure.core/identical?</title>
<link>https://ask.clojure.org/index.php/12721/could-some-calls-clojure-core-replaced-clojure-core-identical?show=14971#a14971</link>
<description>&lt;p&gt;The 1.2.x versions of &lt;code&gt;core.cache&lt;/code&gt; use delays inside the &lt;code&gt;wrapped&lt;/code&gt; ns so the original aspect of this Q is moot, but we could probably still change all those &lt;code&gt;=&lt;/code&gt; to &lt;code&gt;identical?&lt;/code&gt; for &lt;code&gt;::&lt;/code&gt; style keywords in the library.&lt;/p&gt;
</description>
<category>core.cache</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/12721/could-some-calls-clojure-core-replaced-clojure-core-identical?show=14971#a14971</guid>
<pubDate>Wed, 25 Feb 2026 23:51:22 +0000</pubDate>
</item>
<item>
<title>Answered: clojure.core.cache caches delays that hold exceptions as of version 1.2.254</title>
<link>https://ask.clojure.org/index.php/14965/clojure-core-cache-caches-delays-that-hold-exceptions-version?show=14970#a14970</link>
<description>&lt;p&gt;Version 1.2.263 solves both the cache stampede bug and the cached exceptions bug, and does so without locking. Thank you, Claude Opus 4.6.&lt;/p&gt;
</description>
<category>core.cache</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14965/clojure-core-cache-caches-delays-that-hold-exceptions-version?show=14970#a14970</guid>
<pubDate>Wed, 25 Feb 2026 23:07:51 +0000</pubDate>
</item>
<item>
<title>Answered: clojure.java.doc.api/javadoc-data-fn does not include constructor info</title>
<link>https://ask.clojure.org/index.php/14920/clojure-java-doc-javadoc-data-does-include-constructor-info?show=14932#a14932</link>
<description>&lt;p&gt;That functionality is now present in the &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/clojure/java.doc/releases/tag/v0.1.4&quot;&gt;v0.1.4&lt;/a&gt; release.  &lt;/p&gt;
</description>
<category>java.doc</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14920/clojure-java-doc-javadoc-data-does-include-constructor-info?show=14932#a14932</guid>
<pubDate>Fri, 13 Feb 2026 18:33:40 +0000</pubDate>
</item>
<item>
<title>Answered: javadoc-data-fn does not find selected method for inherited methods</title>
<link>https://ask.clojure.org/index.php/14921/javadoc-data-does-not-find-selected-method-inherited-methods?show=14931#a14931</link>
<description>&lt;p&gt;Great feedback. &lt;/p&gt;
&lt;p&gt;We were indeed not looking for inherited methods. That functionality is now present in the &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/clojure/java.doc/releases/tag/v0.1.4&quot;&gt;v0.1.4&lt;/a&gt; release.  &lt;/p&gt;
</description>
<category>java.doc</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14921/javadoc-data-does-not-find-selected-method-inherited-methods?show=14931#a14931</guid>
<pubDate>Fri, 13 Feb 2026 18:33:01 +0000</pubDate>
</item>
<item>
<title>Answered: Core Cache and Count</title>
<link>https://ask.clojure.org/index.php/14910/core-cache-and-count?show=14914#a14914</link>
<description>&lt;p&gt;Seems reasonable. &lt;/p&gt;
&lt;p&gt;Created &lt;a rel=&quot;nofollow&quot; href=&quot;https://clojure.atlassian.net/browse/CCACHE-67&quot;&gt;https://clojure.atlassian.net/browse/CCACHE-67&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I'm happy to help screen a patch if you're so inclined to provide one.&lt;/p&gt;
</description>
<category>core.cache</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14910/core-cache-and-count?show=14914#a14914</guid>
<pubDate>Thu, 29 Jan 2026 14:03:17 +0000</pubDate>
</item>
<item>
<title>Answered: `flow/ping-proc` can be slow or fail to respond, even when process isn't busy</title>
<link>https://ask.clojure.org/index.php/14911/flow-ping-proc-slow-fail-respond-even-when-process-isnt-busy?show=14912#a14912</link>
<description>&lt;p&gt;Thanks, we've been discussing ways to specify filters for proc state datafication.&lt;/p&gt;
</description>
<category>core.async</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14911/flow-ping-proc-slow-fail-respond-even-when-process-isnt-busy?show=14912#a14912</guid>
<pubDate>Wed, 28 Jan 2026 19:54:27 +0000</pubDate>
</item>
<item>
<title>Answered: clojure.java.doc.api/javadoc-data-fn does not include return types for methods</title>
<link>https://ask.clojure.org/index.php/14898/clojure-java-javadoc-data-does-include-return-types-methods?show=14899#a14899</link>
<description>&lt;p&gt;I just released &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/clojure/java.doc/releases/tag/v0.1.3&quot;&gt;v0.1.3&lt;/a&gt; that now includes the &lt;code&gt;:return-type&lt;/code&gt; in the response from jdoc-data&lt;/p&gt;
</description>
<category>java.doc</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14898/clojure-java-javadoc-data-does-include-return-types-methods?show=14899#a14899</guid>
<pubDate>Fri, 23 Jan 2026 21:55:59 +0000</pubDate>
</item>
<item>
<title>Answered: How to access non-jar artifacts (aar, zip) downloaded via tools.deps in build.clj?</title>
<link>https://ask.clojure.org/index.php/14862/how-access-non-jar-artifacts-aar-downloaded-tools-deps-build?show=14864#a14864</link>
<description>&lt;p&gt;In tools.build you can find these paths in the :libs key of the basis when you build it, so that would give you the path.&lt;/p&gt;
&lt;p&gt;You can then use &lt;code&gt;unzip&lt;/code&gt; in the tools.build api to help unzipping it. See &lt;a rel=&quot;nofollow&quot; href=&quot;https://clojure.github.io/tools.build/clojure.tools.build.api.html#var-unzip&quot;&gt;https://clojure.github.io/tools.build/clojure.tools.build.api.html#var-unzip&lt;/a&gt;&lt;/p&gt;
</description>
<category>tools.deps</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14862/how-access-non-jar-artifacts-aar-downloaded-tools-deps-build?show=14864#a14864</guid>
<pubDate>Wed, 24 Dec 2025 18:03:56 +0000</pubDate>
</item>
<item>
<title>Answered: flow monitoring tool serves resources from unqualified path</title>
<link>https://ask.clojure.org/index.php/14748/flow-monitoring-tool-serves-resources-from-unqualified-path?show=14768#a14768</link>
<description>&lt;p&gt;Resource path has been updated in &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/clojure/core.async.flow-monitor/releases/tag/v0.1.3&quot;&gt;v0.1.3&lt;/a&gt;&lt;/p&gt;
</description>
<category>core.async</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14748/flow-monitoring-tool-serves-resources-from-unqualified-path?show=14768#a14768</guid>
<pubDate>Mon, 24 Nov 2025 19:27:37 +0000</pubDate>
</item>
<item>
<title>Answered: How do I effectively use EDN with C/C++?</title>
<link>https://ask.clojure.org/index.php/11014/how-do-i-effectively-use-edn-with-c-c?show=14760#a14760</link>
<description>&lt;p&gt;I just finished optimised C implementation of EDN parser.&lt;/p&gt;
&lt;p&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/DotFox/edn.c&quot;&gt;https://github.com/DotFox/edn.c&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;It is fast and highly optimised via SIMD instructions. By default it is pedanticaly follow official edn specification but can be extended to be fully compatible with clojure.edn via build flags.&lt;/p&gt;
&lt;p&gt;As a small cherry on top you can add experimental text blocks support:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;{:raw-json-string &quot;&quot;&quot;
                  {
                      &quot;id&quot;: 0, 
                      &quot;name&quot;: &quot;Kirill&quot;, 
                      &quot;github&quot;: &quot;@DeLaGuardo&quot;
                  }
                  &quot;&quot;&quot;}
;; =&amp;gt; {:raw-json-string 
       &quot;{    \&quot;id\&quot;: 0,\n    \&quot;name\&quot;: \&quot;Kirill\&quot;,\n    \&quot;github\&quot;: \&quot;@DeLaGuardo\&quot;\n}&quot;}
&lt;/code&gt;&lt;/pre&gt;
</description>
<category>Contrib libs</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/11014/how-do-i-effectively-use-edn-with-c-c?show=14760#a14760</guid>
<pubDate>Thu, 20 Nov 2025 12:20:54 +0000</pubDate>
</item>
<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>Answered: Can doc and jdoc be refactored to a common protocol while it's still early?</title>
<link>https://ask.clojure.org/index.php/14734/can-doc-and-jdoc-refactored-common-protocol-while-still-early?show=14735#a14735</link>
<description>&lt;p&gt;This library (which has not been released yet, and is still a work in progress) is focused right now on the narrow goal of reading Javadoc directly in the REPL. It's packaged as a library as a first pass. There are a variety of ways it might (or might not) be incorporated into core in the future - that is a question for later as we get feedback on the idea.&lt;/p&gt;
&lt;p&gt;Because this library has a big dependency footprint, it's not something we would want to include in core directly, however it could potentially be incorporated via external tool invocation, much as we incorporate &lt;code&gt;tools.deps&lt;/code&gt; classpath construction under &lt;code&gt;add-lib&lt;/code&gt; using an external tool invocation with its own classpath.&lt;/p&gt;
&lt;p&gt;Whether it could be incorporated into &lt;code&gt;doc&lt;/code&gt; itself is a very open question. To date, we have simply extended the functionality inside &lt;code&gt;doc&lt;/code&gt; (with specs for example) without making it an open system, but doing so is one interesting option available when we look at incorporation in the future.&lt;/p&gt;
</description>
<category>java.doc</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14734/can-doc-and-jdoc-refactored-common-protocol-while-still-early?show=14735#a14735</guid>
<pubDate>Tue, 28 Oct 2025 13:02:03 +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>Answered: An undocumented breaking change in data.json</title>
<link>https://ask.clojure.org/index.php/14728/an-undocumented-breaking-change-in-data-json?show=14731#a14731</link>
<description>&lt;p&gt;I've updated the changelog to note this.&lt;/p&gt;
&lt;p&gt;JSONWriter is not something users usually extend themselves, although it is available for that level of customization when necessary. However, we did know this had the potential to break some users and updated the version from 1.x to 2.x due to that.&lt;/p&gt;
</description>
<category>data.json</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14728/an-undocumented-breaking-change-in-data-json?show=14731#a14731</guid>
<pubDate>Fri, 24 Oct 2025 18:28:16 +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>Answered: Replace core.async’s internal LinkedList queue with ArrayDeque?</title>
<link>https://ask.clojure.org/index.php/14696/replace-core-asyncs-internal-linkedlist-queue-arraydeque?show=14704#a14704</link>
<description>&lt;p&gt;There is a ticket for this at &lt;a rel=&quot;nofollow&quot; href=&quot;https://clojure.atlassian.net/browse/ASYNC-231&quot;&gt;https://clojure.atlassian.net/browse/ASYNC-231&lt;/a&gt;&lt;/p&gt;
</description>
<category>core.async</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14696/replace-core-asyncs-internal-linkedlist-queue-arraydeque?show=14704#a14704</guid>
<pubDate>Wed, 03 Sep 2025 20:10:39 +0000</pubDate>
</item>
<item>
<title>Answered: Typos in Flow guide</title>
<link>https://ask.clojure.org/index.php/14686/typos-in-flow-guide?show=14687#a14687</link>
<description>&lt;p&gt;Already fixed, thx&lt;/p&gt;
</description>
<category>core.async</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14686/typos-in-flow-guide?show=14687#a14687</guid>
<pubDate>Mon, 18 Aug 2025 13:35:12 +0000</pubDate>
</item>
<item>
<title>Answered: tools.build compile-clj capture out/err</title>
<link>https://ask.clojure.org/index.php/14648/tools-build-compile-clj-capture-out-err?show=14649#a14649</link>
<description>&lt;p&gt;Logged as &lt;a rel=&quot;nofollow&quot; href=&quot;https://clojure.atlassian.net/browse/TBUILD-46&quot;&gt;https://clojure.atlassian.net/browse/TBUILD-46&lt;/a&gt;&lt;/p&gt;
</description>
<category>tools.build</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14648/tools-build-compile-clj-capture-out-err?show=14649#a14649</guid>
<pubDate>Mon, 28 Jul 2025 20:00:23 +0000</pubDate>
</item>
<item>
<title>Answered: Is core.async.flow available in ClojureScript?</title>
<link>https://ask.clojure.org/index.php/14633/is-core-async-flow-available-in-clojurescript?show=14635#a14635</link>
<description>&lt;p&gt;No, we are not currently targeting it to ClojureScript as it's really intended for writing multi-threaded applications.&lt;/p&gt;
</description>
<category>core.async</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14633/is-core-async-flow-available-in-clojurescript?show=14635#a14635</guid>
<pubDate>Fri, 18 Jul 2025 19:10:40 +0000</pubDate>
</item>
<item>
<title>Answered: tools.build fails with http_proxy/https_proxy set</title>
<link>https://ask.clojure.org/index.php/14602/tools-build-fails-with-httpproxy-httpsproxy-set?show=14603#a14603</link>
<description>&lt;p&gt;A quote from Alex Miller that was used at least once to explain why the support isn't there:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;We’re going through the Maven apis for that stuff and that’s just not how it works&lt;br&gt;
[...]&lt;br&gt;
tools.deps supports that via the mirror/proxy settings in settings.xml&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;So your script could be creating &lt;code&gt;settings.xml&lt;/code&gt; with the right content dictated by &lt;code&gt;http_proxy&lt;/code&gt;.&lt;/p&gt;
</description>
<category>tools.build</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14602/tools-build-fails-with-httpproxy-httpsproxy-set?show=14603#a14603</guid>
<pubDate>Wed, 02 Jul 2025 12:48:08 +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>Answered: Dependency between options in Clojure/tools.cli ?</title>
<link>https://ask.clojure.org/index.php/14556/dependency-between-options-in-clojure-tools-cli?show=14558#a14558</link>
<description>&lt;p&gt;There's nothing built-in. The simplest solution would probably be to post-process the result of calling &lt;code&gt;parse-opts&lt;/code&gt; to check that if &lt;code&gt;:a&lt;/code&gt; is present, so are both &lt;code&gt;:f&lt;/code&gt; and &lt;code&gt;:d&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;I often wrap &lt;code&gt;parse-opts&lt;/code&gt; in a post-processing step for &quot;global validation&quot; (that takes the result of &lt;code&gt;parse-opts&lt;/code&gt; and produces an identical structure, with extra &lt;code&gt;:errors&lt;/code&gt; entries).&lt;/p&gt;
</description>
<category>tools.cli</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14556/dependency-between-options-in-clojure-tools-cli?show=14558#a14558</guid>
<pubDate>Tue, 27 May 2025 15:28:13 +0000</pubDate>
</item>
<item>
<title>Answered: what kind of systems could be made with clojure.async.flow?</title>
<link>https://ask.clojure.org/index.php/14526/what-kind-of-systems-could-be-made-with-clojure-async-flow?show=14527#a14527</link>
<description>&lt;p&gt;core.async.flow is particularly well suited to what Rich called &quot;situated programs&quot; in the &quot;Effective Programs&quot; talk &lt;a rel=&quot;nofollow&quot; href=&quot;https://www.youtube.com/watch?v=2V1FtfBDsLU&quot;&gt;https://www.youtube.com/watch?v=2V1FtfBDsLU&lt;/a&gt; .  These programs execute for long periods of time (often continuously), deal with information, have extensive &quot;memory&quot; (via database connections), and interact with the real world via external I/O channels (these days, often messaging systems like Kafka etc). &lt;/p&gt;
&lt;p&gt;You're correct that flow is a poor fit to run in a lambda or in a an RPC style web request path - you are probably better served in writing synchronous code for those scenarios and avoiding the setup and async overhead. But those kinds of processes often feed one or more situated programs via a message queue or database insert.&lt;/p&gt;
&lt;p&gt;I would also recommend Rich's &quot;Language of the System&quot; talk which predates flow and core.async(!) by many years but is very much of this idea. &lt;a rel=&quot;nofollow&quot; href=&quot;https://www.youtube.com/watch?v=ROor6_NGIWU&quot;&gt;https://www.youtube.com/watch?v=ROor6_NGIWU&lt;/a&gt;&lt;/p&gt;
</description>
<category>core.async</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14526/what-kind-of-systems-could-be-made-with-clojure-async-flow?show=14527#a14527</guid>
<pubDate>Tue, 29 Apr 2025 16:19:18 +0000</pubDate>
</item>
<item>
<title>Answered: tools.cli: Support default value for arg with value</title>
<link>https://ask.clojure.org/index.php/14524/tools-cli-support-default-value-for-arg-with-value?show=14525#a14525</link>
<description>&lt;p&gt;The closest you can get is this:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;clojure.tools.cli=&amp;gt; (parse-opts [&quot;--diff=&quot;] [[nil &quot;--diff NAME&quot; &quot;Diff&quot; :parse-fn #(or (not-empty %) &quot;foo&quot;)]])
{:options {:diff &quot;foo&quot;}, :arguments [], :summary &quot;      --diff NAME  Diff&quot;, :errors nil}
clojure.tools.cli=&amp;gt; (parse-opts [&quot;--diff=bar&quot;] [[nil &quot;--diff NAME&quot; &quot;Diff&quot; :parse-fn #(or (not-empty %) &quot;foo&quot;)]])
{:options {:diff &quot;bar&quot;}, :arguments [], :summary &quot;      --diff NAME  Diff&quot;, :errors nil}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;clojure.tools.cli=&amp;gt; &lt;/p&gt;
&lt;p&gt;As discussed on Slack, there are reasonable cases for a value-bearing option to want to accept a string that starts with &lt;code&gt;--&lt;/code&gt; or just &lt;code&gt;-&lt;/code&gt; (consider &lt;code&gt;=&lt;/code&gt; to be optional here):&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;meta-command --option-to-use=--cabbage... \
--divider=--sep-- \
--value=-1
&lt;/code&gt;&lt;/pre&gt;
</description>
<category>tools.cli</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14524/tools-cli-support-default-value-for-arg-with-value?show=14525#a14525</guid>
<pubDate>Mon, 28 Apr 2025 19:08:37 +0000</pubDate>
</item>
<item>
<title>Answered: clojure.tools.reader.edn/read can cause incorrect column number for token at end of input</title>
<link>https://ask.clojure.org/index.php/14437/clojure-tools-reader-cause-incorrect-column-number-token-input?show=14443#a14443</link>
<description>&lt;p&gt;Logged as &lt;a rel=&quot;nofollow&quot; href=&quot;https://clojure.atlassian.net/browse/TRDR-75&quot;&gt;https://clojure.atlassian.net/browse/TRDR-75&lt;/a&gt;, happy to see a patch.&lt;/p&gt;
</description>
<category>tools.reader</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14437/clojure-tools-reader-cause-incorrect-column-number-token-input?show=14443#a14443</guid>
<pubDate>Wed, 05 Mar 2025 18:50:00 +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>Answered: clojure.java.data/from-java throws stack overflow</title>
<link>https://ask.clojure.org/index.php/14379/clojure-java-data-from-java-throws-stack-overflow?show=14399#a14399</link>
<description>&lt;p&gt;Christos,&lt;/p&gt;
&lt;p&gt;Can you provide more detail on exactly how I can reproduce this?&lt;/p&gt;
&lt;p&gt;Preferably, a small completely self-contained repo on GitHub with a README explaining the steps.&lt;/p&gt;
&lt;p&gt;Without more information, I cannot even begin to figure out what might be going on here.&lt;/p&gt;
</description>
<category>java.data</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14379/clojure-java-data-from-java-throws-stack-overflow?show=14399#a14399</guid>
<pubDate>Thu, 20 Feb 2025 00:06:57 +0000</pubDate>
</item>
<item>
<title>Answered: Auto-descending in clojure.data.zip doesn't seem to make a difference</title>
<link>https://ask.clojure.org/index.php/14380/auto-descending-clojure-data-zip-doesnt-seem-make-difference?show=14397#a14397</link>
<description>&lt;p&gt;Logged as &lt;a rel=&quot;nofollow&quot; href=&quot;https://clojure.atlassian.net/browse/DZIP-10&quot;&gt;https://clojure.atlassian.net/browse/DZIP-10&lt;/a&gt;&lt;/p&gt;
</description>
<category>data.zip</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14380/auto-descending-clojure-data-zip-doesnt-seem-make-difference?show=14397#a14397</guid>
<pubDate>Wed, 19 Feb 2025 21:26:05 +0000</pubDate>
</item>
<item>
<title>Answered: Please consider making tools.build pom.properties reproducible (e.g. the &quot;Generated by&quot; date)</title>
<link>https://ask.clojure.org/index.php/14389/please-consider-making-properties-reproducible-generated?show=14391#a14391</link>
<description>&lt;p&gt;If you want to provide a &lt;a rel=&quot;nofollow&quot; href=&quot;https://clojure.org/dev/developing_patches#_coding&quot;&gt;patch&lt;/a&gt;, I'd be happy to merge it. &lt;/p&gt;
&lt;p&gt;I've created an issue here: &lt;a rel=&quot;nofollow&quot; href=&quot;https://clojure.atlassian.net/browse/TBUILD-44&quot;&gt;https://clojure.atlassian.net/browse/TBUILD-44&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;You've already signed the contributor agreement and I've sent you an invite to the jira system via that email.&lt;/p&gt;
</description>
<category>tools.build</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14389/please-consider-making-properties-reproducible-generated?show=14391#a14391</guid>
<pubDate>Sun, 16 Feb 2025 23:04:32 +0000</pubDate>
</item>
<item>
<title>Answered: clojure.java.data.builder fails with overloaded setter</title>
<link>https://ask.clojure.org/index.php/14349/clojure-java-data-builder-fails-with-overloaded-setter?show=14355#a14355</link>
<description>&lt;p&gt;Since &lt;code&gt;modelName&lt;/code&gt; is not supplied as a property, in this case it could just ignore that setter altogether -- so I consider that one bug (&lt;code&gt;java.data&lt;/code&gt; will fail if there are overloaded setters that you don't care about).&lt;/p&gt;
&lt;p&gt;In the case where you are trying to build with a property that is overloaded, &lt;code&gt;java.data&lt;/code&gt; would have to perform some sort of overload resolution to try to pick a &quot;best match&quot; which would be fairly complex.&lt;/p&gt;
&lt;p&gt;What it could do is pick one setter for which &lt;code&gt;instance?&lt;/code&gt; is true of the parameter type and the property value -- and complain if more than one setter satisfies that. That would still be somewhat overprescriptive but it would be less restrictive than the status quo.&lt;/p&gt;
&lt;p&gt;See &lt;a rel=&quot;nofollow&quot; href=&quot;https://clojure.atlassian.net/issues/JDATA-24&quot;&gt;https://clojure.atlassian.net/issues/JDATA-24&lt;/a&gt; and &lt;a rel=&quot;nofollow&quot; href=&quot;https://clojure.atlassian.net/issues/JDATA-25&quot;&gt;https://clojure.atlassian.net/issues/JDATA-25&lt;/a&gt;&lt;/p&gt;
</description>
<category>java.data</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14349/clojure-java-data-builder-fails-with-overloaded-setter?show=14355#a14355</guid>
<pubDate>Wed, 22 Jan 2025 23:35:40 +0000</pubDate>
</item>
<item>
<title>Answered: tools.namespace remove-node does not remove outgoing dependencies from :dependents</title>
<link>https://ask.clojure.org/index.php/14345/namespace-remove-remove-outgoing-dependencies-dependents?show=14346#a14346</link>
<description>&lt;p&gt;I don't actually know the original intent but the docstring you quote says &quot;without removing it as a dependency of other nodes&quot; which sounds like what it does?&lt;/p&gt;
</description>
<category>tools.namespace</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14345/namespace-remove-remove-outgoing-dependencies-dependents?show=14346#a14346</guid>
<pubDate>Mon, 20 Jan 2025 03:53:12 +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>Answered: Incorrect docstring for parse-opts</title>
<link>https://ask.clojure.org/index.php/14275/incorrect-docstring-for-parse-opts?show=14276#a14276</link>
<description>&lt;p&gt;This relates to &lt;a rel=&quot;nofollow&quot; href=&quot;https://ask.clojure.org/index.php/14260/providing-nil-for-long-option-tools-cli-does-seem-work-readme&quot;&gt;https://ask.clojure.org/index.php/14260/providing-nil-for-long-option-tools-cli-does-seem-work-readme&lt;/a&gt; and I plan to update the docstrings and readme to fix both.&lt;/p&gt;
</description>
<category>tools.cli</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14275/incorrect-docstring-for-parse-opts?show=14276#a14276</guid>
<pubDate>Tue, 03 Dec 2024 20:13:25 +0000</pubDate>
</item>
<item>
<title>Answered: Accidental breaking change in data.json 2.5.0: previously, read succeeded, now it isn't</title>
<link>https://ask.clojure.org/index.php/14134/accidental-breaking-change-data-json-previously-succeeded?show=14272#a14272</link>
<description>&lt;p&gt;A PBR with buffer size &amp;gt;= 64 must be supplied if you intend to do repeated reads on the same string. The docstring to read has been further updated in 2.5.1 to include this.&lt;/p&gt;
</description>
<category>data.json</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14134/accidental-breaking-change-data-json-previously-succeeded?show=14272#a14272</guid>
<pubDate>Tue, 26 Nov 2024 19:44:16 +0000</pubDate>
</item>
<item>
<title>Answered: Providing nil for long option in tools.cli does not seem to work per readme</title>
<link>https://ask.clojure.org/index.php/14260/providing-nil-for-long-option-tools-cli-does-seem-work-readme?show=14262#a14262</link>
<description>&lt;p&gt;Try adding &lt;code&gt;:required &quot;MODE&quot;&lt;/code&gt; after &lt;code&gt;:id :mode&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;When there's no long option in the form of &lt;code&gt;--option ARG&lt;/code&gt;, the parameter is treated as a boolean flag, so you have to explicitly tell &lt;code&gt;tools.cli&lt;/code&gt; that an argument is required by the parameter.&lt;/p&gt;
</description>
<category>tools.cli</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14260/providing-nil-for-long-option-tools-cli-does-seem-work-readme?show=14262#a14262</guid>
<pubDate>Tue, 19 Nov 2024 22:32:20 +0000</pubDate>
</item>
<item>
<title>Answered: Multi-threaded cache stampede in core.cache</title>
<link>https://ask.clojure.org/index.php/12567/multi-threaded-cache-stampede-in-core-cache?show=14235#a14235</link>
<description>&lt;p&gt;The 1.2.0-SNAPSHOT should address this. Please try it and confirm whether it does.&lt;/p&gt;
</description>
<category>core.cache</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/12567/multi-threaded-cache-stampede-in-core-cache?show=14235#a14235</guid>
<pubDate>Sat, 09 Nov 2024 07:03:42 +0000</pubDate>
</item>
<item>
<title>Answered: Is the clojure.cache behavior for lookup-or-miss value-fn re-entrancy broken or am I misunderstanding the docstring?</title>
<link>https://ask.clojure.org/index.php/14037/clojure-behavior-lookup-entrancy-misunderstanding-docstring?show=14234#a14234</link>
<description>&lt;p&gt;The 1.2.0-SNAPSHOT should address this. Please try it and confirm whether it does.&lt;/p&gt;
</description>
<category>core.cache</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14037/clojure-behavior-lookup-entrancy-misunderstanding-docstring?show=14234#a14234</guid>
<pubDate>Sat, 09 Nov 2024 07:03:21 +0000</pubDate>
</item>
<item>
<title>Answered: How can I ensure that a private Maven coordinate cannot be shadowed in a public repository?</title>
<link>https://ask.clojure.org/index.php/14198/ensure-private-coordinate-cannot-shadowed-public-repository?show=14219#a14219</link>
<description>&lt;p&gt;The main current answer is that the public repos are trying to prevent this.&lt;/p&gt;
&lt;p&gt;There are two public repos included in the root deps.edn - Maven Central and Clojars. All other repos must be explicitly included in the top-level deps.edn in use (transitive deps.edn repos are ignored - this differs from pom.xml).&lt;/p&gt;
&lt;p&gt;Maven Central has policies to encourage using reverse domain names and/or trademarked names that you control, with requirements for verification. Clojars is now doing similar things, but their naming policies are somewhat laxer and I don't know the current state of everything they are doing.&lt;/p&gt;
&lt;p&gt;The signing key stuff is problematic for lots of reasons (clojars doesn't require, keys must be registered - how do you know if the key you find is one you should trust, etc). This requires a lot of manual intervention. I have been following &lt;a rel=&quot;nofollow&quot; href=&quot;https://slsa.dev/&quot;&gt;SLSA&lt;/a&gt; which I think is taking a smarter approach to provenance and verification. Would love to spend some time really working on how to integrate something like this into both our Clojure build systems and our dependency management tools to work together. Especially for open source libraries distributed as source, we should be able to hash+compare the actual source and relate it to a commit - Clojure's options are WAY BETTER than compile-to-class langs that make new artifacts different than the original source.&lt;/p&gt;
&lt;p&gt;Hoping to spend some time on this kind of stuff next year.&lt;/p&gt;
</description>
<category>tools.deps</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14198/ensure-private-coordinate-cannot-shadowed-public-repository?show=14219#a14219</guid>
<pubDate>Fri, 01 Nov 2024 18:03:32 +0000</pubDate>
</item>
<item>
<title>Answered: clojure.data.xml.event: EndElementEvent should provide tag and location-info</title>
<link>https://ask.clojure.org/index.php/14184/clojure-data-event-endelementevent-should-provide-location?show=14191#a14191</link>
<description>&lt;p&gt;I've added &lt;a rel=&quot;nofollow&quot; href=&quot;https://clojure.atlassian.net/browse/DXML-75&quot;&gt;https://clojure.atlassian.net/browse/DXML-75&lt;/a&gt; - if you could make that a little more detailed in addition to a patch, that would be helpful.&lt;/p&gt;
</description>
<category>data.xml</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14184/clojure-data-event-endelementevent-should-provide-location?show=14191#a14191</guid>
<pubDate>Mon, 14 Oct 2024 13:36:17 +0000</pubDate>
</item>
<item>
<title>Answered: core.unify doesn't handle maps correctly</title>
<link>https://ask.clojure.org/index.php/14147/core-unify-doesnt-handle-maps-correctly?show=14153#a14153</link>
<description>&lt;p&gt;I've got the following patch for consideration. it works in two phases:&lt;br&gt;
1. It identifies any keys which are &quot;not complex&quot;. Complex here meaning a variable, or some kind of collection. These are keys that presumably can be matched on equality and not need unification. Probably the most common type.&lt;br&gt;
2. Complex keys that need unification and backtracking. &lt;/p&gt;
&lt;p&gt;I think there might be one weakness in the patch in that it considers &lt;code&gt;x&lt;/code&gt; to be a template and &lt;code&gt;y&lt;/code&gt; to be the concrete values and this is not true.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;diff --git a/src/main/clojure/clojure/core/unify.clj b/src/main/clojure/clojure/core/unify.clj
index a89db73..c53a0c7 100644
--- a/src/main/clojure/clojure/core/unify.clj
+++ b/src/main/clojure/clojure/core/unify.clj
@@ -101,6 +101,36 @@
   (and (composite? form)
        (#{'&amp;amp;} (first form))))
 
+(defn- garner-unifiers-map
+  [uv-fn variable? x y binds]
+  (let [complex-key? (some-fn variable? composite?)
+        concrete-ks  (-&amp;gt;&amp;gt; x keys (filter (complement complex-key?)))
+        simple-binds (reduce (fn [binds k]
+                               (garner-unifiers uv-fn variable?
+                                                (find x k)
+                                                (find y k)
+                                                binds))
+                             binds
+                             concrete-ks)]
+    (if (or (nil? simple-binds) (every? (complement complex-key?) (keys x)))
+      simple-binds
+      (letfn [(solve [x y binds]
+                (let [x' (first x)]
+                  (when-let [sol (reduce (fn [_ kv]
+                                           (when-let [binds (garner-unifiers uv-fn variable? x' kv binds)]
+                                             (when-let [binds (garner-unifiers-map
+                                                                uv-fn variable?
+                                                                (dissoc x (key x'))
+                                                                (dissoc y (key kv))
+                                                                binds)]
+                                               (reduced binds))))
+                                         nil
+                                         y)]
+                    sol)))]
+        (solve (apply dissoc x concrete-ks)
+               (apply dissoc y concrete-ks)
+               simple-binds)))))
+
 (defn- garner-unifiers
   &quot;Attempt to unify x and y with the given bindings (if any). Potentially returns a map of the 
    unifiers (bindings) found.  Will throw an `IllegalStateException` if the expressions
@@ -117,6 +147,8 @@
       (variable? y)             (uv-fn variable? y x binds)
       (wildcard? x)             (uv-fn variable? (second x) (seq y) binds)
       (wildcard? y)             (uv-fn variable? (second y) (seq x) binds)
+      (and (map? x) (map? y))   (when (= (count x) (count y))
+                                 (garner-unifiers-map uv-fn variable? x y binds))
       (every? composite? [x y]) (garner-unifiers uv-fn
                                                  variable?
                                                  (rest x) 
diff --git a/src/test/clojure/clojure/core/unify_test.clj b/src/test/clojure/clojure/core/unify_test.clj
index a96d476..57a27da 100644
--- a/src/test/clojure/clojure/core/unify_test.clj
+++ b/src/test/clojure/clojure/core/unify_test.clj
@@ -100,3 +100,28 @@
     (is (= {} (unify '[1 ?x] '[1])))
     (is (= {} (unify '[1 ?x ?y ?z] '[1])))))
 
+
+(deftest map-order
+  (testing &quot;Map unification is not sensitive to array map order&quot;
+    (is (= '{?a 1, ?b 2} (unify '{:a ?a :b ?b} {:a 1 :b 2})))
+    (is (= '{?a 1, ?b 2} (unify '{:a ?a :b ?b} {:b 2 :a 1})))
+    (testing &quot;including when keys are unified&quot;
+      (is (= '{?a 1, ?b :b} (unify '{:a ?a ?b :b} {:a 1 :b :b})))
+      (is (= '{?a 1, ?b :b} (unify '{:a ?a ?b :b} {:b :b :a 1})))))
+  (testing &quot;handles collisions in keys&quot;
+    (let [kws #{:a :b :c :d :e :f :g :h :i :dCv :wxW}]
+      (is (= '{?a 1} (unify (zipmap kws (repeat '?a))
+                            (zipmap kws (repeat 1)))))
+      (is (= '{?a 1} (unify (zipmap (reverse kws) (repeat '?a))
+                            (zipmap kws (repeat 1)))))))
+  (testing &quot;Backtracks on complex keys&quot;
+    (is (= '{?a 1, ?b 2, ?c 3, ?d 3, ?e 4}
+           (unify '{?a [?b ?c]
+                    ?d [?e ?e]}
+                  {1 [2 3]
+                   3 [4 4]})))
+    (is (= '{?a 1, ?b 2, ?c 3, ?d 3, ?e 4}
+           (unify '{?a [?b ?c]
+                    ?d [?e ?e]}
+                  {3 [4 4]
+                   1 [2 3]})))))
&lt;/code&gt;&lt;/pre&gt;
</description>
<category>core.unify</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14147/core-unify-doesnt-handle-maps-correctly?show=14153#a14153</guid>
<pubDate>Sun, 29 Sep 2024 21:02:56 +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>Answered: core.unify run-tests.sh file has an error</title>
<link>https://ask.clojure.org/index.php/14145/core-unify-run-tests-sh-file-has-an-error?show=14146#a14146</link>
<description>&lt;p&gt;Fixed. Thanks for the heads up. I used 1.11.4 and updated &lt;code&gt;:1.10&lt;/code&gt; to 1.10.3.&lt;/p&gt;
</description>
<category>core.unify</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14145/core-unify-run-tests-sh-file-has-an-error?show=14146#a14146</guid>
<pubDate>Sat, 28 Sep 2024 17:11:54 +0000</pubDate>
</item>
<item>
<title>Answered: clj -X:deps find-versions prefers git deps if both git and mvn exist</title>
<link>https://ask.clojure.org/index.php/14106/clj-deps-find-versions-prefers-git-deps-both-git-and-mvn-exist?show=14114#a14114</link>
<description>&lt;p&gt;Logged as &lt;a rel=&quot;nofollow&quot; href=&quot;https://clojure.atlassian.net/browse/TDEPS-268&quot;&gt;https://clojure.atlassian.net/browse/TDEPS-268&lt;/a&gt;&lt;/p&gt;
</description>
<category>tools.deps</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14106/clj-deps-find-versions-prefers-git-deps-both-git-and-mvn-exist?show=14114#a14114</guid>
<pubDate>Tue, 17 Sep 2024 02:44:25 +0000</pubDate>
</item>
<item>
<title>Answered: The cljs docstring of `clojure.core.async/promise-chan` does not mention that it returns the value repeatedly</title>
<link>https://ask.clojure.org/index.php/14088/docstring-clojure-promise-mention-returns-value-repeatedly?show=14096#a14096</link>
<description>&lt;p&gt;Thanks, an oversight. Fixed in core-async master now.&lt;/p&gt;
</description>
<category>core.async</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14088/docstring-clojure-promise-mention-returns-value-repeatedly?show=14096#a14096</guid>
<pubDate>Thu, 29 Aug 2024 16:56:15 +0000</pubDate>
</item>
<item>
<title>Answered: tools.reader parse-symbol is too sloppy when reading new n-dimensional class array</title>
<link>https://ask.clojure.org/index.php/14065/tools-reader-parse-symbol-sloppy-reading-dimensional-class?show=14079#a14079</link>
<description>&lt;p&gt;Ticket created &lt;br&gt;
&lt;a rel=&quot;nofollow&quot; href=&quot;https://clojure.atlassian.net/browse/TRDR-74&quot;&gt;https://clojure.atlassian.net/browse/TRDR-74&lt;/a&gt;&lt;/p&gt;
</description>
<category>tools.reader</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14065/tools-reader-parse-symbol-sloppy-reading-dimensional-class?show=14079#a14079</guid>
<pubDate>Thu, 22 Aug 2024 14:42:35 +0000</pubDate>
</item>
<item>
<title>Answered: data.json :date-formatter does not support all the formats Cheshire :date-format does due to using Instant internally</title>
<link>https://ask.clojure.org/index.php/14049/formatter-support-formats-cheshire-format-instant-internally?show=14051#a14051</link>
<description>&lt;p&gt;Answer provided by @cddr on Slack:&lt;/p&gt;
&lt;p&gt;Use &lt;code&gt;.withZone&lt;/code&gt; on the &lt;code&gt;DateTimeFormatter&lt;/code&gt; itself to provide a timezone, and then the original format works just fine with &lt;code&gt;clojure.data.json&lt;/code&gt;:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;{:date-formatter (-&amp;gt; (DateTimeFormatter/ofPattern &quot;MMMM, dd yyyy HH:mm:ss Z&quot;)
                     (DateTimeFormatter/.withZone ZoneOffset/UTC))}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;(or &lt;code&gt;(ZoneId/systemDefault)&lt;/code&gt; or similar).&lt;/p&gt;
&lt;p&gt;This completely solves the problem, without changes to &lt;code&gt;clojure.data.json&lt;/code&gt;.&lt;/p&gt;
</description>
<category>data.json</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14049/formatter-support-formats-cheshire-format-instant-internally?show=14051#a14051</guid>
<pubDate>Sat, 10 Aug 2024 19:44:32 +0000</pubDate>
</item>
<item>
<title>Answered: Allow specifying aliases in coordinates that point to deps.edn projects</title>
<link>https://ask.clojure.org/index.php/7843/allow-specifying-aliases-coordinates-that-point-projects?show=14047#a14047</link>
<description>&lt;p&gt;I just stumbled upon this very same old &lt;code&gt;tools.deps&lt;/code&gt; issue myself with a Polylith workspace recently, when I decided to factor out a few sub-projects into Polylith workspaces of their own. But, since poly has a convention to keep all dev-time dependencies under the &lt;code&gt;:dev&lt;/code&gt; alias, things didn’t click (quite obviously), so I had to duplicate them under the &lt;code&gt;:deps&lt;/code&gt; key.&lt;/p&gt;
&lt;p&gt;I’m now thinking about patching the &lt;code&gt;tools.deps&lt;/code&gt; and using a patched version locally solely for this project.&lt;/p&gt;
</description>
<category>tools.deps</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/7843/allow-specifying-aliases-coordinates-that-point-projects?show=14047#a14047</guid>
<pubDate>Thu, 08 Aug 2024 10:23:08 +0000</pubDate>
</item>
</channel>
</rss>