<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>Clojure Q&amp;A - Recent questions in Other</title>
<link>https://ask.clojure.org/index.php/questions/other</link>
<description></description>
<item>
<title>shasum not found error when using ./posix-install on linux</title>
<link>https://ask.clojure.org/index.php/14987/shasum-not-found-error-when-using-posix-install-on-linux</link>
<description>&lt;p&gt;I was redeploying an AWS beanstalk application. I was installing clojure using the commands from the clojure install guide for posix&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;commands:
  01_install_clojure:
    command: |
      curl -L -O https://github.com/clojure/brew-install/releases/latest/download/posix-install.sh
      chmod +x posix-install.sh
      sudo ./posix-install.sh
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;I believe this used to work, but it now fails with &lt;/p&gt;
&lt;pre&gt;&lt;code&gt;./posix-install.sh: line 30: shasum: command not found
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Using the linux instructions worked just fine. I can provide more info about the linux envorionment, but it was using aws' &quot;Corretto 17 running on 64bit Amazon Linux 2023/4.10.0&quot; platform which is one of the builtin java platforms for beanstalk.&lt;/p&gt;
</description>
<category>Tools</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14987/shasum-not-found-error-when-using-posix-install-on-linux</guid>
<pubDate>Wed, 11 Mar 2026 21:49:11 +0000</pubDate>
</item>
<item>
<title>TDEPS-269: checksums should use sha256sum instead of shasum</title>
<link>https://ask.clojure.org/index.php/14906/tdeps-269-checksums-should-use-sha256sum-instead-of-shasum</link>
<description>&lt;p&gt;This commit broke our Docker build: &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/clojure/brew-install/commit/d6d540756cb0a6342374db529d07f1de35d5bc71&quot;&gt;https://github.com/clojure/brew-install/commit/d6d540756cb0a6342374db529d07f1de35d5bc71&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;because &lt;code&gt;shasum&lt;/code&gt; is a perl executable provided on Fedora by &lt;code&gt;perl-Digest-SHA-1&lt;/code&gt; rpm, but it's not available on the UBI platform. The standard way to validate checksums is through &lt;code&gt;sha256sum&lt;/code&gt; provided by &lt;code&gt;coreutils&lt;/code&gt; on most (if not all) linux distributions.&lt;/p&gt;
&lt;p&gt;The jira ticket even talks about sha256sum, but then the commit doesn't use it: &lt;a rel=&quot;nofollow&quot; href=&quot;https://clojure.atlassian.net/jira/software/c/projects/TDEPS/issues?jql=project%20%3D%20TDEPS%20ORDER%20BY%20created%20DESC&amp;amp;selectedIssue=TDEPS-269&quot;&gt;https://clojure.atlassian.net/jira/software/c/projects/TDEPS/issues?jql=project = TDEPS ORDER BY created DESC&amp;amp;selectedIssue=TDEPS-269&lt;/a&gt;&lt;/p&gt;
</description>
<category>Tools</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14906/tdeps-269-checksums-should-use-sha256sum-instead-of-shasum</guid>
<pubDate>Tue, 27 Jan 2026 11:17:20 +0000</pubDate>
</item>
<item>
<title>I found a broken link in the Guides section of Clojure.org</title>
<link>https://ask.clojure.org/index.php/14689/i-found-a-broken-link-in-the-guides-section-of-clojure-org</link>
<description>&lt;p&gt;Page URL: &lt;a rel=&quot;nofollow&quot; href=&quot;https://clojure.org/guides/repl/enhancing_your_repl_workflow&quot;&gt;https://clojure.org/guides/repl/enhancing_your_repl_workflow&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Broken Link URL: &lt;a rel=&quot;nofollow&quot; href=&quot;https://cambium.consulting/articles/2018/2/8/the-power-of-clojure-debugging&quot;&gt;https://cambium.consulting/articles/2018/2/8/the-power-of-clojure-debugging&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Link text: The Power of Clojure: debugging&lt;/p&gt;
</description>
<category>Other</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14689/i-found-a-broken-link-in-the-guides-section-of-clojure-org</guid>
<pubDate>Sat, 23 Aug 2025 02:13:42 +0000</pubDate>
</item>
<item>
<title>Gotcha: core.match 'No matching clause' when using shadowed local binding</title>
<link>https://ask.clojure.org/index.php/14522/gotcha-match-matching-clause-using-shadowed-local-binding</link>
<description>&lt;p&gt;Here’s a repro:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;  (defn wut [foo m]
    (match m
      [:m foo] :foo))

  (wut 1 [:m 2])
  ;; Execution error (IllegalArgumentException) at user/wut (REPL:560).
  ;; No matching clause: [:m 2]
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The gotcha here is that I am using foo both as an argument and as a local match binding. This works:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;  (defn wut [foo m]
    (match m
      [:m bar] :foo))
  
  (wut 1 [:m 2])
  ;;=&amp;gt; :foo
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;I'm not sure if this is just what it is or if it is a problem that can be handled better by core.match? It def surprised me a lot and took a lot of time to figure out.&lt;/p&gt;
</description>
<category>Libs</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14522/gotcha-match-matching-clause-using-shadowed-local-binding</guid>
<pubDate>Fri, 25 Apr 2025 12:40:12 +0000</pubDate>
</item>
<item>
<title>core.async 1.8 beta1 cached thread pools can grow to hundreds of threads when doing io work</title>
<link>https://ask.clojure.org/index.php/14428/core-async-beta1-cached-thread-pools-hundreds-threads-doing</link>
<description>&lt;p&gt;Hi, I've been testing the new clojure.core.async 1.8.711-beta1, and suspected that since the default fixed thread pool was replaced with a cached thread pool, it could be possible for the system to create a very large number of OS threads, in the order of hundreds or thousands depending on the size of the workload.&lt;/p&gt;
&lt;p&gt;I am wondering if this was intended or if there might be a better middle-ground such as still using a CachedThreadPool but potentially accepting maximum sizes for each pool type via sys props, with reasonable defaults.&lt;/p&gt;
&lt;p&gt;Example code below:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;(ns user)

