<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>Clojure Q&amp;A - Recent activity in Tools</title>
<link>https://ask.clojure.org/index.php/activity/tools</link>
<description></description>
<item>
<title>Closed: does deps.edd support &quot;exclusion&quot; with wild cards ?</title>
<link>https://ask.clojure.org/index.php/14922/does-deps-edd-support-exclusion-with-wild-cards?show=14922#q14922</link>
<description>&lt;p&gt;maven supports this:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;dependency&amp;gt;
      &amp;lt;groupId&amp;gt;org.apache.hadoop&amp;lt;/groupId&amp;gt;
      &amp;lt;artifactId&amp;gt;hadoop-common&amp;lt;/artifactId&amp;gt;
      &amp;lt;version&amp;gt;${hadoop.version}&amp;lt;/version&amp;gt;
      &amp;lt;exclusions&amp;gt;
        &amp;lt;exclusion&amp;gt;
          &amp;lt;groupId&amp;gt;*&amp;lt;/groupId&amp;gt;
          &amp;lt;artifactId&amp;gt;*&amp;lt;/artifactId&amp;gt;
        &amp;lt;/exclusion&amp;gt;
      &amp;lt;/exclusions&amp;gt;   
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;while Clojure does not , it seems&lt;/p&gt;
</description>
<category>Clojure CLI</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14922/does-deps-edd-support-exclusion-with-wild-cards?show=14922#q14922</guid>
<pubDate>Mon, 23 Feb 2026 15:09:23 +0000</pubDate>
</item>
<item>
<title>Closed: Improving curl options for CLI install scripts (brew-install)</title>
<link>https://ask.clojure.org/index.php/14900/improving-curl-options-for-cli-install-scripts-brew-install?show=14900#q14900</link>
<description>&lt;p&gt;Hi!&lt;/p&gt;
&lt;p&gt;I'm the maintainer for Heroku's Clojure buildpack. It uses the install scripts from clojure/brew-install to install the CLI. I noticed intermittent install failures related to the download of the Clojure tools. I believe most of them could be avoided with a slightly changed curl command line options.&lt;/p&gt;
&lt;p&gt;I opened a PR before realizing that PRs will not be accepted, so I'm starting this thread to properly get the discussion going. For reference, the closed PR can be found here: &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/clojure/brew-install/pull/10&quot;&gt;https://github.com/clojure/brew-install/pull/10&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I believe these options would improve the download behaviour for all users, but especially when used in automations:&lt;/p&gt;
&lt;p&gt;--connect-timeout 3 (&lt;a rel=&quot;nofollow&quot; href=&quot;https://curl.se/docs/manpage.html#--connect-timeout&quot;&gt;https://curl.se/docs/manpage.html#--connect-timeout&lt;/a&gt;)&lt;br&gt;
Prevents hanging when server is unreachable.&lt;/p&gt;
&lt;p&gt;--fail (&lt;a rel=&quot;nofollow&quot; href=&quot;https://curl.se/docs/manpage.html#-f&quot;&gt;https://curl.se/docs/manpage.html#-f&lt;/a&gt;)&lt;br&gt;
Exit with error code 22 for HTTP responses with status codes &amp;gt;= 400.&lt;/p&gt;
&lt;p&gt;--max-time 60 (&lt;a rel=&quot;nofollow&quot; href=&quot;https://curl.se/docs/manpage.html#-m&quot;&gt;https://curl.se/docs/manpage.html#-m&lt;/a&gt;)&lt;br&gt;
Maximum time in seconds for the entire transfer operation. Prevents hanging indefinitely with slow connections.&lt;/p&gt;
&lt;p&gt;--no-progress-meter (&lt;a rel=&quot;nofollow&quot; href=&quot;https://curl.se/docs/manpage.html#--no-progress-meter&quot;&gt;https://curl.se/docs/manpage.html#--no-progress-meter&lt;/a&gt;)&lt;br&gt;
Introduced in curl 7.67.0 (Nov 2019). Disables the progress bar for cleaner output. But less drastic than --silent and will still output diagnostic information (i.e. retries).&lt;/p&gt;
&lt;p&gt;--retry-max-time 60 (&lt;a rel=&quot;nofollow&quot; href=&quot;https://curl.se/docs/manpage.html#--retry-max-time&quot;&gt;https://curl.se/docs/manpage.html#--retry-max-time&lt;/a&gt;)&lt;br&gt;
Retry only within this time period (60 seconds). After this time expires, no more retries will be attempted.&lt;/p&gt;
&lt;p&gt;--retry 5 (&lt;a rel=&quot;nofollow&quot; href=&quot;https://curl.se/docs/manpage.html#--retry&quot;&gt;https://curl.se/docs/manpage.html#--retry&lt;/a&gt;)&lt;br&gt;
Introduced in curl 7.12.3 (Dec 2004). Retry up to 5 times on transient errors (timeouts, HTTP 408, 429, 500, 502, 503, 504, 522, 524).&lt;/p&gt;
&lt;p&gt;--retry-connrefused (&lt;a rel=&quot;nofollow&quot; href=&quot;https://curl.se/docs/manpage.html#--retry-connrefused&quot;&gt;https://curl.se/docs/manpage.html#--retry-connrefused&lt;/a&gt;)&lt;br&gt;
Introduced in curl 7.52.0 (Dec 2016). Consider connection refused as a transient error for --retry.&lt;/p&gt;
&lt;p&gt;These are obviously opinionated and my ask is not for these options specifically. Happy to get anything that will improve the situation. :)&lt;/p&gt;
&lt;p&gt;Manuel&lt;/p&gt;
</description>
<category>Clojure CLI</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14900/improving-curl-options-for-cli-install-scripts-brew-install?show=14900#q14900</guid>
<pubDate>Mon, 26 Jan 2026 23:23:15 +0000</pubDate>
</item>
<item>
<title>Commented: proper XDG support</title>
<link>https://ask.clojure.org/index.php/12911/proper-xdg-support?show=14720#c14720</link>
<description>.clojure_history is not part of the Clojure CLI, I think that’s Leiningen?</description>
<category>Tools</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/12911/proper-xdg-support?show=14720#c14720</guid>
<pubDate>Tue, 30 Sep 2025 12:35:02 +0000</pubDate>
</item>
<item>
<title>Commented: Prepping -  cache invalidation</title>
<link>https://ask.clojure.org/index.php/14711/prepping-cache-invalidation?show=14714#c14714</link>
<description>Don't have anything planned currently.</description>
<category>Clojure CLI</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14711/prepping-cache-invalidation?show=14714#c14714</guid>
<pubDate>Tue, 16 Sep 2025 13:35:03 +0000</pubDate>
</item>
<item>
<title>Commented: how do you set  -Djdk.attach.allowAttachSelf enabled so that I can interrupt a cider repl in emacs</title>
<link>https://ask.clojure.org/index.php/14697/attach-allowattachself-enabled-interrupt-cider-repl-emacs?show=14702#c14702</link>
<description>You've accurately identified the timeout. CIDER (nrepl, in fact) first tries to interrupt the thread in a &amp;quot;legal&amp;quot; way, but if that doesn't succeed, it waits for 5 seconds and then kills the thread forcefully. It is not very &amp;quot;safe&amp;quot;, might potentially corrupt memory or screw up locks, that's why it's a last resort, but it is totally fine to do that during development.&lt;br /&gt;
&lt;br /&gt;
Welcome to Clojure! Hope you have fun.</description>
<category>CIDER</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14697/attach-allowattachself-enabled-interrupt-cider-repl-emacs?show=14702#c14702</guid>
<pubDate>Wed, 03 Sep 2025 06:45:25 +0000</pubDate>
</item>
<item>
<title>Closed: Option in `clojure` CLI command to print the basis</title>
<link>https://ask.clojure.org/index.php/13739/option-in-clojure-cli-command-to-print-the-basis?show=13739#q13739</link>
<description>&lt;p&gt;It would be nice that &lt;code&gt;clojure&lt;/code&gt; could print the basis for a given combination of aliases (or none).&lt;/p&gt;
&lt;p&gt;A common use case is obtaining the computed &lt;code&gt;:paths&lt;/code&gt; for a combination of aliases.&lt;/p&gt;
</description>
<category>Clojure CLI</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/13739/option-in-clojure-cli-command-to-print-the-basis?show=13739#q13739</guid>
<pubDate>Thu, 14 Aug 2025 21:37:20 +0000</pubDate>
</item>
<item>
<title>Answer selected: clojure -X:deps find-versions doesn't sort tags correctly?</title>
<link>https://ask.clojure.org/index.php/14668/clojure-x-deps-find-versions-doesnt-sort-tags-correctly?show=14673#a14673</link>
<description>&lt;p&gt;git tags are sorted via:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;git tag --sort=v:refname
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;which treats the tag name as a version. How suffix versions are sorted is dependent on your git config settings. It's possible to change this setting on your machine to consider suffixes before releases with:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;git config --global versionsort.suffix -rc
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;It would be possible to resolve tags to commits and sort based on ancestor comparison but this would affect the performance (possibly a lot). Hard to say what the effect would be without some testing.&lt;/p&gt;
</description>
<category>Clojure CLI</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14668/clojure-x-deps-find-versions-doesnt-sort-tags-correctly?show=14673#a14673</guid>
<pubDate>Mon, 11 Aug 2025 01:59:31 +0000</pubDate>
</item>
<item>
<title>Answer selected: tools.deps.cli.api/mvn-install docstring typo</title>
<link>https://ask.clojure.org/index.php/14669/tools-deps-cli-api-mvn-install-docstring-typo?show=14672#a14672</link>
<description>&lt;p&gt;Yep, thx - fixed in source for next release.&lt;/p&gt;
</description>
<category>Clojure CLI</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14669/tools-deps-cli-api-mvn-install-docstring-typo?show=14672#a14672</guid>
<pubDate>Mon, 11 Aug 2025 01:44:08 +0000</pubDate>
</item>
<item>
<title>POSIX-style command line arguments in tools (-T)</title>
<link>https://ask.clojure.org/index.php/14608/posix-style-command-line-arguments-in-tools-t</link>
<description>&lt;p&gt;I have a couple command line tools written as libraries that I'd like to expose as proper Clojure Tools. They have classic &lt;a rel=&quot;nofollow&quot; href=&quot;https://www.gnu.org/prep/standards/html_node/Command_002dLine-Interfaces.html&quot;&gt;POSIX-style command line interfaces&lt;/a&gt;, relying on &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/clojure/tools.cli&quot;&gt;tools.cli&lt;/a&gt;. I could add an &lt;code&gt;-X&lt;/code&gt; kv-map interface, but there are a number of boolean flags that would not translate well to &lt;code&gt;:foo true&lt;/code&gt; style (such as arbitrary file paths).&lt;/p&gt;
&lt;p&gt;Is there a way to pass arbitrary arguments to a clojure Tool without using the kv-map style?&lt;/p&gt;
&lt;p&gt;And if not, would there be interest in a flag or option that would allow for such a thing?&lt;/p&gt;
</description>
<category>Clojure CLI</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14608/posix-style-command-line-arguments-in-tools-t</guid>
<pubDate>Thu, 03 Jul 2025 21:06:46 +0000</pubDate>
</item>
<item>
<title>Commented: Improve clojure cli error msg: &quot;The following libs must be prepared&quot; could include &quot;clojure  -X:deps prep&quot;</title>
<link>https://ask.clojure.org/index.php/14581/improve-clojure-error-following-prepared-include-clojure?show=14583#c14583</link>
<description>While I do have the basic prep command memorized, the variant that always takes me a bit of thinking is how to prep dependencies that come in via test dependencies (answer: add :aliases '[:test]' to the basic command).</description>
<category>Clojure CLI</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14581/improve-clojure-error-following-prepared-include-clojure?show=14583#c14583</guid>
<pubDate>Mon, 09 Jun 2025 01:18:27 +0000</pubDate>
</item>
<item>
<title>Commented: How to uberjar without bundling source code?</title>
<link>https://ask.clojure.org/index.php/14486/how-to-uberjar-without-bundling-source-code?show=14495#c14495</link>
<description>I believe you need a bit more than just ommiting &amp;quot;src from the copy-dir call.&lt;br /&gt;
&amp;nbsp;That would work if you don't use any dependencies of your own but most applications are assembled from a collection of other modules/libraries. &lt;br /&gt;
In that case, you want to specify the `:exclude` key in the parameter map passed to `b/uber`. It's a sequence of things to exclude where each item can also be a regex.&lt;br /&gt;
&lt;br /&gt;
NOTE: If you are building your uberjar on macOS, I also suggest excluding `LICENSE` because it tends to cause issues with the case-insensitive file system.</description>
<category>Clojure CLI</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14486/how-to-uberjar-without-bundling-source-code?show=14495#c14495</guid>
<pubDate>Fri, 04 Apr 2025 07:26:05 +0000</pubDate>
</item>
<item>
<title>Answered: a) how: programmatically set REPL ‘context’ ‘prj-1 aware’? b) how: programmatically switch REPL ‘context’ ‘prj-n aware’?</title>
<link>https://ask.clojure.org/index.php/14422/programmatically-context-programmatically-switch-context?show=14423#a14423</link>
<description>&lt;blockquote&gt;&lt;p&gt;The implication seems to be to work on a different project one must (System/exit 0) VM and start another VM using clj&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;You don't have to exit the existing REPL process before starting a new one. You can have however many running &lt;code&gt;clj&lt;/code&gt; instances, all inside different or the same projects.&lt;/p&gt;
&lt;p&gt;If you want to switch to a different project from within the same window, be it a terminal or some IDE or something else, then it might also be possible but then it depends on what that &quot;something&quot; is. In a terminal, people usually use &lt;code&gt;screen&lt;/code&gt; or &lt;code&gt;tmux&lt;/code&gt; for something like that, or even Ctrl+Z with &lt;code&gt;fg&lt;/code&gt; or &lt;code&gt;bg&lt;/code&gt; if you're on Linux and maybe Mac or WSL.&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;This appears to be idiomatically (colloquially) referred to as ‘restarting the REPL’ I believe?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;If it's all in the same process - yes. Although usually it means restarting a REPL within the same project, since nothing between projects conflicts with each other.&lt;br&gt;
If there's a server process for the REPL and a client process, it might mean restarting both or restarting only the server if the client can reconnect without restarting.&lt;br&gt;
But usually all the fine points are not important at all.&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;a required lisp feature, for me anyway: multiple simultaneous-concurrent (multi-threaded) REPLs, I refer to as ‘Clojure Listeners’ (‘in-process’ or ‘against the same runtime’)&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;I have never experienced or even heard of a need for that, so I'm curious what the actual use case is that isn't satisfied with multiple separate REPLs.&lt;/p&gt;
&lt;p&gt;In any case, even that is possible if you start multiple socket REPLs.&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;non-socket non-nREPL non-LSP non-network non-middleware non-multi-VM based REPL approaches&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;But why all the limitations? Do they have any purpose?&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;SEE Multiple Clojure Listeners&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;I have no idea what I'm looking at, there's very little context on that image.&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;Could easily have multi-threaded socket-based listeners . . .&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;But you said &quot;non-socket&quot; above?..&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;Clojure Listeners: multi-threaded, full history, type ahead, line editing, completion, pop-up menus, colorized output, colorized-balanced-brackets-([{, etc. Also working on other listener features: multi-line editing, enhanced source lookup, doc lookup, repo-artifact search, embeddable .e.g. in morse, etc.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;You're just describing an IDE, just with that small addition of &quot;multi-threaded REPL&quot; with a yet-unclear-to-me value add.&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;I want a fully dynamic long running VM under full clojure programmatic control.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;That's a very, very vague statement, specifically the &quot;fully dynamic&quot; part.&lt;/p&gt;
&lt;p&gt;I'm still not entirely sure what's going on here, but I feel that it might be useful to add that at least on JVM you'll have issues in your attempts to be &quot;fully dynamic&quot; in case it also means &quot;changing dependencies within the same process&quot;. There are tools to add dependencies at run time, but you cannot remove them. You cannot have two of the same things as well. And you cannot update a dependency to a version that made a breaking change and expect things to continue working exactly as they did before.&lt;/p&gt;
&lt;p&gt;With that being said an given the sheer length of your opening message and the length of the previous message, I'm absolutely certain that such a discussion is much better to be had via some more interactive medium, like Slack or Zulip. There's much less risk of getting stuck in the weeds only because you took a wrong turn, and it's much easier for both the writer and all the readers to unfold the idea piece by piece instead of having to deal with a truck load of vague info.&lt;/p&gt;
</description>
<category>Clojure CLI</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14422/programmatically-context-programmatically-switch-context?show=14423#a14423</guid>
<pubDate>Sun, 23 Feb 2025 17:34:17 +0000</pubDate>
</item>
<item>
<title>Comment edited: deps.edn support for :git/branch + :git/sha</title>
<link>https://ask.clojure.org/index.php/14400/deps-edn-support-for-git-branch-git-sha?show=14406#c14406</link>
<description>From further discussions in the Clojurians Slack: Git deps as they exist today are more intended for publishing libs and tools, not for supporting organizations with large dependency graphs of private Git repos where you really want to track a main branch and not tags (e.g. service model spec repo → backend repo → infrastructure repo update propagation).&lt;br /&gt;
&lt;br /&gt;
A workaround today would be to make all repositories have some shared structure under an imaginary &amp;quot;parent folder&amp;quot; and then use something like Git subtrees, Git submodules, or something else to assemble them all into a build directory. That way, all `deps.edn` files can use `:local/root &amp;quot;../other-dep&amp;quot;` to reference things.</description>
<category>Clojure CLI</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14400/deps-edn-support-for-git-branch-git-sha?show=14406#c14406</guid>
<pubDate>Fri, 21 Feb 2025 00:39:57 +0000</pubDate>
</item>
<item>
<title>Answered: a) how to start REPL with ‘context’ for ‘project-1 aware’? b) How to switch REPL ‘context’ to ‘project-n aware’?</title>
<link>https://ask.clojure.org/index.php/14392/start-with-context-project-aware-switch-context-project-aware?show=14394#a14394</link>
<description>&lt;p&gt;If you are using the Clojure CLI, then running &lt;code&gt;clj&lt;/code&gt; in a directory will start a repl that has &quot;project context&quot; to the project deps.edn in that directory, and that is the way that most Clojure developers (regardless of editor) create a connected repl. (Alternately, they may be using Leiningen with a project.clj, but same idea.)&lt;/p&gt;
&lt;p&gt;Typically you do not need tools.build / build.clj at all to create and work in a project until the point that you want to build and release an artifact. (Note that because the Clojure CLI / deps.edn support projects in public git repos like github, you don't necessarily ever need an artifact at all.) So I would ignore this aspect at the beginning, unless it affects your end goals.&lt;/p&gt;
&lt;p&gt;It's unclear to me what you need at this point that you don't have. Do you need help with getting a project REPL connected in Emacs?&lt;/p&gt;
</description>
<category>Clojure CLI</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14392/start-with-context-project-aware-switch-context-project-aware?show=14394#a14394</guid>
<pubDate>Wed, 19 Feb 2025 21:15:06 +0000</pubDate>
</item>
<item>
<title>Commented: Confusing error message on deps.edn wrong git/url dependency</title>
<link>https://ask.clojure.org/index.php/14283/confusing-error-message-on-deps-edn-wrong-git-url-dependency?show=14289#c14289</link>
<description>This kind of thing is usually a security measure to prevent fishing around for private repos. Private repo https authentication has gotten a lot harder in the last few years with github (for probably good reasons). You can create and use a fine-grained personal access token here as your password now (&lt;a href=&quot;https://github.com/settings/tokens?type=beta&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;https://github.com/settings/tokens?type=beta&lt;/a&gt;). But really, I'd recommend using ssh auth instead.</description>
<category>Clojure CLI</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14283/confusing-error-message-on-deps-edn-wrong-git-url-dependency?show=14289#c14289</guid>
<pubDate>Thu, 05 Dec 2024 20:21:49 +0000</pubDate>
</item>
<item>
<title>Answer selected: why does clj -X pass in options as a clojure.lang.Symbol?</title>
<link>https://ask.clojure.org/index.php/14270/why-does-clj-x-pass-in-options-as-a-clojure-lang-symbol?show=14271#a14271</link>
<description>&lt;p&gt;-X will edn/read-string each argument&lt;/p&gt;
</description>
<category>Clojure CLI</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14270/why-does-clj-x-pass-in-options-as-a-clojure-lang-symbol?show=14271#a14271</guid>
<pubDate>Tue, 26 Nov 2024 01:04:24 +0000</pubDate>
</item>
<item>
<title>Answer selected: Is there a plan to have completion for &quot;clojure&quot; command?</title>
<link>https://ask.clojure.org/index.php/14233/is-there-a-plan-to-have-completion-for-clojure-command?show=14259#a14259</link>
<description>&lt;p&gt;Would love to have completion support but it may require some planning wrt performance as it will likely require edn parsing, which implies Clojure, which implies a JVM. &lt;/p&gt;
</description>
<category>Clojure CLI</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14233/is-there-a-plan-to-have-completion-for-clojure-command?show=14259#a14259</guid>
<pubDate>Tue, 19 Nov 2024 08:31:46 +0000</pubDate>
</item>
<item>
<title>Commented: Add retries when downloading dependencies?</title>
<link>https://ask.clojure.org/index.php/12315/add-retries-when-downloading-dependencies?show=14177#c14177</link>
<description>Yes, tools.deps.git just shells out to git so if this is a credentials or timeout issue, that's what you need to fix.</description>
<category>Tools</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/12315/add-retries-when-downloading-dependencies?show=14177#c14177</guid>
<pubDate>Tue, 08 Oct 2024 20:04:18 +0000</pubDate>
</item>
<item>
<title>Answer edited: How can I make Calva use a relative path when loading a file in cljs?</title>
<link>https://ask.clojure.org/index.php/14129/how-can-make-calva-use-relative-path-when-loading-file-in-cljs?show=14133#a14133</link>
<description>&lt;p&gt;Hello. I don't think there is a way to configure that currently. You are welcome to file an issue about it. We can probably make this work.&lt;/p&gt;
&lt;p&gt;Meanwhile.&lt;/p&gt;
&lt;p&gt;Is shadow-cljs or Figwheel managing the loading of the project? If so, saving the file should load it .&lt;/p&gt;
&lt;p&gt;Also, I think you most often get away with selecting the whole file and &lt;strong&gt;evaluate selection&lt;/strong&gt;.  You can configure a keyboard shortcut like this to give yourself something quite similar to the command that doesn't work:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;  {
    &quot;command&quot;: &quot;runCommands&quot;,
    &quot;key&quot;: &quot;ctrl+alt+c ctrl+alt+enter&quot;,
    &quot;args&quot;: {
      &quot;commands&quot;: [
        &quot;editor.action.selectAll&quot;,
        &quot;calva.evaluateSelection&quot;,
        &quot;cursorUndo&quot;
      ]
    }
  },
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;You can add a &lt;code&gt;when&lt;/code&gt; clause to it to only operate on cljs files. I think it would be &lt;code&gt;resourceExtName == .cljs&lt;/code&gt;.  See &lt;a rel=&quot;nofollow&quot; href=&quot;https://code.visualstudio.com/api/references/when-clause-contexts&quot;&gt;https://code.visualstudio.com/api/references/when-clause-contexts&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;That said, it's probably fine to let it load Clojure files this way as well. You can copy the existing &lt;code&gt;when&lt;/code&gt; clause from the command in the in Keyboard Shortcuts UI.&lt;/p&gt;
</description>
<category>Calva</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14129/how-can-make-calva-use-relative-path-when-loading-file-in-cljs?show=14133#a14133</guid>
<pubDate>Thu, 26 Sep 2024 05:44:47 +0000</pubDate>
</item>
<item>
<title>Commented: clojure is not starting on databricks file system (DBFS)</title>
<link>https://ask.clojure.org/index.php/14119/clojure-is-not-starting-on-databricks-file-system-dbfs?show=14127#c14127</link>
<description>The one thing the CLI could do is to offer a way to set the place for project specific .cpcache which is **always** used if given, and not only as fallback when local dir is not writable. This would remove it's reliance on a working &amp;quot;-w&amp;quot; , which on some filesystems (at least on DBFS) is not working.</description>
<category>Tools</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14119/clojure-is-not-starting-on-databricks-file-system-dbfs?show=14127#c14127</guid>
<pubDate>Sun, 22 Sep 2024 17:59:42 +0000</pubDate>
</item>
<item>
<title>Closed: No way to specify Clojure version across all deps.edn files in a monorepo</title>
<link>https://ask.clojure.org/index.php/14112/way-specify-clojure-version-across-all-deps-files-monorepo?show=14112#q14112</link>
<description>&lt;p&gt;Suppose you have &lt;code&gt;deps.edn&lt;/code&gt; at the root and then a bunch of sub-directories with their own &lt;code&gt;deps.edn&lt;/code&gt; files.&lt;/p&gt;
&lt;p&gt;If you want to have a set of common dependencies for all of the projects, you can simply have e.g. a &lt;code&gt;common&lt;/code&gt; directory where &lt;code&gt;common/deps.edn&lt;/code&gt; specifies all of the common dependencies and all the rest of &lt;code&gt;deps.edn&lt;/code&gt; files list &lt;code&gt;common&lt;/code&gt; as one of their deps.&lt;/p&gt;
&lt;p&gt;However, that doesn't work with &lt;code&gt;org.clojure/clojure&lt;/code&gt;, making it implicitly special.&lt;/p&gt;
&lt;p&gt;As I &lt;a rel=&quot;nofollow&quot; href=&quot;https://clojurians.slack.com/archives/C03S1KBA2/p1725756729831549?thread_ts=1725754474.109679&amp;amp;cid=C03S1KBA2&quot;&gt;mentioned&lt;/a&gt; on Slack, it seems that &lt;code&gt;clojure.tools.deps/root-deps&lt;/code&gt; brings the default top-level version of &lt;code&gt;org.clojure/clojure&lt;/code&gt; and nothing else can override it but another top-level version.&lt;/p&gt;
</description>
<category>Clojure CLI</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14112/way-specify-clojure-version-across-all-deps-files-monorepo?show=14112#q14112</guid>
<pubDate>Tue, 17 Sep 2024 02:47:03 +0000</pubDate>
</item>
<item>
<title>Closed: Feature Request for Clojure CLI: Treat empty deps.edn the same way as a non-existing one</title>
<link>https://ask.clojure.org/index.php/12572/feature-request-clojure-treat-empty-deps-same-non-existing?show=12572#q12572</link>
<description>&lt;p&gt;When &lt;code&gt;clojure&lt;/code&gt; is called from a directory with an empty &lt;code&gt;deps.edn&lt;/code&gt; it exits with a non-zero value. I wonder if it could be considered to treat that situation the same as when there is no deps.edn file at all?&lt;/p&gt;
&lt;p&gt;This would be improve the Calva Ux a great deal. Calva defaults to start clojure-lsp at activation. One  activation trigger is that a Clojure file is opened. Creating a deps.edn file in VS Code will create it as an empty file which the user then can edit. When clojure-lsp starts because of the file creation, clojure is called by clojure-lsp to figure out the classpath. If the file is still empty by then, the command fails, and no clojure-lsp for the user in that session.&lt;/p&gt;
&lt;p&gt;It gets extra important for beginners with Clojure, who we want to instruct how to create a minimal deps.edn project and use a Clojure editor to connect to the REPL. As it is now the instructions get complicated.&lt;/p&gt;
</description>
<category>Clojure CLI</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/12572/feature-request-clojure-treat-empty-deps-same-non-existing?show=12572#q12572</guid>
<pubDate>Tue, 17 Sep 2024 02:45:47 +0000</pubDate>
</item>
<item>
<title>Commented: Refresh/Reload deps.edn changes in Calva + VS Code in WSL Ubuntu</title>
<link>https://ask.clojure.org/index.php/14054/refresh-reload-deps-edn-changes-in-calva-vs-code-in-wsl-ubuntu?show=14062#c14062</link>
<description>There is no command in Calva for reloading the project. With Clojure 1.12, add-libs can be used for loading a &amp;nbsp;library into the project dynamically. Generally it is what you tried to do, restarting the REPL. But of course, the project files need to be fine . I see that you found the issue there.</description>
<category>Calva</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14054/refresh-reload-deps-edn-changes-in-calva-vs-code-in-wsl-ubuntu?show=14062#c14062</guid>
<pubDate>Tue, 20 Aug 2024 05:46:58 +0000</pubDate>
</item>
<item>
<title>Answered: Using log4j-layout-template-json with Leiningen</title>
<link>https://ask.clojure.org/index.php/13968/using-log4j-layout-template-json-with-leiningen?show=13969#a13969</link>
<description>&lt;p&gt;If you depend on multiple libraries that each have their own plugins cache (the &lt;code&gt;.dat&lt;/code&gt; file), you need to merge those as part of your build process -- which is what the &lt;code&gt;log4j2-plugins-cache&lt;/code&gt; plugin is for, with Leiningen.&lt;/p&gt;
&lt;p&gt;In log4j 3.x, they plan to do away with this cache file and use something more amenable to build tooling that doesn't require custom merging like this.&lt;/p&gt;
&lt;p&gt;I had to write something similar for &lt;code&gt;tools.build&lt;/code&gt; / &lt;code&gt;build.clj&lt;/code&gt; for use with the Clojure CLI: &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/seancorfield/build-uber-log4j2-handler&quot;&gt;https://github.com/seancorfield/build-uber-log4j2-handler&lt;/a&gt;&lt;/p&gt;
</description>
<category>Leiningen</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/13968/using-log4j-layout-template-json-with-leiningen?show=13969#a13969</guid>
<pubDate>Thu, 13 Jun 2024 17:10:43 +0000</pubDate>
</item>
<item>
<title>Answer selected: install-latest does not use coords to find versions in self-hosted git</title>
<link>https://ask.clojure.org/index.php/13160/install-latest-does-not-use-coords-find-versions-self-hosted?show=13183#a13183</link>
<description>&lt;p&gt;Logged as &lt;a rel=&quot;nofollow&quot; href=&quot;https://clojure.atlassian.net/browse/TDEPS-253&quot;&gt;https://clojure.atlassian.net/browse/TDEPS-253&lt;/a&gt;&lt;/p&gt;
</description>
<category>Clojure CLI</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/13160/install-latest-does-not-use-coords-find-versions-self-hosted?show=13183#a13183</guid>
<pubDate>Thu, 06 Jun 2024 08:10:40 +0000</pubDate>
</item>
<item>
<title>Answer selected: tools.tools install-latest throws sha error with :coord  and never upgrades with :tool</title>
<link>https://ask.clojure.org/index.php/13882/tools-tools-install-latest-throws-error-coord-never-upgrades?show=13957#a13957</link>
<description>&lt;p&gt;Logged as &lt;a rel=&quot;nofollow&quot; href=&quot;https://clojure.atlassian.net/browse/TDEPS-265&quot;&gt;https://clojure.atlassian.net/browse/TDEPS-265&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Thanks!&lt;/p&gt;
</description>
<category>Clojure CLI</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/13882/tools-tools-install-latest-throws-error-coord-never-upgrades?show=13957#a13957</guid>
<pubDate>Thu, 06 Jun 2024 08:10:20 +0000</pubDate>
</item>
<item>
<title>Answer selected: Does tools.deps treat a version (e.g. 1.2.3) as a range (i.e. [1.2.3,))?</title>
<link>https://ask.clojure.org/index.php/13950/does-tools-deps-treat-a-version-e-g-1-2-3-as-a-range-i-e-1-2-3?show=13951#a13951</link>
<description>&lt;p&gt;No, tools.deps versions specify an exact version only, no ranges, no soft versions:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;$ clj -Sdeps '{:deps {org.clojure/data.json {:mvn/version &quot;2&quot;}}}' -Stree
Error building classpath. Could not find artifact org.clojure:data.json:jar:2 in central (https://repo1.maven.org/maven2/)
$ clj -Sdeps '{:deps {org.clojure/data.json {:mvn/version &quot;2.5&quot;}}}' -Stree
Error building classpath. Could not find artifact org.clojure:data.json:jar:2.5 in central (https://repo1.maven.org/maven2/)
$ clj -Sdeps '{:deps {org.clojure/data.json {:mvn/version &quot;2.5.0&quot;}}}' -Stree
org.clojure/clojure 1.11.3
  . org.clojure/spec.alpha 0.3.218
  . org.clojure/core.specs.alpha 0.2.62
org.clojure/data.json 2.5.0
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;But note of course that you only control the versions if you are the top project - transitive versions can always be overridden from above.&lt;/p&gt;
</description>
<category>Clojure CLI</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/13950/does-tools-deps-treat-a-version-e-g-1-2-3-as-a-range-i-e-1-2-3?show=13951#a13951</guid>
<pubDate>Wed, 05 Jun 2024 17:55:37 +0000</pubDate>
</item>
<item>
<title>Retagged: Combining :exec-args from multiple aliases with user-defined semantics</title>
<link>https://ask.clojure.org/index.php/13800/combining-exec-args-from-multiple-aliases-defined-semantics?show=13800#q13800</link>
<description>&lt;p&gt;I was looking for a way to invoke an nREPL server using &lt;code&gt;clojure -X&lt;/code&gt; and specify extra dependencies and middleware in separate aliases which would be composed together on the command line. &lt;/p&gt;
&lt;p&gt;For context: nREPL middleware are specified as a list of functions/runtime-resolved symbols, so ideally there would be some mechanism for each alias in the deps.edn to specify their own vector-of-middleware and have them concatenated in the order which the aliases were listed on the command line. (See below for concrete demonstration of this) &lt;/p&gt;
&lt;p&gt;Unfortunately I couldn't find a satisfactory way of achieving this via the clojure CLI - the issue is that  &lt;code&gt;:exec-args&lt;/code&gt; maps from different aliases are simply merged, with latter values overriding earlier ones.  The clojure.org reference mentions deep merging but this appears to be a doc error. &lt;/p&gt;
&lt;p&gt;(Note that the widespread use of  &lt;code&gt;-M&lt;/code&gt; for this use case does not afford any way of composing command-line string args, forcing each alias to couple together all middleware and dependencies.)&lt;/p&gt;
&lt;p&gt;Of course there shouldn't exist some magic set of semantics for merging &lt;code&gt;exec-arg&lt;/code&gt; values (vectors =&amp;gt; concat, maps =&amp;gt; merge etc.)... Nevertheless there might be a usability gap to fill here, letting users specify their own merging semantics declaratively rather than having to resort to custom-coded task runners .&lt;/p&gt;
&lt;p&gt;An example of how this would look like from the command line, given &lt;code&gt;concat&lt;/code&gt; semantics for the &lt;code&gt;:middleware&lt;/code&gt; arg:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;$ clojure -X:nrepl
Starting nREPL server with: nil

$ clojure -X:nrepl :port 1234
Starting nREPL server with: {:port 1234}

$ clojure -X:cider:nrepl :port 5678
Starting nREPL server with: {:port 5678 :middleware [cider.nrepl/cider-middleware]}

$ clojure -X:portal:cider:nrepl
Starting nREPL server with: {:middleware [portal.nrepl/wrap-portal, cider.nrepl/cider-middleware]}

$ clojure -X:cider:cljr:portal:nrepl
Starting nREPL server with: {:middleware [cider.nrepl/cider-middleware, refactor-nrepl.middleware/wrap-refactor, portal.nrepl/wrap-portal]}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;see this conversation in Slack thread for more context:&lt;br&gt;
&lt;a rel=&quot;nofollow&quot; href=&quot;https://clojurians.slack.com/archives/C6QH853H8/p1711461045176759&quot;&gt;https://clojurians.slack.com/archives/C6QH853H8/p1711461045176759&lt;/a&gt;&lt;/p&gt;
</description>
<category>Clojure CLI</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/13800/combining-exec-args-from-multiple-aliases-defined-semantics?show=13800#q13800</guid>
<pubDate>Wed, 22 May 2024 19:40:15 +0000</pubDate>
</item>
<item>
<title>Closed: clojure -X:deps aliases fails for alias-as-data</title>
<link>https://ask.clojure.org/index.php/13867/clojure-x-deps-aliases-fails-for-alias-as-data?show=13867#q13867</link>
<description>&lt;pre&gt;&lt;code&gt;(~/clojure/t)-(!2011)-&amp;gt; cat &amp;gt; deps.edn
{:aliases {:foo [&quot;some&quot; &quot;data&quot;]}}

Tue Apr 30 22:33:28
(~/clojure/t)-(!2012)-&amp;gt; clj
Clojure 1.12.0-alpha11
user=&amp;gt;

Tue Apr 30 22:33:37
(~/clojure/t)-(!2013)-&amp;gt; clojure -X:deps aliases
Execution error (ClassCastException) at clojure.tools.deps.cli.api/aliases$fn$fn (api.clj:170).
class java.lang.String cannot be cast to class java.util.Map$Entry (java.lang.String and java.util.Map$Entry are in module java.base of loader 'bootstrap')

Full report at:
/tmp/clojure-4544942395618193305.edn
&lt;/code&gt;&lt;/pre&gt;
</description>
<category>Clojure CLI</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/13867/clojure-x-deps-aliases-fails-for-alias-as-data?show=13867#q13867</guid>
<pubDate>Wed, 01 May 2024 18:32:56 +0000</pubDate>
</item>
<item>
<title>Answer selected: The clojure/clj man pages are missing the -Stree and -Spom options.</title>
<link>https://ask.clojure.org/index.php/12347/the-clojure-clj-man-pages-are-missing-the-stree-spom-options?show=12351#a12351</link>
<description>&lt;p&gt;Thanks, I've updated that for next release. FYI, these options are being phased out in preference of &lt;code&gt;-X:deps pom&lt;/code&gt; and &lt;code&gt;-X:deps tree&lt;/code&gt; which is probably why I removed them (but I don't actually remember for sure).&lt;/p&gt;
</description>
<category>Clojure CLI</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/12347/the-clojure-clj-man-pages-are-missing-the-stree-spom-options?show=12351#a12351</guid>
<pubDate>Mon, 29 Apr 2024 15:45:06 +0000</pubDate>
</item>
<item>
<title>Commented: Race condition in .cpcache directory creation</title>
<link>https://ask.clojure.org/index.php/13671/race-condition-in-cpcache-directory-creation?show=13755#c13755</link>
<description>I investigated this a bit, and it seems to me the real problem here is that Java's mkdirs does not explain why the directory could not be made. Typically the way to overcome a race for a mkdir is to check for EEXIST and if that's the error, then continue with no error, because we know that the other process won the race.&lt;br /&gt;
&lt;br /&gt;
java.nio.path.createDirectories will throw FileAlreadyExistsException when it loses the race.&lt;br /&gt;
&lt;br /&gt;
I see that other code in that repo already uses java.nio, so I guess converting from mkdirs to createDirectories would be possible.&lt;br /&gt;
&lt;br /&gt;
Hope this is helpful!</description>
<category>Clojure CLI</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/13671/race-condition-in-cpcache-directory-creation?show=13755#c13755</guid>
<pubDate>Sun, 25 Feb 2024 22:39:08 +0000</pubDate>
</item>
<item>
<title>Answer selected: Add workspace level config</title>
<link>https://ask.clojure.org/index.php/13728/add-workspace-level-config?show=13731#a13731</link>
<description>&lt;p&gt;I'm going to redirect this to a dup - please vote/comment there&lt;/p&gt;
</description>
<category>Clojure CLI</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/13728/add-workspace-level-config?show=13731#a13731</guid>
<pubDate>Thu, 15 Feb 2024 00:51:37 +0000</pubDate>
</item>
<item>
<title>Closed: Typo in  :clojure.tools.deps.specs/claspath-args</title>
<link>https://ask.clojure.org/index.php/13601/typo-in-clojure-tools-deps-specs-claspath-args?show=13601#q13601</link>
<description>&lt;p&gt;Hi Alex,&lt;/p&gt;
&lt;p&gt;I have a project in which I run tests with instrumentation turned on. The project has a dependency on tools.deps and I have the clojure.tools.deps.specs namespace loaded.&lt;/p&gt;
&lt;p&gt;When I run the tests in my project they fail with the following error:&lt;/p&gt;
&lt;p&gt;Unable to resolve spec: :clojure.tools.deps.specs/claspath-args&lt;/p&gt;
&lt;p&gt;It looks like there is a typo in a the usage of a spec here:&lt;/p&gt;
&lt;p&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/clojure/tools.deps/blob/master/src/main/clojure/clojure/tools/deps/specs.clj#L151&quot;&gt;https://github.com/clojure/tools.deps/blob/master/src/main/clojure/clojure/tools/deps/specs.clj#L151&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I think it should use the ::classpath-args spec, instead of ::claspath-args.&lt;/p&gt;
&lt;p&gt;Could you please take a look at this?&lt;/p&gt;
&lt;p&gt;Thanks, Roman.&lt;/p&gt;
</description>
<category>Clojure CLI</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/13601/typo-in-clojure-tools-deps-specs-claspath-args?show=13601#q13601</guid>
<pubDate>Tue, 16 Jan 2024 00:16:22 +0000</pubDate>
</item>
<item>
<title>Answered: Does the clojure cli have an option to include new extensions for dependency resolution?</title>
<link>https://ask.clojure.org/index.php/13477/clojure-option-include-extensions-dependency-resolution?show=13574#a13574</link>
<description>&lt;p&gt;Added &lt;a rel=&quot;nofollow&quot; href=&quot;https://ask.clojure.org/index.php/13477/clojure-option-include-extensions-dependency-resolution&quot;&gt;clj-2820&lt;/a&gt; to track this issue.&lt;/p&gt;
</description>
<category>Clojure CLI</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/13477/clojure-option-include-extensions-dependency-resolution?show=13574#a13574</guid>
<pubDate>Mon, 18 Dec 2023 23:09:14 +0000</pubDate>
</item>
<item>
<title>Commented: In tools.deps, get the source of dependencies without downloading</title>
<link>https://ask.clojure.org/index.php/13446/tools-deps-get-the-source-dependencies-without-downloading?show=13546#c13546</link>
<description>That would be useful to Nix + &lt;a href=&quot;https://github.com/jlesquembre/clj-nix&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;https://github.com/jlesquembre/clj-nix&lt;/a&gt; users too.</description>
<category>Clojure CLI</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/13446/tools-deps-get-the-source-dependencies-without-downloading?show=13546#c13546</guid>
<pubDate>Tue, 12 Dec 2023 14:10:24 +0000</pubDate>
</item>
<item>
<title>Commented: passing command line arguments to clojure via `cider-jack-in` (GNUEmacs 27.1, CIDER 1.2.0)</title>
<link>https://ask.clojure.org/index.php/12308/passing-command-arguments-clojure-cider-jack-gnuemacs-cider?show=13533#c13533</link>
<description>Cesar, you suggest using `(setq cider-clojure-clj-aliases &amp;quot;:dev&amp;quot;)` &lt;br /&gt;
When i look in the docs i only see the option `cider-clojure-cli-aliases` (so cli instead of clj)&lt;br /&gt;
&lt;br /&gt;
I think that's what we should use! Greetz</description>
<category>CIDER</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/12308/passing-command-arguments-clojure-cider-jack-gnuemacs-cider?show=13533#c13533</guid>
<pubDate>Wed, 06 Dec 2023 09:59:19 +0000</pubDate>
</item>
<item>
<title>Commented: clojure cli bug on windows</title>
<link>https://ask.clojure.org/index.php/13496/clojure-cli-bug-on-windows?show=13506#c13506</link>
<description>Not really anything Clojure side can fix, quoting is environmental interpretation that affects what the CLI sees. I have filed an issue to extend the existing quoting docs with this info (&lt;a href=&quot;https://github.com/clojure/clojure-site/issues/678&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;https://github.com/clojure/clojure-site/issues/678&lt;/a&gt;).</description>
<category>Clojure CLI</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/13496/clojure-cli-bug-on-windows?show=13506#c13506</guid>
<pubDate>Fri, 01 Dec 2023 20:29:36 +0000</pubDate>
</item>
<item>
<title>Answer selected: Is tools.build considering adding a :license argument?</title>
<link>https://ask.clojure.org/index.php/13341/is-tools-build-considering-adding-a-license-argument?show=13359#a13359</link>
<description>&lt;p&gt;tools.build v0.9.6 now includes an additional :pom-data attribute that can be used to provide license (and any other pom data) in hiccup style to put in the generated pom.&lt;/p&gt;
&lt;p&gt;Docs: &lt;a rel=&quot;nofollow&quot; href=&quot;https://clojure.github.io/tools.build/clojure.tools.build.api.html#var-write-pom&quot;&gt;https://clojure.github.io/tools.build/clojure.tools.build.api.html#var-write-pom&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Example:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;(b/write-pom
  ...
  :pom-data 
    [[:licenses
      [:license
        [:name &quot;Eclipse Public License 1.0&quot;]
        [:url &quot;https://opensource.org/license/epl-1-0/&quot;;]
        [:distribution &quot;repo&quot;]]]]) 
&lt;/code&gt;&lt;/pre&gt;
</description>
<category>Clojure CLI</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/13341/is-tools-build-considering-adding-a-license-argument?show=13359#a13359</guid>
<pubDate>Tue, 10 Oct 2023 13:32:46 +0000</pubDate>
</item>
<item>
<title>Comment edited: Test suit doesn't find function implemented in my solution</title>
<link>https://ask.clojure.org/index.php/13348/test-suit-doesnt-find-function-implemented-in-my-solution?show=13349#c13349</link>
<description>This question relies on some info that's not stated. &amp;quot;Submitted&amp;quot; - where exactly? Also note that you have asked this in the `Portal` section, but I don't see how Portal is relevant to the question.</description>
<category>Portal</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/13348/test-suit-doesnt-find-function-implemented-in-my-solution?show=13349#c13349</guid>
<pubDate>Sun, 01 Oct 2023 14:25:42 +0000</pubDate>
</item>
<item>
<title>Answer selected: clj/clojure scripts throws a stacktrace with unknown command-line argument</title>
<link>https://ask.clojure.org/index.php/13240/clojure-scripts-throws-stacktrace-unknown-command-argument?show=13271#a13271</link>
<description>&lt;p&gt;Logged as &lt;a rel=&quot;nofollow&quot; href=&quot;https://clojure.atlassian.net/browse/TDEPS-254&quot;&gt;https://clojure.atlassian.net/browse/TDEPS-254&lt;/a&gt;&lt;/p&gt;
</description>
<category>Clojure CLI</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/13240/clojure-scripts-throws-stacktrace-unknown-command-argument?show=13271#a13271</guid>
<pubDate>Sat, 16 Sep 2023 00:05:24 +0000</pubDate>
</item>
<item>
<title>Tagged literals in Clojure CLI arguments and deps.edn</title>
<link>https://ask.clojure.org/index.php/13278/tagged-literals-in-clojure-cli-arguments-and-deps-edn</link>
<description>&lt;p&gt;As it stands there is no way for the Clojure CLI to extend the reader with tagged literals for use within arguments or deps.edn.&lt;/p&gt;
&lt;p&gt;I propose that some mechanism for this should be added, which can enable additional tooling to use the intended use case of putting data within aliases in deps.edn where they otherwise would be restricted by data readers.&lt;/p&gt;
&lt;p&gt;An example of a current project which would benefit from this is Codox, which has support for regular expression based filters on namespaces to be documented, however as the default EDN reader does not include support for regular expressions, this feature is unusable.&lt;/p&gt;
&lt;p&gt;If tagged literals support was added to the Clojure CLI, this problem could be resolved by a &lt;code&gt;#jvm/regex&lt;/code&gt; tag or similar being added for that usecase.&lt;/p&gt;
&lt;p&gt;If this feature is added it should also be considered what happens when a deps.edn file or argument to the CLI includes a tagged literal which is not bound in the current invocation.&lt;/p&gt;
&lt;p&gt;There are multiple ways that support could be added to the CLI, and below I present a few of my own thoughts on the matter, but this is not a request for this to be the way that the feature is implemented, just some ideas.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Tagged literals could be added via aliases in the user deps.edn which are then used by default in all projects&lt;/li&gt;
&lt;li&gt;Tagged literals could be specified by an environment variable, which users can then set with direnv or other tooling&lt;/li&gt;
&lt;/ul&gt;
</description>
<category>Clojure CLI</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/13278/tagged-literals-in-clojure-cli-arguments-and-deps-edn</guid>
<pubDate>Tue, 12 Sep 2023 21:02:35 +0000</pubDate>
</item>
<item>
<title>Answered: Accepting &quot;-&quot; as argument to read non edn data fails with `-X` cli invocation</title>
<link>https://ask.clojure.org/index.php/13229/accepting-argument-read-non-edn-data-fails-with-invocation?show=13230#a13230</link>
<description>&lt;p&gt;Sorry, this usage is not going to work now as the clj tool itself uses - to accept args from stdin now as part of -X handling.&lt;/p&gt;
&lt;p&gt;You could still use &lt;code&gt;cat data.json | clojure -X:viscous '{:json-file -}'&lt;/code&gt; with the trailing map support.&lt;/p&gt;
</description>
<category>Clojure CLI</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/13229/accepting-argument-read-non-edn-data-fails-with-invocation?show=13230#a13230</guid>
<pubDate>Tue, 29 Aug 2023 13:44:21 +0000</pubDate>
</item>
<item>
<title>Answer selected: clojure.tools.deps/calc-basis can fail with &quot;Unable to resolve&quot; due to a version range</title>
<link>https://ask.clojure.org/index.php/13201/clojure-tools-deps-calc-basis-unable-resolve-version-range?show=13203#a13203</link>
<description>&lt;p&gt;This was caused because of the lack of :mvn/repos in my call.&lt;/p&gt;
</description>
<category>Clojure CLI</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/13201/clojure-tools-deps-calc-basis-unable-resolve-version-range?show=13203#a13203</guid>
<pubDate>Sat, 26 Aug 2023 16:13:49 +0000</pubDate>
</item>
<item>
<title>Support for binary resources and large resources via deps cli.</title>
<link>https://ask.clojure.org/index.php/13199/support-for-binary-resources-and-large-resources-via-deps-cli</link>
<description>&lt;p&gt;I've written a few libraries that depend on binary resources (eg. native shared libraries) and other libraries that have very large resources (eg. the llm weights for llama).&lt;/p&gt;
&lt;p&gt;In principle, both of these types of dependencies can be satisfied by the deps tools without any changes since the deps cli can fetch resources and add them to classpath.&lt;/p&gt;
&lt;p&gt;However, there are few additional challenges which makes using the deps cli for large and/or binary resources awkward.&lt;/p&gt;
&lt;p&gt; &lt;strong&gt;Large resources are Large&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;I've avoided using the deps machinery for large resources because there are several affordances missing:&lt;/p&gt;
&lt;p&gt; a) no yes/no prompt before downloading dependencies. &lt;/p&gt;
&lt;p&gt;It seems reasonable to download maybe 100's of megabytes of dependencies when invoking the cli, but it doesn't feel right for the cli to download gigabytes of data dependencies without asking first&lt;/p&gt;
&lt;p&gt;b) no progress indicator when downloading dependencies&lt;/p&gt;
&lt;p&gt;Downloading dependencies is usually pretty quick, but it's nice to have a progress indicator if several gigabytes of dependencies are being downloaded.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Native dependencies are often large&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Native dependencies can range from a few megabytes all the way to a gigabyte (eg. Chromium embedded framework).&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Native dependencies are platform/OS dependent&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;I think there's some maven magic that helps with this which I haven't had a chance to look into. Anyway, the artifacts required for running depend on the platform that the program is running on. Usually, it's ok to include the artifacts for all possible platforms, but that may be unnecessarily using resources and might not work in particular cases.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Shared libraries must be extracted from jars before loading&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Many ffi libraries (like JNA) will do this for you. It's implemented in an adhoc way depending on the ffi library. It may or may not work depending on whether the shared library is standalone or depends on other shared libraries.&lt;/p&gt;
&lt;p&gt;Potentially, the deps tools could help extract shared libraries using an acceptable, uniform method.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Precompiled linux shared libraries barely work&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;It's possible to precompile shared libraries for mac osx and windows with a wide range of compatibility that &quot;just work&quot;. With linux, there are lots of caveats. Generally, it seems like you can get something that mostly works if you have a standalone shared library and compile it with zig (eg. llmdb), but compatibility goes way down if there are multiple dependent shared libraries that don't use zig (eg. graphviz).&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Native dependencies should be compiled from source?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Some package managers ship precompiled binaries (eg. conda), but it seems like many package managers tend to compile from source (eg. pip, macports, homebrew, etc). &lt;/p&gt;
&lt;p&gt;Compiling from source may help with some of the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;compiling from source sidesteps many of the challenges of providing native dependencies on linux&lt;/li&gt;
&lt;li&gt;native deps could be git deps!&lt;/li&gt;
&lt;li&gt;Some devs really dislike precompiled binaries and strongly prefer compiling from source.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Obviously, supporting compiling from source has its own challenges.&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;The above covers many of the problems with large and/or binary resources. Here are some concrete use cases:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;clj-cef: wraps the chromium embedded framework. The framework itself is about 0.5-1.5gb depending on the platform and includes both shared libraries and large resource files. There's also an additional small, shared library required.&lt;/li&gt;
&lt;li&gt;clj-graphviz: wraps the graphviz c libraries. Extra tricky because there are multiple shared libraries and each shared libraries have additional dependencies (eg. libpng).&lt;/li&gt;
&lt;li&gt;llama.clj: wraps the llama.cpp library for running llms locally. It would also be nice to add specific llm weights as dependencies, but they can be very large (eg. a few gigabytes up to hundreds of gigabytes). Further, llama.cpp can be compiled with gpu support, but I haven't figured out how to do in a portable way without a compile from source option.&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;p&gt;I know there's a lot of overlap with existing tools, so maybe there's some way for the deps cli to integrate with those existing tools:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;fetching native deps: pip, conda, homebrew, macports, apt, scoop, etc.&lt;/li&gt;
&lt;li&gt;fetching data dependencies: hugging face, &lt;a rel=&quot;nofollow&quot; href=&quot;https://dvc.org/&quot;&gt;https://dvc.org/&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;p&gt;Anyway, I've made multiple attempts at finding a good approach for including native and/or large dependencies and all of the options still feel pretty awkward. &lt;/p&gt;
</description>
<category>Clojure CLI</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/13199/support-for-binary-resources-and-large-resources-via-deps-cli</guid>
<pubDate>Fri, 25 Aug 2023 00:58:32 +0000</pubDate>
</item>
<item>
<title>Comment edited: Problem with leiningen and a local library</title>
<link>https://ask.clojure.org/index.php/13157/problem-with-leiningen-and-a-local-library?show=13190#c13190</link>
<description>Thank you very much for your help.&lt;br /&gt;
&lt;br /&gt;
The reason of the problems where indeed the underscores in the filenames. I've known, that in Clojure / Clojurescript the filenames must have underscores instead of dashes. But as an old Lisp programmer I'm always using dashes instead of underscores in filenames without thinking about it.&lt;br /&gt;
But however, I tested my code in html-lib-ui with defcard and tests without any problems. It seems to me, that Clojurescript has not as much problems with dashes in filenames than Clojure.&lt;br /&gt;
Are there any linters or packages for the Emacs to get a warning about dashes in filenames?</description>
<category>Leiningen</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/13157/problem-with-leiningen-and-a-local-library?show=13190#c13190</guid>
<pubDate>Tue, 22 Aug 2023 20:17:42 +0000</pubDate>
</item>
<item>
<title>Unable to locate a Java Runtime</title>
<link>https://ask.clojure.org/index.php/13107/unable-to-locate-a-java-runtime</link>
<description>&lt;p&gt;I try to learn Clojure and follow Clojure for the Brave and True book.&lt;/p&gt;
&lt;p&gt;In &lt;code&gt;core.clj&lt;/code&gt; file, I typed &lt;code&gt;M-x cider-jack-in&lt;/code&gt; command. I see following error:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;error in process sentinel: Could not start nREPL server: The operation couldn’t be completed. Unable to locate a Java Runtime.
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;I tried both 8 and 17 versions of Java, I verified them via &lt;code&gt;which java&lt;/code&gt; and &lt;code&gt;echo $JAVA_HOME&lt;/code&gt; &lt;/p&gt;
&lt;p&gt;&lt;code&gt;Lein&lt;/code&gt; commands works by themselves.&lt;/p&gt;
&lt;p&gt;Can you help me?&lt;/p&gt;
</description>
<category>CIDER</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/13107/unable-to-locate-a-java-runtime</guid>
<pubDate>Sat, 29 Jul 2023 18:13:11 +0000</pubDate>
</item>
<item>
<title>Answered: Path to installed man pages by Clojure POSIX installer script</title>
<link>https://ask.clojure.org/index.php/13083/path-to-installed-man-pages-clojure-posix-installer-script?show=13098#a13098</link>
<description>&lt;p&gt;Added issue on the site repo here: &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/clojure/clojure-site/issues/658&quot;&gt;https://github.com/clojure/clojure-site/issues/658&lt;/a&gt;&lt;/p&gt;
</description>
<category>Clojure CLI</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/13083/path-to-installed-man-pages-clojure-posix-installer-script?show=13098#a13098</guid>
<pubDate>Tue, 25 Jul 2023 13:23:57 +0000</pubDate>
</item>
<item>
<title>Answered: make-classpath2 in tools.deps cannot be run from a directory other than the project one</title>
<link>https://ask.clojure.org/index.php/13084/make-classpath2-tools-deps-cannot-directory-other-project?show=13086#a13086</link>
<description>&lt;p&gt;This should not be considered a public api - it changes regularly in breaking ways, and using it for any directory other than the current directory is not supported (this is only called from the CLI, which assumes current directory).&lt;/p&gt;
&lt;p&gt;To programmatically make a classpath from deps.edn, you should use clojure.tools.deps/create-basis (which can specify a project deps.edn in any directory).&lt;/p&gt;
</description>
<category>Clojure CLI</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/13084/make-classpath2-tools-deps-cannot-directory-other-project?show=13086#a13086</guid>
<pubDate>Sun, 16 Jul 2023 17:59:41 +0000</pubDate>
</item>
<item>
<title>Answered: Feature request for Clojure CLI: Some way to specify OS-conditional values for :local/root in deps.edn</title>
<link>https://ask.clojure.org/index.php/13072/feature-request-clojure-specify-conditional-values-local?show=13076#a13076</link>
<description>&lt;p&gt;FWIW I would recommend just using relative paths for &lt;code&gt;:local/root&lt;/code&gt;. Absolute paths are not necessary and just makes things complicated.&lt;/p&gt;
&lt;p&gt;In my own setup I have all my projects in &lt;code&gt;~/code&lt;/code&gt;. So &lt;code&gt;~/code/project&lt;/code&gt; and &lt;code&gt;~/code/some-lib&lt;/code&gt;, in &lt;code&gt;deps.edn&lt;/code&gt; I just use &lt;code&gt;:local/root &quot;../some-lib&quot;&lt;/code&gt; from the project and everything works. Regardless of whether thats executing in WSL/Windows or whatever else.&lt;/p&gt;
&lt;p&gt;I also have setups where everything is in the same &lt;code&gt;~/code/project&lt;/code&gt; and &lt;code&gt;~/code/project/packages/some-lib&lt;/code&gt; where I again just use &lt;code&gt;:local/root &quot;packages/some-lib&quot;&lt;/code&gt; instead of the absolute path.&lt;/p&gt;
&lt;p&gt;(Most of the projects actually still use &lt;code&gt;project.clj&lt;/code&gt;, but the same method applies)&lt;/p&gt;
&lt;p&gt;If you avoid absolute paths your entire problem goes away. ;)&lt;/p&gt;
</description>
<category>Clojure CLI</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/13072/feature-request-clojure-specify-conditional-values-local?show=13076#a13076</guid>
<pubDate>Wed, 12 Jul 2023 07:49:22 +0000</pubDate>
</item>
<item>
<title>Answered: Could the CLI check for the latest stable version?</title>
<link>https://ask.clojure.org/index.php/13020/could-the-cli-check-for-the-latest-stable-version?show=13030#a13030</link>
<description>&lt;p&gt;Created ticket at &lt;a rel=&quot;nofollow&quot; href=&quot;https://clojure.atlassian.net/browse/TCLI-103&quot;&gt;https://clojure.atlassian.net/browse/TCLI-103&lt;/a&gt;&lt;/p&gt;
</description>
<category>Clojure CLI</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/13020/could-the-cli-check-for-the-latest-stable-version?show=13030#a13030</guid>
<pubDate>Wed, 21 Jun 2023 16:14:02 +0000</pubDate>
</item>
</channel>
</rss>