(require '[clojure.core.async :as a]
         '[clojure.core.async.impl.dispatch :as d])

(defn do-work
  &quot;Simulate some async work which &quot;
  [task-count task-timeout]
  (a/go-loop [c (a/merge
                 (doall
                  (for [i (range task-count)]
                    (a/go
                      ;;; this simulates non-blocking park insdie the go-block
                      (a/&amp;lt;! (a/timeout
                             (rand-int task-timeout)))
                      ;;; this simulates blocking IO inside an io-thread
                      (a/&amp;lt;! (a/io-thread
                             (Thread/sleep
                              ^int (rand-int task-timeout))))
                      i))))]
    (let [v (a/&amp;lt;! c)]
      (if (nil? v)
        {:pool-size (.getPoolSize ^java.util.concurrent.ThreadPoolExecutor (d/executor-for :core-async-dispatch))}
        (recur c)))))

(def active
  (atom false))

(defn run-sim
  []
  (reset! active true)
  (a/go-loop [iter 1]
    (let [start (System/currentTimeMillis)
          {:keys [pool-size]} (a/&amp;lt;! (do-work
                                     2000  ;;; simulated number of tasks
                                     100)) ;;; simulated max delay in ms
          stop (System/currentTimeMillis)
          elapsed (- stop start)]
      (println &quot;Iteration:&quot; iter &quot;Pool Size:&quot; pool-size &quot;Elapsed:&quot; elapsed)
      (when (and @active
                 (&amp;lt; iter 10))
        (recur (inc iter))))))

(defn stop-sim
  []
  (reset! active false))

(comment
  (run-sim)   ;;; run the sim
  (stop-sim)) ;;; stop the sim
&lt;/code&gt;&lt;/pre&gt;
</description>
<category>Libs</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14428/core-async-beta1-cached-thread-pools-hundreds-threads-doing</guid>
<pubDate>Wed, 26 Feb 2025 18:54:58 +0000</pubDate>
</item>
<item>
<title>Why clojuredocs is down?</title>
<link>https://ask.clojure.org/index.php/14323/why-clojuredocs-is-down</link>
<description>&lt;p&gt;For two days I am trying to enter &lt;a rel=&quot;nofollow&quot; href=&quot;https://clojuredocs.org/&quot;&gt;https://clojuredocs.org/&lt;/a&gt; from different browsers on different devices, always getting error 502 (bad gateway). Did &lt;code&gt;clojuredocs&lt;/code&gt; migrate somewhere?&lt;/p&gt;
</description>
<category>Other</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14323/why-clojuredocs-is-down</guid>
<pubDate>Wed, 01 Jan 2025 14:52:55 +0000</pubDate>
</item>
<item>
<title>What is the best place to start learning Clojure?</title>
<link>https://ask.clojure.org/index.php/14210/what-is-the-best-place-to-start-learning-clojure</link>
<description>&lt;p&gt;I want to learn Clojure, but I don't know where to start. Where should I?&lt;/p&gt;
</description>
<category>Other</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14210/what-is-the-best-place-to-start-learning-clojure</guid>
<pubDate>Sun, 27 Oct 2024 16:40:22 +0000</pubDate>
</item>
<item>
<title>Guidance on Licensing and Attribution for Ported Clojure Code</title>
<link>https://ask.clojure.org/index.php/14130/guidance-licensing-and-attribution-for-ported-clojure-code</link>
<description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://basilisp.readthedocs.io/en/latest/&quot;&gt;Basilisp&lt;/a&gt; is a  broadly compatible Clojure implementation that runs on the Python VM.&lt;/p&gt;
&lt;p&gt;I have ported the full source code of &lt;code&gt;clojure.pprint&lt;/code&gt; to Basilisp as a standalone external library, while a native implementation is being developed. &lt;/p&gt;
&lt;p&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/ikappaki/basilisp-pprint&quot;&gt;https://github.com/ikappaki/basilisp-pprint&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;In the README.md file, I have included the original copyright notice and the attribution to the authors (Rich and Tom Faulhaber), along to the exact GitHub link to the original Clojure source code that this port was based on. The license is EPL 1.0.&lt;/p&gt;
&lt;p&gt;Could you please advise if there's anything more I need to consider regarding licencing and attribution, assuming I am free to copy the code under these condition in the open source spirit?&lt;/p&gt;
&lt;p&gt;Thank you&lt;/p&gt;
</description>
<category>Libs</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14130/guidance-licensing-and-attribution-for-ported-clojure-code</guid>
<pubDate>Mon, 23 Sep 2024 19:53:01 +0000</pubDate>
</item>
<item>
<title>Using the state instantiated by integrant init-key</title>
<link>https://ask.clojure.org/index.php/13447/using-the-state-instantiated-by-integrant-init-key</link>
<description>&lt;p&gt;hi folks, I am trying out Integrant library for state management. It's quite intuitive when it comes to managing (starting/halting) servers but I am confused regarding a certain use case. &lt;/p&gt;
&lt;p&gt;I want to use integrant to instantiate and destroy an object. As usual I defined defmethods &lt;code&gt;init-key&lt;/code&gt;  and &lt;code&gt;halt-key!&lt;/code&gt; . The problem is that I want a reference to the initialised object from init-key . Is there an idiomatic way to do this? Should I just have it available in an atom  during init-key ?&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;(defmethod ig/init-key :my-space/my-key [_ opts]
  (let [account-id (:account-id opts)
        license-key (:license-key opts)]
    (MyObject. account-id license-key)))

;;How do I use the instantiated my object?
&lt;/code&gt;&lt;/pre&gt;
</description>
<category>Libs</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/13447/using-the-state-instantiated-by-integrant-init-key</guid>
<pubDate>Fri, 10 Nov 2023 07:09:07 +0000</pubDate>
</item>
<item>
<title>I have created a new language based on Clojure and wondered if someone would like to take a look.</title>
<link>https://ask.clojure.org/index.php/13268/created-language-based-clojure-wondered-someone-would-look</link>
<description>&lt;p&gt;I authored a Lisp/Clojure variant to simplify syntax, add typing-safety, add generics, add full native language support, integrate test/documentation, and enable cross-platform compilation from a single execuatble. It can currently compile to Js, Java, and C++. Anything of interest to the Clojure community?&lt;/p&gt;
&lt;p&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/Vyridian/vxlisp&quot;&gt;https://github.com/Vyridian/vxlisp&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Sample:&lt;/p&gt;
&lt;p&gt; (func foo : int               // function foo() returns integer&lt;br&gt;
 [arg1 : int                  // arg1
  arg2 : int]                 // arg2&lt;br&gt;
 (+ arg1 arg2)                // arg1 + arg2&lt;br&gt;
 :test (test 3 (foo 1 2))     // A Test case {expect: 3, actual: {foo 1 2}}&lt;br&gt;
 :doc  &quot;Foo function returns an integer after adding arg1 and arg2&quot;)&lt;/p&gt;
</description>
<category>Libs</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/13268/created-language-based-clojure-wondered-someone-would-look</guid>
<pubDate>Wed, 06 Sep 2023 19:57:05 +0000</pubDate>
</item>
<item>
<title>first build fails on ubuntu due to repo1.maven.org/maven2 timing out for orr.clojure artifact</title>
<link>https://ask.clojure.org/index.php/12753/first-build-fails-ubuntu-repo1-maven2-timing-clojure-artifact</link>
<description>&lt;p&gt;clj command fails to build classpath on new installation!!!&lt;/p&gt;
&lt;p&gt;Running a new installation of POP os, which is a late ubuntu derivative. I've run into this issue on my m1 mac as well. However, after removing the .m2 homedir the problem was solved. But on linux the issue persists.&lt;/p&gt;
&lt;p&gt;using adopt temurin 17 jdk + jre&lt;/p&gt;
&lt;p&gt;clj version: 1.11.1&lt;/p&gt;
&lt;p&gt;all install steps followed from the docs were successful without issues. until you run clj or clojure from cli. The following trace is produced:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;Error building classpath. Failed to read artifact descriptor for org.clojure:clojure:jar:1.11.1
org.eclipse.aether.resolution.ArtifactDescriptorException: Failed to read artifact descriptor for org.clojure:clojure:jar:1.11.1
	at org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.loadPom(DefaultArtifactDescriptorReader.java:255)
	at org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.readArtifactDescriptor(DefaultArtifactDescriptorReader.java:171)
	at org.eclipse.aether.internal.impl.DefaultRepositorySystem.readArtifactDescriptor(DefaultRepositorySystem.java:263)
	at clojure.tools.deps.extensions.maven$read_descriptor.invokeStatic(maven.clj:115)
	at clojure.tools.deps.extensions.maven$fn__1155.invokeStatic(maven.clj:143)
	at clojure.tools.deps.extensions.maven$fn__1155.invoke(maven.clj:143)
	at clojure.lang.MultiFn.invoke(MultiFn.java:244)
	at clojure.tools.deps$expand_deps$children_task__773$fn__775$fn__776.invoke(deps.clj:405)
	at clojure.tools.deps.util.concurrent$submit_task$task__481.invoke(concurrent.clj:35)
	at clojure.lang.AFn.call(AFn.java:18)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
	at java.base/java.lang.Thread.run(Thread.java:833)
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;the lead error causing the above trace is the following:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;Caused by: org.apache.http.conn.ConnectTimeoutException: Connect to repo1.maven.org:443 [repo1.maven.org/151.101.60.209] failed: Connect timed out
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Running clj  -Sforce after removing the .m2 dependencies yields the same result. Checking with other tools it seems that &lt;code&gt;https://repo1.maven.org/maven2&lt;/code&gt; is not reachable. I can't confirm if it is unreachable for others outside of my location. However the fact that removing and force-reinstalling deps on my mac worked tells me that something can be done to reoslve the issue. just not sure what.&lt;/p&gt;
&lt;p&gt;Any help appreciated.&lt;/p&gt;
</description>
<category>Other</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/12753/first-build-fails-ubuntu-repo1-maven2-timing-clojure-artifact</guid>
<pubDate>Sun, 12 Mar 2023 08:48:39 +0000</pubDate>
</item>
<item>
<title>[deps] All pulling from http maven repos</title>
<link>https://ask.clojure.org/index.php/12698/deps-all-pulling-from-http-maven-repos</link>
<description>&lt;p&gt;Follow up to the following slack:&lt;br&gt;
&lt;a rel=&quot;nofollow&quot; href=&quot;https://clojurians.slack.com/archives/C6QH853H8/p1677508334883579&quot;&gt;https://clojurians.slack.com/archives/C6QH853H8/p1677508334883579&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Maven has disallowed pulling from http repos, however it would be nice to be able to override this &lt;a rel=&quot;nofollow&quot; href=&quot;https://maven.apache.org/docs/3.8.1/release-notes.html#cve-2021-26291&quot;&gt;https://maven.apache.org/docs/3.8.1/release-notes.html#cve-2021-26291&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;thanks&lt;/p&gt;
</description>
<category>Libs</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/12698/deps-all-pulling-from-http-maven-repos</guid>
<pubDate>Tue, 28 Feb 2023 01:36:28 +0000</pubDate>
</item>
<item>
<title>core.async: Add a function to set thread executor</title>
<link>https://ask.clojure.org/index.php/12692/core-async-add-a-function-to-set-thread-executor</link>
<description>&lt;p&gt;See slack #babashka discussion &lt;a rel=&quot;nofollow&quot; href=&quot;https://clojurians.slack.com/archives/CLX41ASCS/p1677319666536479&quot;&gt;https://clojurians.slack.com/archives/CLX41ASCS/p1677319666536479&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The use case is setting a virtual thread pool executor with SCI.&lt;br&gt;
In Clojure I could set &lt;code&gt;clojure.core.async.impl.exec.threadpool/thread-pool-executor&lt;/code&gt;. &lt;/p&gt;
&lt;p&gt;Doing the intern in SCI will not have the desired effect since the pre-compiled functions don't see the change. &lt;/p&gt;
&lt;p&gt;Clojure.core agents also allow this via &lt;code&gt;set-agent-send-executor!&lt;/code&gt; etc. &lt;/p&gt;
</description>
<category>Libs</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/12692/core-async-add-a-function-to-set-thread-executor</guid>
<pubDate>Sat, 25 Feb 2023 11:21:02 +0000</pubDate>
</item>
<item>
<title>Can ASYNC-248 be reverted?</title>
<link>https://ask.clojure.org/index.php/12690/can-async-248-be-reverted</link>
<description>&lt;p&gt;After ASYNC-248 was applied I've seen other people on slack run into issues.&lt;/p&gt;
&lt;p&gt;Today I went to do some repl stuff using one of our production build artifacts and got this at the repl:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;Clojure 1.11.1
user=&amp;gt; (require 'clojure.core.async)
nil
user=&amp;gt; (require 'clojure.core.async.impl.ioc-macros)
Execution error (NoSuchFieldError) at clojure.tools.analyzer.jvm.utils__init/load (REPL:259).
__thunk__0__
user=&amp;gt; (clojure.core.async/go 1)
Syntax error macroexpanding clojure.core.async/go at (REPL:1:1).
Attempting to call unbound fn: #'clojure.core.async.impl.ioc-macros/state-machine
user=&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;ASYNC-248 just seems to be broken&lt;/p&gt;
</description>
<category>Libs</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/12690/can-async-248-be-reverted</guid>
<pubDate>Thu, 23 Feb 2023 17:52:46 +0000</pubDate>
</item>
<item>
<title>Set GITLIBS in deps.edn</title>
<link>https://ask.clojure.org/index.php/12414/set-gitlibs-in-deps-edn</link>
<description>&lt;p&gt;Currently, git libs are cloned to &lt;code&gt;~/.gitlibs&lt;/code&gt; by default, and this can be changed with the environment variable &lt;code&gt;GITLIBS&lt;/code&gt;. (&lt;a rel=&quot;nofollow&quot; href=&quot;https://clojure.org/reference/deps_and_cli#_configuration_and_debugging&quot;&gt;See docs&lt;/a&gt;)&lt;/p&gt;
&lt;p&gt;It would be helpful if I could set that location via an entry in the repo's deps.edn file, akin to &lt;code&gt;:mvn/local-repo&lt;/code&gt;:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;{:mvn/local-repo &quot;local-m2&quot; :gitlibs &quot;gitlibs&quot; :deps {...}}}&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;If this could be done, I would also appreciate it being available within an alias. This probably would require implementing the same for &lt;code&gt;:mvn/local-rep&lt;/code&gt; first (&lt;a rel=&quot;nofollow&quot; href=&quot;https://ask.clojure.org/index.php/11711/set-mvn-local-repo-via-alias&quot;&gt;see relevant Ask&lt;/a&gt;).&lt;/p&gt;
</description>
<category>Tools</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/12414/set-gitlibs-in-deps-edn</guid>
<pubDate>Wed, 30 Nov 2022 15:44:50 +0000</pubDate>
</item>
<item>
<title>Datomic Pro on-prem fails on M1 Mac</title>
<link>https://ask.clojure.org/index.php/12392/datomic-pro-on-prem-fails-on-m1-mac</link>
<description>&lt;p&gt;Has anyone gotten Datomic Pro on-prem to work on an M1 Mac?&lt;/p&gt;
</description>
<category>Tools</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/12392/datomic-pro-on-prem-fails-on-m1-mac</guid>
<pubDate>Sun, 20 Nov 2022 21:56:41 +0000</pubDate>
</item>
<item>
<title>Support `:mvn/repos` inside an alias</title>
<link>https://ask.clojure.org/index.php/12367/support-mvn-repos-inside-an-alias</link>
<description>&lt;p&gt;This is similar to &lt;a rel=&quot;nofollow&quot; href=&quot;https://ask.clojure.org/index.php/11711/set-mvn-local-repo-via-alias&quot;&gt;https://ask.clojure.org/index.php/11711/set-mvn-local-repo-via-alias&lt;/a&gt;, sorry if I should have just added a note there instead of opening another question.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;:mvn/repos&lt;/code&gt; does not seem to work inside of an alias either -- only at the top level of &lt;code&gt;deps.edn&lt;/code&gt;. If this is intentional, it would be a nicer experience if CLI logged some sort of &quot;&lt;code&gt;:mvn/repos&lt;/code&gt; is not supported inside of aliases&quot; warning on launch.&lt;/p&gt;
</description>
<category>Tools</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/12367/support-mvn-repos-inside-an-alias</guid>
<pubDate>Tue, 08 Nov 2022 19:08:24 +0000</pubDate>
</item>
<item>
<title>Recommended metrics library</title>
<link>https://ask.clojure.org/index.php/12020/recommended-metrics-library</link>
<description>&lt;p&gt;What metrics library are people using with Clojure?&lt;/p&gt;
&lt;p&gt;A quick Google search returned &lt;a rel=&quot;nofollow&quot; href=&quot;https://metrics.dropwizard.io/&quot;&gt;metrics&lt;/a&gt;  and &lt;a rel=&quot;nofollow&quot; href=&quot;https://micrometer.io/&quot;&gt;micrometer&lt;/a&gt; for Java/the JVM.&lt;/p&gt;
&lt;p&gt;Anybody using these and can recommend them, or something else?&lt;/p&gt;
</description>
<category>Libs</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/12020/recommended-metrics-library</guid>
<pubDate>Mon, 27 Jun 2022 10:09:17 +0000</pubDate>
</item>
<item>
<title>Calva project type: shadow-cljs vs deps.edn + shadow-cljs?</title>
<link>https://ask.clojure.org/index.php/11901/calva-project-type-shadow-cljs-vs-deps-edn-shadow-cljs</link>
<description>&lt;p&gt;Hi everyone, I’ve gone through the shadow-cljs quickstart guide in the GitHub repo README and got the desired message in the browser console. Next, I wanted to introduce &lt;code&gt;deps.edn&lt;/code&gt; to the project. I had some (self-inflicted) difficulty in jacking in after adding  &lt;code&gt;deps.edn&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;System details:&lt;br&gt;
OS: WSL2&lt;br&gt;
Java version: OpenJDK 11.0.15&lt;br&gt;
Clojure CLI version: 1.11.1.1113&lt;/p&gt;
&lt;p&gt;With only &lt;code&gt;shadow-cljs.edn&lt;/code&gt; in the project, said file contents are:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;;; shadow-cljs.edn
{:source-paths [&quot;src/dev&quot;
                &quot;src/main&quot;
                &quot;src/test&quot;]
 :dependencies []
 
 :dev-http {8080 &quot;public&quot;}
 :builds {:frontend {:target :browser
                     :modules {:main {:init-fn acme.frontend.app/init}}}}}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;At this point, jacking in with Calva using the “shadow-cljs” project type, which both starts and connects to the “:frontend” build, works like a charm. &lt;/p&gt;
&lt;p&gt;As mentioned in the first paragraph, I had difficulty with introducing &lt;code&gt;deps.edn&lt;/code&gt; to the project.&lt;/p&gt;
&lt;p&gt;Add &lt;code&gt;deps.edn&lt;/code&gt; to the main project directory with the following contents:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;;; deps.edn
{:paths [&quot;src/main&quot;
&quot;src/dev&quot;
&quot;src/test&quot;]

 :aliases
 {:cljs {:extra-deps {thheller/shadow-cljs {:mvn/version &quot;2.19.0&quot;}}}}}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Change &lt;code&gt;shadow-cljs.edn&lt;/code&gt; to:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt; ;; shadow-cljs.edn
    
 {:deps {:aliases [:cljs]}
        
:dev-http {8080 &quot;public&quot;}
        
:builds {:frontend {:target :browser
:modules {:main {:init-fn acme.frontend.app/init}}}}}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Jacking in with Calva using the “deps.edn + shadow-cljs” project type at this point leads to an error containing “Failed starting cljs repl for build: :frontend. Is the build running and connected?” &lt;/p&gt;
&lt;p&gt;The Calva Connection Log also provides information, including: “shadow-cljs has not been started yet!” and “If you have a shadow-cljs server or watch running then you are not connected to that process.”&lt;/p&gt;
&lt;p&gt;The build doesn’t seem to have been started. What if we run &lt;code&gt;npx shadow-cljs watch frontend&lt;/code&gt; and then tried connecting to the REPL? Same error messages as before.&lt;/p&gt;
&lt;p&gt;It turns out I should’ve instead kept using the “shadow-cljs” project type (in which case the addition of &lt;code&gt;deps.edn&lt;/code&gt; goes down without a hitch).&lt;/p&gt;
&lt;p&gt;This leads me to wonder:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;When to use which project type?  &lt;/li&gt;
&lt;li&gt;Which is preferred for a fullstack&lt;br&gt;
project?&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Thanks to Peter and contributors for Calva!&lt;/p&gt;
</description>
<category>Tools</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/11901/calva-project-type-shadow-cljs-vs-deps-edn-shadow-cljs</guid>
<pubDate>Sat, 21 May 2022 19:46:14 +0000</pubDate>
</item>
<item>
<title>How can we make it easier for beginners to install Clojure?</title>
<link>https://ask.clojure.org/index.php/11767/how-can-we-make-it-easier-for-beginners-to-install-clojure</link>
<description>&lt;p&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://clojure.org/guides/getting_started&quot;&gt;The official Getting Started guide&lt;/a&gt; shows how to install Clojure and its dependencies for macOS, Linux, and Windows, using command-line tools.&lt;/p&gt;
&lt;p&gt;Those procedures work well for experienced programmers who are comfortable figuring things out. However, when it comes to lowering the barrier to entry for beginners, this is less than ideal and leads to a poor first impression.&lt;/p&gt;
&lt;p&gt;I use the guide mentioned above in my &quot;Getting Started with Clojure&quot; workshops, geared towards beginners with little to no prior experience with Clojure or programming in general. And I see first-hand how people struggle to get Clojure installed and working correctly on their system, especially Windows users.&lt;/p&gt;
&lt;p&gt;Allowing users to install Clojure and all dependencies in a single step would make it easier for people to install Clojure and dramatically improve the user experience for newbies, which is essential for increased exposure and adoption.&lt;/p&gt;
&lt;p&gt;To that end, I want to propose official &quot;download and double-click installers&quot; for all operating systems. For inspiration, check out the installers offered by other languages like &lt;a rel=&quot;nofollow&quot; href=&quot;https://www.python.org/downloads/&quot;&gt;Python&lt;/a&gt; or &lt;a rel=&quot;nofollow&quot; href=&quot;https://go.dev/doc/install&quot;&gt;Go&lt;/a&gt;. &quot;Just download this installer and run it. That's it.&quot;&lt;/p&gt;
&lt;p&gt;Also, Scala has &lt;a rel=&quot;nofollow&quot; href=&quot;https://www.scala-lang.org/download/&quot;&gt;an excellent landing page&lt;/a&gt; with two options to guide beginners and advanced users to different installation guides. Beginners are encouraged to try Scala in the browser without installing anything on their computer. For Clojure, we could guide beginners to something like &lt;a rel=&quot;nofollow&quot; href=&quot;https://calva.io/get-started-with-clojure/&quot;&gt;Calva&lt;/a&gt; or &lt;a rel=&quot;nofollow&quot; href=&quot;https://www.maria.cloud&quot;&gt;Maria&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;In summary: We could draw inspiration from other programming language ecosystems to create a smoother installation experience for beginners. After discovery, the newbie experience begins with the installation process.&lt;/p&gt;
&lt;p&gt;Note that there is &lt;a rel=&quot;nofollow&quot; href=&quot;https://clojurians.slack.com/archives/C0353589RFC/p1649837679043339&quot;&gt;a relevant discussion ongoing in the Clojurians Slack&lt;/a&gt;.&lt;/p&gt;
</description>
<category>Tools</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/11767/how-can-we-make-it-easier-for-beginners-to-install-clojure</guid>
<pubDate>Wed, 13 Apr 2022 08:09:09 +0000</pubDate>
</item>
<item>
<title>How can I return data from clojure.tools.cli.api/tree?</title>
<link>https://ask.clojure.org/index.php/11738/how-can-i-return-data-from-clojure-tools-cli-api-tree</link>
<description>&lt;p&gt;clojure.tools.cli.api/tree prints hierarchical dependency data in either a &quot;human friendly tree&quot; (&lt;code&gt;:format :print&lt;/code&gt;, the default) or pretty-printing edn (&lt;code&gt;:format :edn&lt;/code&gt;) data&lt;/p&gt;
&lt;p&gt;To get the result as data, you can use &lt;code&gt;with-out-str&lt;/code&gt; and &lt;code&gt;edn/read-string&lt;/code&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;(-&amp;gt; (deps/tree {:project deps-map, 
                :format :edn})
      (with-out-str)
      (edn/read-string))
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Works a treat. That said, the round-tripping from pprint within cli/tree and re-parsing makes me suspect I’m doing it wrong. It'd be nice to be able to get the edn back directly as data.&lt;/p&gt;
</description>
<category>Tools</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/11738/how-can-i-return-data-from-clojure-tools-cli-api-tree</guid>
<pubDate>Wed, 06 Apr 2022 12:15:21 +0000</pubDate>
</item>
<item>
<title>Set mvn/local-repo via alias</title>
<link>https://ask.clojure.org/index.php/11711/set-mvn-local-repo-via-alias</link>
<description>&lt;p&gt;Having to set local repos a top level attribute or via the command line results in pretty messy CI scripts where every call to &lt;code&gt;clojure&lt;/code&gt; needs the added options of &lt;code&gt;-Sdeps '{:mvn/local-repo &quot;...&quot;}'&lt;/code&gt;.&lt;br&gt;
This is both noisy and fragile. Moreover, with most CI systems being configured in yml, this can result in a mess of quotes.&lt;br&gt;
It would be preferable to have a &lt;code&gt;:ci&lt;/code&gt; alias where &lt;code&gt;mvn/local-rep&lt;/code&gt; and GITLIBS could be overwritten.&lt;/p&gt;
&lt;p&gt;Thanks&lt;br&gt;
Ben&lt;/p&gt;
</description>
<category>Tools</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/11711/set-mvn-local-repo-via-alias</guid>
<pubDate>Thu, 31 Mar 2022 10:11:22 +0000</pubDate>
</item>
<item>
<title>All kinds of problems trying to run my first Clojure program</title>
<link>https://ask.clojure.org/index.php/11640/all-kinds-of-problems-trying-to-run-my-first-clojure-program</link>
<description>&lt;p&gt;Trying to run my first Clojure program while following &lt;a rel=&quot;nofollow&quot; href=&quot;https://www.braveclojure.com/basic-emacs/&quot;&gt;this guide&lt;/a&gt; and I'm running into problems.&lt;/p&gt;
&lt;p&gt;Here's my basic code:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;(ns clojure-noob.core
  (:gen-class))

(defn -main
  &quot;I don't do a whole lot...yet.&quot;
  [&amp;amp; args]
(println &quot;Hello, World!&quot;))

(defn train
  []
  (println &quot;Choo choo!&quot;)) 
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;And here's what I get after switching namespaces:&lt;/p&gt;
&lt;p&gt;   clojure-noob.core&amp;gt; (train)&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;Syntax error compiling at (*cider-repl Clojure/Projects:localhost:49632(clj)*:46:20).
Unable to resolve symbol: train in this context
clojure-noob.core&amp;gt; (-main)
Syntax error compiling at (*cider-repl Clojure/Projects:localhost:49632(clj)*:49:20).
Unable to resolve symbol: -main in this context
clojure-noob.core&amp;gt; 
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;What step am I missing?&lt;/p&gt;
&lt;p&gt;And why is the learning curve so steep?&lt;/p&gt;
</description>
<category>Tools</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/11640/all-kinds-of-problems-trying-to-run-my-first-clojure-program</guid>
<pubDate>Thu, 17 Mar 2022 22:18:15 +0000</pubDate>
</item>
<item>
<title>EMacs standard configuration error</title>
<link>https://ask.clojure.org/index.php/11621/emacs-standard-configuration-error</link>
<description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;I'm very new to all of this...&lt;/p&gt;
&lt;p&gt;I encountered this error setting up Emacs with the standard configuration:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;Warning (evil-collection): `evil-want-keybinding' was set to nil but not before loading evil.

Make sure to set `evil-want-keybinding' to nil before loading evil or evil-collection.

See https://github.com/emacs-evil/evil-collection/issues/60 for more details.
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;I went to the URL, but can't understand what they're discussing.&lt;/p&gt;
&lt;p&gt;How do I fix this?&lt;/p&gt;
&lt;p&gt;And what's the ideal setup to get up and running on building solutions in Clojure on a Mac?&lt;/p&gt;
</description>
<category>Tools</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/11621/emacs-standard-configuration-error</guid>
<pubDate>Mon, 14 Mar 2022 14:48:00 +0000</pubDate>
</item>
<item>
<title>Allow configuring behavior for -X when it's invoked as entry point</title>
<link>https://ask.clojure.org/index.php/11598/allow-configuring-behavior-for-when-its-invoked-entry-point</link>
<description>&lt;h2&gt;Problem&lt;/h2&gt;
&lt;p&gt;It is useful to add custom behavior for program entry points. Examples of such behavior:&lt;br&gt;
- calling &lt;code&gt;(shutdown-agents)&lt;/code&gt; to ensure graceful shutdown;&lt;br&gt;
- calling &lt;code&gt;(Platform/exit)&lt;/code&gt; for JavaFX applications to ensure graceful shutdown;&lt;br&gt;
- rebinding &lt;code&gt;System/out&lt;/code&gt; and &lt;code&gt;System/err&lt;/code&gt; in test runners to collect &lt;em&gt;all&lt;/em&gt; output.&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;-main&lt;/code&gt; function for &lt;code&gt;-M&lt;/code&gt;-style entry points is a natural place to put these behaviors.&lt;/p&gt;
&lt;p&gt;One property of these behaviors is that they might be very useful for entry points, but they affect JVM in such a way that these programs might be impossible to integrate into longer-running programs.&lt;/p&gt;
&lt;p&gt;The situation with &lt;code&gt;-X&lt;/code&gt;-invokable functions is where this property is problematic because these are supposed to be invokable both as an entry point and as a part of a longer-running program called by the user of the dependency, but there is no way to tell those apart from inside the function.&lt;/p&gt;
&lt;h2&gt;Considered solutions&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;Do nothing. Library authors can add optional arguments to their &lt;code&gt;-X&lt;/code&gt;-invokable functions that disable special entry-point behavior, although this might be annoying to users if their programs break in unexpected ways when invoked from user code. Library authors can add optional args to enable special entry-point behavior instead of disabling it, but it makes the library more inconvenient to use at the command line. Library authors can create separate &lt;code&gt;-X&lt;/code&gt;-invokable functions for use at the command line and at the user code, but it decreases the usefulness of the whole idea of having the same API in code and at the CLI with &lt;code&gt;-X&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;-X&lt;/code&gt;-style invocations can be given an extra argument by clj-exec that hints that it is invoked as an entry point, e.g. &lt;code&gt;clj -X clojure.core/prn :a 1&lt;/code&gt; will print &lt;code&gt;{:entry-point true :a 1}&lt;/code&gt;. I think this is behavior is unexpected and might be confusing or even annoying.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;-X&lt;/code&gt;-invokable vars can define metadata that will be added to the arg when invoked as an entry point, e.g.:&lt;br&gt;
&lt;code&gt;(defn ^{:default-clj-exec-argmap {:rebind-system-err true}} do-stuff [argmap] ...)&lt;/code&gt;&lt;br&gt;
Then, running &lt;code&gt;clj -X my.ns/do-stuff :other :args&lt;/code&gt; will use &lt;code&gt;{:rebind-system-err true}&lt;/code&gt; as a default argmap that will then be merged with other args.&lt;/li&gt;
&lt;/ol&gt;
</description>
<category>Tools</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/11598/allow-configuring-behavior-for-when-its-invoked-entry-point</guid>
<pubDate>Mon, 21 Feb 2022 19:51:06 +0000</pubDate>
</item>
<item>
<title>Twitter community</title>
<link>https://ask.clojure.org/index.php/11597/twitter-community</link>
<description>&lt;p&gt;Recently Twitter released the feature of creating a community for my profile, I took the liberty of creating one in the name of Clojure&lt;/p&gt;
&lt;p&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://twitter.com/i/communities/1494013093059432451&quot;&gt;https://twitter.com/i/communities/1494013093059432451&lt;/a&gt;&lt;/p&gt;
</description>
<category>Other</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/11597/twitter-community</guid>
<pubDate>Sun, 20 Feb 2022 17:13:00 +0000</pubDate>
</item>
<item>
<title>Support --help for tools / use &quot;standard&quot; cli options for clojure tooling</title>
<link>https://ask.clojure.org/index.php/11590/support-help-for-tools-use-standard-options-clojure-tooling</link>
<description>&lt;p&gt;Hello, &lt;/p&gt;
&lt;p&gt;Is there a way to get help for a tool other than knowing in advance what it does?&lt;br&gt;
Can we have a standardized --help option ?&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Context:&lt;/strong&gt; &lt;/p&gt;
&lt;p&gt;&lt;em&gt;I found out about clj -Ttools list command in an announcement. &lt;br&gt;
Is there a way to see what other things are available besides &quot;list&quot; operations ?&lt;br&gt;
Is there a way to print docs for those ?&lt;br&gt;
Most CLI tools offer a --help or a man page.&lt;br&gt;
I tried some of the things I know from usual OS commands: &lt;br&gt;
clj -Ttools &lt;br&gt;
No function found on command line or in :exec-fn&lt;br&gt;
clj -Ttools help&lt;br&gt;
Function not found: clojure.tools.tools.api/help&lt;br&gt;
clj -Ttools --help&lt;br&gt;
Function not found: clojure.tools.tools.api/--help&lt;br&gt;
This works but for clj, not for the tools.&lt;br&gt;
clj --help&lt;/em&gt; &lt;/p&gt;
&lt;p&gt;I would argue that clojure should adopt a more familiar CLI interface so people comming into clojure can find their way around. &lt;/p&gt;
&lt;p&gt;Of course more advance clojure users could argue that things are good enough as they are - but I don't think there is any standardization on this front. &lt;br&gt;
This leads to having to remember syntax for lots of tools.  &lt;/p&gt;
&lt;p&gt;I think having a standardized help would improve this a lot: &lt;br&gt;
There are some guides online - first search brought me this &lt;a rel=&quot;nofollow&quot; href=&quot;https://clig.dev/#help&quot;&gt;https://clig.dev/#help&lt;/a&gt;  . &lt;br&gt;
I'm sure there are others. &lt;/p&gt;
&lt;p&gt;Original discussion on Cojurians slack &lt;/p&gt;
&lt;p&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://clojurians.slack.com/archives/C06MAR553/p1635321226061200?thread_ts=1635283780.057200&amp;amp;cid=C06MAR553&quot;&gt;https://clojurians.slack.com/archives/C06MAR553/p1635321226061200?thread_ts=1635283780.057200&amp;amp;cid=C06MAR553&lt;/a&gt; . &lt;/p&gt;
</description>
<category>Tools</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/11590/support-help-for-tools-use-standard-options-clojure-tooling</guid>
<pubDate>Fri, 18 Feb 2022 07:53:03 +0000</pubDate>
</item>
<item>
<title>Convention for bypassing EDN parsing in -X usage to reduce using quotes in arguments passed from shell</title>
<link>https://ask.clojure.org/index.php/11585/convention-bypassing-parsing-reduce-quotes-arguments-passed</link>
<description>&lt;p&gt;Sometimes quoting strings or shell invocations can be a bit verbose or clumsy in the shell when passing arguments to exec functions (-X) because those arguments have to be quoted with an extra layer since they are parsed as EDN.&lt;/p&gt;
&lt;p&gt;This example was recently posted in Slack:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;clojure -X:bench :json &quot;$(my_json_producing_cmd --blah)&quot;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;and it turned out nearly impossible to pass the JSON as an argument.&lt;/p&gt;
&lt;p&gt;Having a way to bypass EDN parsing for such arguments could alleviate that problem.&lt;/p&gt;
&lt;p&gt;One possible convention could be to use a leading character which would otherwise be invalid in EDN, such as the / sign:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;clojure -X:bench :json /&quot;$(my_json_producing_cmd --blah)&quot;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Alternative approaches:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Use metadata on the function to opt out of processing: that would change the parsing behavior at the implementation side, e.g.:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;  (defn foo
    {:tools.deps/exec-skip-edn-read #{:a}} 
    [{:keys [a b c]}]
      ...) 
&lt;/code&gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Add something to deps.edn config in :exec-args: that would only change the behavior for consumers&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Extra things to consider:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The convention should play well with both bash, cmd.exe and Powershell and not mean anything special in the syntax of those shells. I tried / in these shells and this does not seem to interfere.  &lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;After experimentation I found that / might work better than @ since @ has a special meaning in powershell:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;bb -e &quot;*command-line-args*&quot; /foo @bar
(&quot;/foo&quot;)
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Also @ often means: slurp contents from file and inline that content as arg.&lt;/p&gt;
</description>
<category>Tools</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/11585/convention-bypassing-parsing-reduce-quotes-arguments-passed</guid>
<pubDate>Wed, 16 Feb 2022 14:45:15 +0000</pubDate>
</item>
<item>
<title>tools.build/javac does not handle modules-info</title>
<link>https://ask.clojure.org/index.php/11428/tools-build-javac-does-not-handle-modules-info</link>
<description>&lt;p&gt;Attempting to compile a modular Java project will fail, reporting that it cannot not find the required modules.&lt;/p&gt;
&lt;p&gt;I fixed it by adding the module paths manually in &lt;code&gt;:javac-opts&lt;/code&gt;. Could tools.build handle this? Either by adding all the modules to the module path, or ignoring module-info.java and module-info.class. &lt;code&gt;tools.build/javac&lt;/code&gt; will also fail if there is a module-info.class in the classes directory and &lt;code&gt;tools.build/javac&lt;/code&gt; does not find the modules.&lt;/p&gt;
&lt;p&gt;Thank you.&lt;/p&gt;
</description>
<category>Tools</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/11428/tools-build-javac-does-not-handle-modules-info</guid>
<pubDate>Sun, 02 Jan 2022 15:54:15 +0000</pubDate>
</item>
<item>
<title>What is the canonical way to share bundles of predicates + generators in clojure spec?</title>
<link>https://ask.clojure.org/index.php/11282/what-canonical-share-bundles-predicates-generators-clojure</link>
<description>&lt;p&gt;I've been trying out Clojure spec and I often face situations in which I have to come up with a custom predicate function. Then sometimes these predicate functions require a custom generator. How can I share this predicate+generator bundle between different attributes?&lt;/p&gt;
&lt;p&gt;(Also not so important but, can I call this bundle of predicate-fn + generator a spec?)&lt;/p&gt;
&lt;p&gt;Example:&lt;br&gt;
Suppose I have the custom predicate:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;   (defn local-date? [x]
      (instance? LocalDate x))
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;and then I define a brand new generator function for it:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;(defn local-date-generator []
  (gen/fmap #(LocalDate/ofInstant (Instant/ofEpochMilli %) (ZoneId/of &quot;UTC&quot;)) 
                       (gen/large-integer)))
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;I can go on and define an attribute like:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;(s/def :person/birth-date (s/with-gen local-date local-date-generator))
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;but then I would have to define this &lt;code&gt;s/with-gen&lt;/code&gt; every time I create a LocalDate attribute. &lt;/p&gt;
&lt;p&gt;How can I abstract that away?&lt;/p&gt;
&lt;p&gt;I've come to the conclusion that the right way to do that would be to define an attribute in a namespace (e.g &lt;code&gt;myprojec.specs&lt;/code&gt;) in which I create an attribute with that spec &lt;/p&gt;
&lt;pre&gt;&lt;code&gt;(s/def ::local-date (s/with-gen local-date local-date-generator))
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;and then just re-use it elsewhere&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;(s/def :person/birth-date :myproject.specs/localdate)
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;What are the alternatives? &lt;/p&gt;
</description>
<category>Libs</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/11282/what-canonical-share-bundles-predicates-generators-clojure</guid>
<pubDate>Wed, 17 Nov 2021 11:51:41 +0000</pubDate>
</item>
<item>
<title>clojure -X misreports error if FileNotFoundException is thrown</title>
<link>https://ask.clojure.org/index.php/11223/clojure-misreports-error-if-filenotfoundexception-thrown</link>
<description>&lt;p&gt;If a FileNotFoundException is thrown while running a program started with &lt;code&gt;clojure -X&lt;/code&gt;, then it will print &quot;Namespace could not be loaded &quot; rather than the FileNotFoundException. This differs from -M.&lt;/p&gt;
&lt;p&gt;Minimal repro for &lt;code&gt;clojure -X&lt;/code&gt; misreporting FileNotFoundException. &lt;br&gt;
&lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/phronmophobic/filenotfoundcli&quot;&gt;https://github.com/phronmophobic/filenotfoundcli&lt;/a&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;bash-3.2$ clojure -X main/-main
finished loading main
Namespace could not be loaded: main
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This behavior differs from -M&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;bash-3.2$ clojure -M -m main
finished loading main
Execution error (FileNotFoundException) at main/-main (main.clj:4).
null

Full report at:
/var/folders/fk/l27d_8g52450jh4m7_dhqkr00000gn/T/clojure-16350436886037263655.edn
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Not a big deal, but came up when working on a command line tool, &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/phronmophobic/membrane.term/issues/5&quot;&gt;https://github.com/phronmophobic/membrane.term/issues/5&lt;/a&gt;. Basically, the FileNotFoundException would have been a suboptimal (but acceptable) error message for a non existent color scheme file, but the namespace message is misleading.&lt;/p&gt;
&lt;p&gt;Version info:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;bash-3.2$ clojure --version
Clojure CLI version 1.10.3.986
&lt;/code&gt;&lt;/pre&gt;
</description>
<category>Tools</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/11223/clojure-misreports-error-if-filenotfoundexception-thrown</guid>
<pubDate>Thu, 28 Oct 2021 17:54:10 +0000</pubDate>
</item>
<item>
<title>Make tools help more discoverable</title>
<link>https://ask.clojure.org/index.php/11214/make-tools-help-more-discoverable</link>
<description>&lt;p&gt;Although the documentation does mention &lt;code&gt;help/doc&lt;/code&gt; and &lt;code&gt;help/dir&lt;/code&gt;, it's not obvious for users how to get help on tools unless they read the entire doc page carefully.&lt;/p&gt;
&lt;p&gt;It would help users figure out how to use tools if the &lt;code&gt;-Ttools&lt;/code&gt; functions were a bit more verbose and suggested how to get help.&lt;/p&gt;
&lt;p&gt;I don't think much can be done about this:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;$ clojure -Ttools
No function found on command line or in :exec-fn
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;but adding a &lt;code&gt;help&lt;/code&gt; function would mean that the next thing a user might try could work:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;$ clojure -Ttools help
Namespace clojure.tools.tools.api loaded but function not found: help
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Telling users that the following can be used to get a list of available functions or to get more expansive help would guide them to the next function to use:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;$ clojure -A:deps -Ttools help/dir
install
list
remove
show
$ clojure -A:deps -Ttools help/doc
...
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;In addition, the &lt;code&gt;list&lt;/code&gt; function could suggest how to get help on a specific, installed tool:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;$ clojure -Ttools list
TOOL     LIB                              TYPE  VERSION
clj-new  com.github.seancorfield/clj-new  :git  v1.2.362
new      io.github.seancorfield/deps-new  :git  v0.4.0
nvd      io.github.rm-hull/nvd-clojure    :git  4b0c448
poly     io.github.polyfy/polylith        :git  768642a
tools    io.github.clojure/tools.tools    :git  v0.2.1
# add the following (arbitrarily picking the first one, perhaps):
For help with a specific tool, e.g., clj-new:
    clojure -A:deps -Tclj-new help/doc
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The same could be added to the &lt;code&gt;show&lt;/code&gt; function.&lt;/p&gt;
</description>
<category>Tools</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/11214/make-tools-help-more-discoverable</guid>
<pubDate>Wed, 27 Oct 2021 17:17:27 +0000</pubDate>
</item>
<item>
<title>tools.build: are &quot;standard&quot; build tasks under consideration?</title>
<link>https://ask.clojure.org/index.php/11168/tools-build-are-standard-build-tasks-under-consideration</link>
<description>&lt;p&gt;What, if any, thought has been put into the idea of having &quot;standard&quot; build task names for tools.build-based builds?&lt;/p&gt;
&lt;p&gt;This could be in the form of actual code in tools.build (or a layer on top of it), or simply  an official, published convention.  At this stage I'm more interested in whether the general concept is on the radar and if so what it might look like, and less concerned with implementation specifics.&lt;/p&gt;
&lt;p&gt;This matters because while allowing authors to name their build tasks as they wish has some (small?) value to those authors, it results in a fragmented experience for the consumers of that build - a consumer cannot make any assumptions about each new tools.build based project they encounter that they wish to build themselves.&lt;/p&gt;
&lt;p&gt;While humans can introspect a build script to figure out how to operate it, that's a lot more difficult for downstream build-based automation; including (but not limited to) systems such as jitpack.io, Heroku, etc.&lt;/p&gt;
&lt;p&gt;Having started dabbling in tools.build, the current incarnation is feeling quite a bit like the Java build environment circa 2004 or so (right before Maven 1.0 was released).  At that time Apache Ant was the dominant build tool, and every single Ant build script was a special snowflake that forced consumers to spend time studying before they could be used effectively.  For all its substantial flaws, Maven 1.0 at least solved that one problem.  While comparing tools.build to Apache Ant is clearly a massive disservice in many ways (tools.build's scripting language, composability, and dependency management pieces are clearly light-eons ahead of anything Ant ever had), the lack of a well-defined &quot;interface&quot; into tools.build-based build scripts has given me a strong feeling of déjà vu...&lt;/p&gt;
</description>
<category>Tools</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/11168/tools-build-are-standard-build-tasks-under-consideration</guid>
<pubDate>Thu, 14 Oct 2021 21:40:27 +0000</pubDate>
</item>
<item>
<title>Datomic ion push fails</title>
<link>https://ask.clojure.org/index.php/11113/datomic-ion-push-fails</link>
<description>&lt;p&gt;Anyone recognize this error &quot;data did not conform&quot; when trying to make a datomic ion push? I am using a windows machine and get the following message:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;{​​​​​​:command-failed&lt;br&gt;
 &quot;{​​​​​​:op :push :uname my-test-name :creds-profile my-creds-profile :region my-region}​​​​​​&quot;,&lt;br&gt;
 :causes&lt;br&gt;
 ({​​​​​​:message &quot;Data did not conform&quot;,&lt;br&gt;
   :class ExceptionInfo,&lt;br&gt;
   :data&lt;br&gt;
   #:clojure.spec.alpha{​​​​​​:problems&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;                    ({​​​​​​:path [:local :home],
                      :pred clojure.core/string?,
                      :val nil,
                      :via
                      [:cognitect.s3-libs.specs/local
                       :cognitect.s3-libs.specs/home],
                      :in [:local :home]}​​​​​​),
                    :spec
                    #object[clojure.spec.alpha$map_spec_impl$reify__1997 0x668a32a4 &quot;clojure.spec.alpha$map_spec_impl$reify__1997@668a32a4&quot;],
                    :value
                    {​​​​​​:description
                     &quot;Unreproducible deployment (no git commit)&quot;,
                     :query-group nil,
                     :app-name &quot;app-name&quot;,
                     :creds-profile my-creds-profile,
                     :op :push,
                     :uname my-test-name,
                     :allow [],
                     :region my-region,
                     :lambdas
                     {​​​​​​:api-handler
                      {​​​​​​:fn com.anon.app-name.ions.core/api-ion,
                       :integration :api-gateway/proxy,
                       :description
                       &quot;Handles requests to REST API.&quot;,
                       :timeout-secs 29,
                       :concurrency-limit :none}​​​​​​,
                      :file-upload-handler
                      {​​​​​​:fn
                       com.anon.app-name.ions.core/file-upload-handler,
                       :description
                       &quot;Handles notifications received from S3 when a user uploads a file to uploads bucket.&quot;,
                       :timeout-secs 900,
                       :concurrency-limit :none}​​​​​​,
                      :file-cleanup-handler
                      {​​​​​​:fn
                       com.anon.app-name.ions.core/file-cleanup-handler,
                       :description
                       &quot;Cleanups orphan files in database. Triggered by AWS Events every midnight.&quot;,
                       :timeout-secs 300,
                       :concurrency-limit 1}​​​​​​,
                      :common-connector
                      {​​​​​​:fn
                       com.anon.app-name.ions.core/common-connector,
                       :description
                       &quot;Handles common connection tasks between datomic and other Amazon services when required.&quot;,
                       :timeout-secs 300,
                       :concurrency-limit :none}​​​​​​,
                      :first-platform-connector
                      {​​​​​​:fn
                       com.anon.app-name.ions.core/first-platform-connector,
                       :description
                       &quot;Handles first-platform related connection tasks between datomic and other Amazon services when required.&quot;,
                       :timeout-secs 300,
                       :concurrency-limit :none}​​​​​​,
                      :second-platform-connector
                      {​​​​​​:fn
                       com.anon.app-name.ions.core/second-platform-connector,
                       :description
                       &quot;Handles second-platform related connection tasks between datomic and other Amazon services when required.&quot;,
                       :timeout-secs 300,
                       :concurrency-limit :none}​​​​​​}​​​​​​,
                     :datomic.ion.dev.config/resource
                     &quot;datomic/ion-config.edn&quot;,
                     :local {​​​​​​:home nil}​​​​​​,
                     :bucket
                     &quot;datomic-code-hash&quot;}​​​​​​}​​​​​​}​​​​​​)}​​​​​​
&lt;/code&gt;&lt;/pre&gt;
&lt;/blockquote&gt;
</description>
<category>Tools</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/11113/datomic-ion-push-fails</guid>
<pubDate>Wed, 29 Sep 2021 07:41:53 +0000</pubDate>
</item>
<item>
<title>Do I have to switch to Java 8 or 11 from 16.0.1?</title>
<link>https://ask.clojure.org/index.php/11052/do-i-have-to-switch-to-java-8-or-11-from-16-0-1</link>
<description>&lt;p&gt;Hi &lt;br&gt;
I saw a comment on Clojure.org stating that it only runs on java 8 or 11. I have 16.0.1 installed. What  is the best solution for me? I really do not want to download Java 11 and in a way downgrade. I am also concerned with my older projects all configured to use newer versions. &lt;/p&gt;
</description>
<category>Tools</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/11052/do-i-have-to-switch-to-java-8-or-11-from-16-0-1</guid>
<pubDate>Tue, 14 Sep 2021 20:22:11 +0000</pubDate>
</item>
<item>
<title>Are there plans for official docs (rationale and guide) on datafy / nav?</title>
<link>https://ask.clojure.org/index.php/11032/are-there-plans-for-official-docs-rationale-and-guide-datafy</link>
<description>&lt;p&gt;If Clojure is to become (even) more data oriented, these are powerful tools to achieve that goal. The community needs support to encourage adoption.&lt;/p&gt;
&lt;p&gt;The current state of documentation for &lt;code&gt;datafy&lt;/code&gt; and &lt;code&gt;nav&lt;/code&gt; is not sufficient IMHO to encourage independent learning on a broad scale.&lt;/p&gt;
&lt;p&gt;There is no canonical source of such documentation in the community despite some valiant efforts (eg @SeanCorfield who has a &lt;a rel=&quot;nofollow&quot; href=&quot;https://corfield.org/blog/2018/12/03/datafy-nav/&quot;&gt;great blog post&lt;/a&gt; and is an active proponent). &lt;/p&gt;
&lt;p&gt;Examples are difficult to find around the internet ... &lt;a rel=&quot;nofollow&quot; href=&quot;https://gist.github.com/sashton/56a14d275c71d7ce3e224c11c9a16bd4&quot;&gt;here's a good one&lt;/a&gt; from a Slack recommendation by @Frederick on there.&lt;/p&gt;
&lt;p&gt;We know that there are problems with Slack since we cannot easily search history so keeping it here might help people find it in the meantime.&lt;/p&gt;
&lt;p&gt;It would be good to have a rationale explaining the problem it is solving, the general approach and some specifics on the design.&lt;/p&gt;
&lt;p&gt;Likewise a guide on how it should be used with a worked example and some hints and tips on how to approach implementations.&lt;/p&gt;
&lt;p&gt;I know it's marked as alpha but this has not prevented docs on other aspects of the language.&lt;/p&gt;
</description>
<category>Libs</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/11032/are-there-plans-for-official-docs-rationale-and-guide-datafy</guid>
<pubDate>Sat, 11 Sep 2021 10:26:57 +0000</pubDate>
</item>
<item>
<title>instaparse and an s-exp language: how do i deal with comments?</title>
<link>https://ask.clojure.org/index.php/11008/instaparse-and-an-s-exp-language-how-do-i-deal-with-comments</link>
<description>&lt;p&gt;I am trying to write a parser for an s-expression-based language.  It has the usual &lt;code&gt;;&lt;/code&gt; to the end of line comments.  My problem is that I don't want to strip the comments (my original goal was to write a pretty-printer/formatter), and the comments can appear anywhere in the code.  &lt;/p&gt;
&lt;p&gt;For example, I can have&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;;; pretty normal -- this function does blah blah blah
(define-private (blah)
  ;; TODO: do something useful here
  (= 23 5))
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;or&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;(define-private ;; make this public maybe?
  (blah)
  (let (
    (enigma 23) ;; snicker
    (laws ;; this is a terrible example
      5))
    ;; inside the let body
   (= enigma 
    ;; todo: constant folding?
    laws)))
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;How do I get instaparse to handle that?&lt;/p&gt;
&lt;p&gt;Stripping comments is trivial -- I can use something like this:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;(defparser ws-or-comments
  &quot;ws-or-comments = #'\\s+' | comment+
   comment = #';+[^\n]*'
&quot; :auto-whitespace :standard)

(defparser my-parser ... :auto-whitespace ws-or-comments)
&lt;/code&gt;&lt;/pre&gt;
</description>
<category>Libs</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/11008/instaparse-and-an-s-exp-language-how-do-i-deal-with-comments</guid>
<pubDate>Fri, 03 Sep 2021 09:08:24 +0000</pubDate>
</item>
<item>
<title>Why tools-deps downloads all deps again when i run the tests (locally and on CI)</title>
<link>https://ask.clojure.org/index.php/10999/why-tools-deps-downloads-all-deps-again-when-run-tests-locally</link>
<description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I am trying to download all deps so tests and other steps on CI should not do it.&lt;/p&gt;
&lt;p&gt;I run this command to download all deps&lt;br&gt;
&lt;code&gt; clojure -Sdeps '{:mvn/local-repo &quot;.m2&quot;}' -A:dev:test:prod:frontend -Spath &amp;gt; /dev/null&lt;/code&gt;&lt;br&gt;
I can confirm &lt;code&gt;.m2&lt;/code&gt; and &lt;code&gt;.cpcache&lt;/code&gt; dirs are there.&lt;/p&gt;
&lt;p&gt;But when I run &lt;br&gt;
&lt;code&gt;clojure -Sdeps '{:mvn/local-repo &quot;.m2&quot;}' -M:dev:test&lt;/code&gt;&lt;br&gt;
All deps are being downloaded again.&lt;/p&gt;
&lt;p&gt;It reproduces locally and on ci.&lt;/p&gt;
&lt;p&gt;Sdescribe&lt;br&gt;
&lt;code&gt;{:version &quot;1.10.3.967&quot;
 :config-files [&quot;/usr/local/Cellar/clojure/1.10.3.967/deps.edn&quot; &quot;/Users/kirill/.clojure/deps.edn&quot; &quot;deps.edn&quot; ]
 :config-user &quot;/Users/kirill/.clojure/deps.edn&quot;
 :config-project &quot;deps.edn&quot;
 :install-dir &quot;/usr/local/Cellar/clojure/1.10.3.967&quot;
 :config-dir &quot;/Users/kirill/.clojure&quot;
 :cache-dir &quot;.cpcache&quot;
 :force false
 :repro false
 :main-aliases &quot;&quot;
 :repl-aliases &quot;&quot;}&lt;/code&gt;&lt;/p&gt;
</description>
<category>Tools</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/10999/why-tools-deps-downloads-all-deps-again-when-run-tests-locally</guid>
<pubDate>Thu, 02 Sep 2021 13:50:27 +0000</pubDate>
</item>
<item>
<title>tools.build.api/git-count-revs should support rev-lists path argument</title>
<link>https://ask.clojure.org/index.php/10958/tools-build-api-count-revs-should-support-lists-path-argument</link>
<description>&lt;p&gt;Given a monorepo it's useful to have git-count-revs return only the revs affecting a particular folder.&lt;/p&gt;
&lt;p&gt;Ie:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;$ cd mymonorepo/service-a
$ git rev-list HEAD --count
1024 # all revs in monorepo
$ git rev-list HEAD --count -- .
17 # only count revs affecting service-a
&lt;/code&gt;&lt;/pre&gt;
</description>
<category>Tools</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/10958/tools-build-api-count-revs-should-support-lists-path-argument</guid>
<pubDate>Sun, 22 Aug 2021 10:20:03 +0000</pubDate>
</item>
<item>
<title>tools.build.api/write-pom does not expose generated pom's filename</title>
<link>https://ask.clojure.org/index.php/10956/tools-build-api-write-pom-does-expose-generated-poms-filename</link>
<description>&lt;p&gt;&lt;code&gt;tools.build.api/write-pom&lt;/code&gt; writes a pom.xml file, but does not expose the file name.&lt;/p&gt;
&lt;p&gt;Many tools that deploy to Clojars/Maven Central/etc. expect to be passed the name of a pom.xml file. For example &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/clj-commons/pomegranate/blob/41ccbf9e20a5a82680133b7438443da45de8db2d/src/main/clojure/cemerick/pomegranate/aether.clj#L403&quot;&gt;cemerick.pomegranate.aether/deploy&lt;/a&gt; and &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/slipset/deps-deploy/blob/b4359c5d67ca002d9ed0c4b41b710d7e5a82e3bf/src/deps_deploy/deps_deploy.clj#L207&quot;&gt;deps-deploy.deps-deploy/deploy&lt;/a&gt; expect a &lt;code&gt;:pom-file&lt;/code&gt; argument.&lt;/p&gt;
&lt;p&gt;This leads to hard-coding this filename, for example in &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/seancorfield/next-jdbc/blob/5992c8d9bb25760519e02cd6a91739291f2c1e6c/deps.edn#L55&quot;&gt;next-jdbc deps.edn&lt;/a&gt;, or re-calculating it, as in &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/mainej/f-form/blob/f36bef6e4330167e4f9387436f02c647a98233db/dev/build.clj#L19&quot;&gt;f-form dev/build.clj&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Would it be possible for tools.build to expose either the &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/clojure/tools.build/blob/d3008e159eb2afbc4b0019e1d36cf20e1129c394/src/main/clojure/clojure/tools/build/tasks/write_pom.clj#L236&quot;&gt;pom directory&lt;/a&gt; or &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/clojure/tools.build/blob/d3008e159eb2afbc4b0019e1d36cf20e1129c394/src/main/clojure/clojure/tools/build/tasks/write_pom.clj#L237&quot;&gt;pom filename&lt;/a&gt;, to facilitate the integration of builds and deploys?&lt;/p&gt;
</description>
<category>Tools</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/10956/tools-build-api-write-pom-does-expose-generated-poms-filename</guid>
<pubDate>Sat, 21 Aug 2021 21:01:23 +0000</pubDate>
</item>
<item>
<title>getting &quot;Function not found&quot; when invoking clojure with -X:alias</title>
<link>https://ask.clojure.org/index.php/10947/getting-function-not-found-when-invoking-clojure-with-alias</link>
<description>&lt;p&gt;I have two aliases in my deps.edn:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;{
 :deps
 {
  org.clojure/spec.alpha {:mvn/version &quot;0.2.194&quot;}
  aleph/aleph {:mvn/version &quot;0.4.7-alpha7&quot;}
  hiccup/hiccup {:mvn/version &quot;2.0.0-alpha2&quot;}
  }

 :aliases 
 { 
  :web-server {
               :exec-fn web.network-service/run 
               :exec-args {:port 8080} 
               }
  :test-web-server { 
                    :exec-fn test.tnetwork-service/run 
                    :exec-args {:port 9090}
                    }
  }
 }
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;When invoking &lt;/p&gt;
&lt;pre&gt;&lt;code&gt;clojure -X:web-server
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;I get &lt;/p&gt;
&lt;pre&gt;&lt;code&gt;Function not found: web.network-service/run
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Everything is honky dory when invoking &lt;/p&gt;
&lt;pre&gt;&lt;code&gt;clojure -X:test-web-server
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;I don't see why would that be, the exec-funs are basically identical. Take a look at full code here: &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/sidesteps/network-grid&quot;&gt;https://github.com/sidesteps/network-grid&lt;/a&gt;&lt;br&gt;
I have   &lt;code&gt;:paths [&quot;.&quot; &quot;src&quot;]&lt;/code&gt; in my global deps.edn&lt;/p&gt;
</description>
<category>Tools</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/10947/getting-function-not-found-when-invoking-clojure-with-alias</guid>
<pubDate>Wed, 18 Aug 2021 16:07:57 +0000</pubDate>
</item>
<item>
<title>Setting --prefix clojure-tools results in the installation being deleted</title>
<link>https://ask.clojure.org/index.php/10940/setting-prefix-clojure-tools-results-installation-deleted</link>
<description>&lt;p&gt;If the CLI tools installer is run with --prefix clojure-tools then the tools will be installed into ./clojure-tools and then subsequently deleted. This is because &quot;clojure-tools&quot; is the name of a temporary folder created by the installer.&lt;/p&gt;
&lt;p&gt;This is a corner case, but it had me scratching my head for a few minutes and is a potential source of frustration when someone is just starting to use Clojure. Clojure-tools is a reasonable name for the CLI install if you're just trying out clojure and want to e.g. install into your home directory just to have a look at clojure.&lt;/p&gt;
&lt;p&gt;Suggested fixes&lt;br&gt;
Name the temp dir temp-something, or use mktemp&lt;br&gt;
Add a check that prefix &amp;lt;&amp;gt; temp dir name&lt;/p&gt;
</description>
<category>Tools</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/10940/setting-prefix-clojure-tools-results-installation-deleted</guid>
<pubDate>Sat, 14 Aug 2021 15:17:29 +0000</pubDate>
</item>
<item>
<title>create-basis/java-command do not handle :jvm-opts</title>
<link>https://ask.clojure.org/index.php/10894/create-basis-java-command-do-not-handle-jvm-opts</link>
<description>&lt;p&gt;I have a &lt;code&gt;:test&lt;/code&gt; alias in my project, which includes &lt;code&gt;:jvm-opts&lt;/code&gt; (as well as &lt;code&gt;:extra-paths&lt;/code&gt; and &lt;code&gt;:extra-deps&lt;/code&gt;). I call &lt;code&gt;tools.build.api/create-basis&lt;/code&gt; with &lt;code&gt;{:aliases [:test]}&lt;/code&gt; and then pass that basis to &lt;code&gt;tools.build.api/java-command&lt;/code&gt; but that doesn't include those JVM options.&lt;/p&gt;
&lt;p&gt;In order to pick up those JVM options, I needed to do this:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;(defn run-tests
  [_]
  (let [basis    (b/create-basis {:aliases [:test]})
        combined (t/combine-aliases basis [:test])
        cmds     (b/java-command {:basis     basis
                                  :java-opts (:jvm-opts combined)
                                  :main      'clojure.main
                                  :main-args [&quot;-m&quot; &quot;cognitect.test-runner&quot;]})
        {:keys [exit]} (b/process cmds)]
    (when-not (zero? exit)
      (throw (ex-info &quot;Tests failed&quot; {})))))
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;(so I have to use &lt;code&gt;tools.deps.alpha/combine-aliases&lt;/code&gt;).&lt;/p&gt;
&lt;p&gt;Is this expected? Should this be easier?&lt;/p&gt;
</description>
<category>Tools</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/10894/create-basis-java-command-do-not-handle-jvm-opts</guid>
<pubDate>Tue, 03 Aug 2021 04:31:20 +0000</pubDate>
</item>
<item>
<title>tools.build.api/write-pom does not update scm&gt;tag</title>
<link>https://ask.clojure.org/index.php/10893/tools-build-api-write-pom-does-not-update-scm-tag</link>
<description>&lt;p&gt;Although &lt;code&gt;write-pom&lt;/code&gt; updates the &lt;code&gt;&amp;lt;version&amp;gt;&lt;/code&gt; field in the &lt;code&gt;pom.xml&lt;/code&gt;, it does not attempt to update the &lt;code&gt;&amp;lt;scm&amp;gt;&amp;lt;tag&amp;gt;&lt;/code&gt; field. How should folks deal with that tag field when using &lt;code&gt;tools.build&lt;/code&gt;?&lt;/p&gt;
</description>
<category>Tools</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/10893/tools-build-api-write-pom-does-not-update-scm-tag</guid>
<pubDate>Tue, 03 Aug 2021 03:41:09 +0000</pubDate>
</item>
<item>
<title>Add support for BOM (Bill Of Materials) dependencies</title>
<link>https://ask.clojure.org/index.php/10892/add-support-for-bom-bill-of-materials-dependencies</link>
<description>&lt;p&gt;Currently, if you have a dependency that is a BOM on Maven, you have to track down what all the components of that BOM are and list them as explicit, individual dependencies. It would save a lot of detective work and redundancy if t.d.a supported this type of dependency directly.&lt;/p&gt;
</description>
<category>Tools</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/10892/add-support-for-bom-bill-of-materials-dependencies</guid>
<pubDate>Mon, 02 Aug 2021 17:08:00 +0000</pubDate>
</item>
<item>
<title>help/doc doesn't work with project dependencies</title>
<link>https://ask.clojure.org/index.php/10888/help-doc-doesnt-work-with-project-dependencies</link>
<description>&lt;p&gt;Repro:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;(! 748)-&amp;gt; cat deps.edn 
{:deps {org.clojure/data.csv {:mvn/version &quot;RELEASE&quot;}}}
(! 749)-&amp;gt; cat src/foo.clj 
(ns foo
  &quot;Example namespace.&quot;
  (:require [clojure.data.csv :as csv]))

(defn bar &quot;Example function&quot; [_] (println &quot;Baaa!&quot;))
(! 750)-&amp;gt; clojure -X foo/bar
Baaa!
(! 751)-&amp;gt; clojure -X:deps help/doc :fn foo/bar
Syntax error (FileNotFoundException) compiling at (foo.clj:1:1).
Could not locate clojure/data/csv__init.class, clojure/data/csv.clj or clojure/data/csv.cljc on classpath.

Full report at:
/var/folders/p1/30gnjddx6p193frh670pl8nh0000gn/T/clojure-12591734153756667401.edn
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Because &lt;code&gt;-X:deps&lt;/code&gt; replaces the project dependencies, only the &lt;code&gt;src&lt;/code&gt; files are found (because &lt;code&gt;:paths&lt;/code&gt; is not replaced).&lt;/p&gt;
</description>
<category>Tools</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/10888/help-doc-doesnt-work-with-project-dependencies</guid>
<pubDate>Thu, 29 Jul 2021 17:14:04 +0000</pubDate>
</item>
<item>
<title>Exception using futures with -X on Clojure CLI 1.10.3.929</title>
<link>https://ask.clojure.org/index.php/10850/exception-using-futures-with-x-on-clojure-cli-1-10-3-929</link>
<description>&lt;p&gt;There seems to be a weird issue related to &lt;code&gt;-X&lt;/code&gt; and futures with Clojure CLI 1.10.3.929:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;$ clojure --version
Clojure CLI version 1.10.3.929
$ clojure -Srepro -X clojure.core.server/start-server :name '&quot;server&quot;' :port 5555 :accept clojure.core.server/repl :server-daemon false
$ clojure -Srepro -J-Dclojure.server.repl=&quot;{:port 6666 :accept clojure.core.server/repl}&quot;
$ nc localhost 5555
user=&amp;gt; (def x (future 1))
Execution error (RejectedExecutionException) at java.util.concurrent.ThreadPoolExecutor$AbortPolicy/rejectedExecution (ThreadPoolExecutor.java:2057).
Task java.util.concurrent.FutureTask@14c75e2b[Not completed, task = clojure.core$binding_conveyor_fn$fn__5772@4f4cba65] rejected from java.util.concurrent.ThreadPoolExecutor@5d5b17a8[Terminated, pool size = 0, active threads = 0, queued tasks = 0, completed tasks = 1]
$ nc localhost 6666
user=&amp;gt; (def x (future 2))
#'user/x
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;I cannot reproduce the issue with 1.10.3.875.&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;-X&lt;/code&gt; invocation doesn't work at all on 1.10.3.882, so I can't (easily) narrow it down any further.&lt;/p&gt;
</description>
<category>Tools</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/10850/exception-using-futures-with-x-on-clojure-cli-1-10-3-929</guid>
<pubDate>Mon, 26 Jul 2021 17:23:05 +0000</pubDate>
</item>
<item>
<title>help/doc would be useful for -Ttools</title>
<link>https://ask.clojure.org/index.php/10782/help-doc-would-be-useful-for-ttools</link>
<description>&lt;p&gt;Although you can &lt;code&gt;clojure -Ttools show :tool something&lt;/code&gt;, you don't get much information back about it and you can't use the new &lt;code&gt;-X:deps help/doc&lt;/code&gt; on it because it isn't loaded via an alias.&lt;/p&gt;
&lt;p&gt;Please add &lt;code&gt;help/doc&lt;/code&gt; and &lt;code&gt;help/dir&lt;/code&gt; to &lt;code&gt;-Ttools&lt;/code&gt; so that it is easier to get help/documentation for the installed tools.&lt;/p&gt;
</description>
<category>Tools</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/10782/help-doc-would-be-useful-for-ttools</guid>
<pubDate>Wed, 14 Jul 2021 03:26:54 +0000</pubDate>
</item>
<item>
<title>-X:deps help/doc does not work for a function</title>
<link>https://ask.clojure.org/index.php/10778/x-deps-help-doc-does-not-work-for-a-function</link>
<description>&lt;p&gt;With a minimal &lt;code&gt;deps.edn&lt;/code&gt;-based project:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;(! 1105)-&amp;gt; clojure -Tnew lib :name repro/help-doc
Generating a project called help-doc based on the 'app' template.
(! 1106)-&amp;gt; cd help-doc/
(! 1107)-&amp;gt; cat src/repro/help_doc.clj 
(ns repro.help-doc
  (:gen-class))

(defn greet
  &quot;Callable entry point to the application.&quot;
  [data]
  (println (str &quot;Hello, &quot; (or (:name data) &quot;World&quot;) &quot;!&quot;)))

(defn -main
  &quot;I don't do a whole lot ... yet.&quot;
  [&amp;amp; args]
  (greet {:name (first args)}))
(! 1108)-&amp;gt; clojure -X:deps help/doc :ns repro.help-doc
-------------------------
repro.help-doc/-main
([&amp;amp; args])
  I don't do a whole lot ... yet.
-------------------------
repro.help-doc/greet
([data])
  Callable entry point to the application.
(! 1109)-&amp;gt; clojure -X:deps help/doc :fn repro.help-doc/greet
-------------------------

(! 1110)-&amp;gt; cat deps.edn
{:paths [&quot;src&quot; &quot;resources&quot;]
 :deps {org.clojure/clojure {:mvn/version &quot;1.10.3&quot;}}}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Neither of these work either:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;(! 1111)-&amp;gt; clojure -X:deps help/doc :ns repro.help-doc :fn greet
-------------------------

(! 1112)-&amp;gt; clojure -X:deps help/doc :ns-default repro.help-doc :fn greet
-------------------------
&lt;/code&gt;&lt;/pre&gt;
</description>
<category>Tools</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/10778/x-deps-help-doc-does-not-work-for-a-function</guid>
<pubDate>Tue, 13 Jul 2021 18:06:00 +0000</pubDate>
</item>
<item>
<title>:deps manifest dependencies do not respect :mvn/repos in dependent project</title>
<link>https://ask.clojure.org/index.php/10726/deps-manifest-dependencies-respect-repos-dependent-project</link>
<description>&lt;h2&gt;Problem&lt;/h2&gt;
&lt;p&gt;It's impossible to depend on a deps.edn-based project using git or local dependency when that project uses custom maven repos. Attempts to build classpath for projects depending on such projects will fail.&lt;/p&gt;
&lt;h2&gt;Repro&lt;/h2&gt;
&lt;p&gt;I created a minimal repo that illustrates the issue: &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/vlaaad/deps-mvn-repos-repro&quot;&gt;https://github.com/vlaaad/deps-mvn-repos-repro&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;It contains 3 deps.edn projects: lib, app-local and app-git.&lt;/p&gt;
&lt;p&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/vlaaad/deps-mvn-repos-repro/blob/master/lib/deps.edn&quot;&gt;lib&lt;/a&gt; contains a single deps.edn file that defines a custom maven repo and a dependency that pulls from that repo.&lt;/p&gt;
&lt;p&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/vlaaad/deps-mvn-repos-repro/blob/master/app-local/deps.edn&quot;&gt;app-local&lt;/a&gt; contains a single deps.edn file that defines a :local/root dependency on lib.&lt;/p&gt;
&lt;p&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/vlaaad/deps-mvn-repos-repro/blob/master/app-git/deps.edn&quot;&gt;app-git&lt;/a&gt; contains a single deps.edn file that defines a :git/url dependency on lib.&lt;/p&gt;
&lt;h3&gt;Expected behavior&lt;/h3&gt;
&lt;p&gt;Running &lt;code&gt;clj -P&lt;/code&gt; should succeed in lib, app-local and app-git projects.&lt;/p&gt;
&lt;h3&gt;Actual behavior&lt;/h3&gt;
&lt;p&gt;Running &lt;code&gt;clj -P&lt;/code&gt; succeeds only in lib and fails in app-local and app-git with the error &quot;Error building classpath. Could not find artifact net.sf.saxon:saxon-dom:jar:9.1.0.8 in central (&lt;a rel=&quot;nofollow&quot; href=&quot;https://repo1.maven.org/maven2/&quot;&gt;https://repo1.maven.org/maven2/&lt;/a&gt;)&quot;&lt;/p&gt;
</description>
<category>Tools</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/10726/deps-manifest-dependencies-respect-repos-dependent-project</guid>
<pubDate>Thu, 24 Jun 2021 09:18:22 +0000</pubDate>
</item>
</channel>
</rss>