<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>Clojure Q&amp;A - Recent questions and answers in Tools</title>
<link>https://ask.clojure.org/index.php/qa/tools</link>
<description></description>
<item>
<title>Answered: 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=14925#a14925</link>
<description>&lt;p&gt;There is an existing enhancement jira for this at &lt;a rel=&quot;nofollow&quot; href=&quot;https://clojure.atlassian.net/browse/TDEPS-141&quot;&gt;https://clojure.atlassian.net/browse/TDEPS-141&lt;/a&gt;&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=14925#a14925</guid>
<pubDate>Sun, 08 Feb 2026 17:14:18 +0000</pubDate>
</item>
<item>
<title>Answered: 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=14902#a14902</link>
<description>&lt;p&gt;Logged as &lt;a rel=&quot;nofollow&quot; href=&quot;https://clojure.atlassian.net/browse/TDEPS-274&quot;&gt;https://clojure.atlassian.net/browse/TDEPS-274&lt;/a&gt;&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=14902#a14902</guid>
<pubDate>Mon, 26 Jan 2026 19:36:29 +0000</pubDate>
</item>
<item>
<title>Answered: Prepping -  cache invalidation</title>
<link>https://ask.clojure.org/index.php/14711/prepping-cache-invalidation?show=14712#a14712</link>
<description>&lt;p&gt;There's no general way to know if a local project's build directory is stale. In that case, you'll need to force a re-prep, either by deleting the ensure directory or by using the &lt;code&gt;:force&lt;/code&gt; flag on prep.&lt;/p&gt;
&lt;p&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://clojure.github.io/tools.deps.cli/clojure.tools.deps.cli.api-api.html#clojure.tools.deps.cli.api/prep&quot;&gt;https://clojure.github.io/tools.deps.cli/clojure.tools.deps.cli.api-api.html#clojure.tools.deps.cli.api/prep&lt;/a&gt;&lt;/p&gt;
</description>
<category>Clojure CLI</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14711/prepping-cache-invalidation?show=14712#a14712</guid>
<pubDate>Tue, 16 Sep 2025 12:53:23 +0000</pubDate>
</item>
<item>
<title>Answered: 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=14698#a14698</link>
<description>&lt;p&gt;It should be just &quot;-Djdk.attach.allowAttachSelf&quot;, without the word &quot;enabled&quot;. See &lt;a rel=&quot;nofollow&quot; href=&quot;https://nrepl.org/nrepl/installation.html#jvmti&quot;&gt;https://nrepl.org/nrepl/installation.html#jvmti&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;On the CIDER side, it is preferable to customize &lt;code&gt;cider-clojure-cli-global-aliases&lt;/code&gt; instead:&lt;br&gt;
&lt;code&gt;(setq cider-clojure-cli-global-aliases &quot;:dev&quot;)&lt;/code&gt;&lt;/p&gt;
</description>
<category>CIDER</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14697/attach-allowattachself-enabled-interrupt-cider-repl-emacs?show=14698#a14698</guid>
<pubDate>Tue, 02 Sep 2025 16:25:43 +0000</pubDate>
</item>
<item>
<title>Answered: 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:54:03 +0000</pubDate>
</item>
<item>
<title>Answered: 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:11:53 +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>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</link>
<description>&lt;p&gt;This happens basically every time I add a dependency that needs prepping. I see the error, but don't have the prep command memorized so I have to look it up. It would be very helpful if the error printed also included the command invocation for prepping, &lt;code&gt;clojure  -X:deps prep&lt;/code&gt;.&lt;/p&gt;
</description>
<category>Clojure CLI</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14581/improve-clojure-error-following-prepared-include-clojure</guid>
<pubDate>Sun, 08 Jun 2025 17:57:20 +0000</pubDate>
</item>
<item>
<title>Answered: How to uberjar without bundling source code?</title>
<link>https://ask.clojure.org/index.php/14486/how-to-uberjar-without-bundling-source-code?show=14494#a14494</link>
<description>&lt;p&gt;For those using leiningen, &lt;code&gt;:omit-source true&lt;/code&gt; will do the same trick [1].&lt;/p&gt;
&lt;p&gt;[1] &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/technomancy/leiningen/blob/master/sample.project.clj#L417&quot;&gt;https://github.com/technomancy/leiningen/blob/master/sample.project.clj#L417&lt;/a&gt;&lt;/p&gt;
</description>
<category>Clojure CLI</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14486/how-to-uberjar-without-bundling-source-code?show=14494#a14494</guid>
<pubDate>Thu, 03 Apr 2025 14:02:17 +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>Answered: 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=14403#a14403</link>
<description>&lt;p&gt;As we discussed in Slack, the intent here is to pinpoint a specific commit which is done via :git/sha with long sha. The current support for :git/tag allows you to provide a short sha and use the :git/tag as an extra check on the commit (so long sha not necessary) while also providing a human readable &quot;version&quot;.&lt;/p&gt;
&lt;p&gt;Because branches are virtual refs, change over time, and are easier to delete and recreate, they are not a suitable for verification of single short sha, and that's why we don't support them now.&lt;/p&gt;
&lt;p&gt;If you are providing long shas, you don't need :git/tag or a branch verifier at all - you could provide one now and it would just be ignored. If you wanted to use an external process to trigger an external sha update process, you could, all of that is compatible with existing deps.edn.&lt;/p&gt;
&lt;p&gt;I'm not sure about the nuances of what you are proposing re auto update. I guess there are distinct aspects encoded currently:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;what &quot;versions&quot; are considered (current answer: tagged)&lt;/li&gt;
&lt;li&gt;how to order those versions (current answer: most descendant sha = &quot;newer&quot;)&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;It sounds like you are proposing a new strategy for #1 that would involve &quot;commits on a branch but not on some kinds of sub branches&quot;. I'm not sure how to make that generically viable but happy to hear ideas. #2 seems same as currently used.&lt;/p&gt;
</description>
<category>Clojure CLI</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14400/deps-edn-support-for-git-branch-git-sha?show=14403#a14403</guid>
<pubDate>Thu, 20 Feb 2025 17:55:42 +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>Answered: 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=14285#a14285</link>
<description>&lt;p&gt;There's really a stack of things here...&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;Cloning: &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/MISSPELLED-ORG-OR-REPO-PATH&quot;&gt;https://github.com/MISSPELLED-ORG-OR-REPO-PATH&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Is an informational message from tools.gitlibs, I think that's ok.&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;Error building classpath. Unable to clone /home/user/.gitlibs/_repos/https/github.com/MISSPELLED-ORG-OR-REPO-PATH&lt;br&gt;
fatal: could not read Username for '&lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com&quot;&gt;https://github.com&lt;/a&gt;': terminal prompts disabled&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;This is actually an error turducken combining info from three places:&lt;br&gt;
1. &quot;Error building classpath&quot; is from the Clojure CLI catching an unexpected error floating out of classpath construction - it doesn't know what happened, just something bad, so very generic.&lt;br&gt;
2. The &quot;Unable to clone &quot; part is from tools.gitlibs when it gets an error from shelling out to git,and I agree that it would make more sense to list at least the git url or maybe both url and path there (can be errors with read/write perms on the path too). I will update that for next release.&lt;br&gt;
3. The &quot;fatal: ...&quot; is from git itself basically saying that it tried to authenticate a repository url (https so http auth) but terminal prompts are disabled so it could not do that. I think you will get better errors if you are authenticated about invalid repo at that point.&lt;/p&gt;
&lt;p&gt;I am curious what you see for &lt;code&gt;echo $GIT_TERMINAL_PROMPT&lt;/code&gt; before the CLI call - is this set to 0 in your environment for some reason?&lt;/p&gt;
&lt;p&gt;Similarly, if you can authenticate to github before running the CLI command, you should be seeing either success or a better error.&lt;/p&gt;
&lt;p&gt;You can replicate this scenario at the terminal by:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Logging out of github: &lt;code&gt;gh auth logout&lt;/code&gt; (presumably you are already logged out here).&lt;/li&gt;
&lt;li&gt;Turning off terminal prompts: &lt;code&gt;export GIT_TERMINAL_PROMPT=0&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Issuing the command: &lt;code&gt;git clone --quiet --mirror https://github.com/ANY-ORG/ANY-REPO foo&lt;/code&gt;:&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;fatal: could not read Username for '&lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com&quot;&gt;https://github.com&lt;/a&gt;': terminal prompts disabled&lt;/p&gt;
</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=14285#a14285</guid>
<pubDate>Thu, 05 Dec 2024 17:05:52 +0000</pubDate>
</item>
<item>
<title>Answered: 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>Mon, 25 Nov 2024 21:16:56 +0000</pubDate>
</item>
<item>
<title>Answered: 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>Mon, 18 Nov 2024 16:20:30 +0000</pubDate>
</item>
<item>
<title>Answered: 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>Tue, 24 Sep 2024 19:04:20 +0000</pubDate>
</item>
<item>
<title>Answered: 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=14122#a14122</link>
<description>&lt;p&gt;Sounds like a DataBricks issue?&lt;/p&gt;
</description>
<category>Tools</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14119/clojure-is-not-starting-on-databricks-file-system-dbfs?show=14122#a14122</guid>
<pubDate>Thu, 19 Sep 2024 20:15:26 +0000</pubDate>
</item>
<item>
<title>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</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</guid>
<pubDate>Sun, 15 Sep 2024 19:46:47 +0000</pubDate>
</item>
<item>
<title>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</link>
<description>&lt;p&gt;Hi, I am new to Clojure and am following &lt;a rel=&quot;nofollow&quot; href=&quot;https://www.youtube.com/watch?v=LqVyP_EGKqw&amp;amp;list=PLRGAFpvDgm2ylbXYIjvu3kI426zAP_Lqc&amp;amp;index=1&quot;&gt;this tutorial&lt;/a&gt; to make a Clojure API. This uses Cursive plugin in IntelliJ, but I am using Calva in VS Code.&lt;/p&gt;
&lt;p&gt;This is my project structure: &lt;/p&gt;
&lt;pre&gt;&lt;code&gt; .
├── deps.edn
├── resources
│   └── config.edn
└── src
    └── clojure_api
        ├── config.clj
        └── core.clj
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;My &lt;code&gt;config.clj&lt;/code&gt; file contents:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;(ns clojure-api.config
    (:require [aero.core :as aero]
            [clojure.java.io :as io]))

(defn read-config []
  (-&amp;gt; &quot;config.edn&quot;
      (io/resource)
      (aero/read-config)))
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;I changed my deps.edn file to add the paths &lt;code&gt;src&lt;/code&gt; &amp;amp; &lt;code&gt;resources&lt;/code&gt; like this:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;{:deps {aero/aero {:mvn/version &quot;1.1.6&quot;}} :path [&quot;resources&quot; &quot;src&quot;]}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;while keeping the &lt;code&gt;config.edn&lt;/code&gt; file an empty map: &lt;code&gt;{}&lt;/code&gt;. However, I could not read the config file from &lt;code&gt;read-config&lt;/code&gt; function in &lt;code&gt;config.clj&lt;/code&gt;. It gave this error in Calva repl: &lt;/p&gt;
&lt;pre&gt;&lt;code&gt;; Execution error (IllegalArgumentException) at aero.core/read-config-into-tagged-literal (core.cljc:194).
; Cannot open &amp;lt;nil&amp;gt; as a Reader.
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The tutorial &lt;a rel=&quot;nofollow&quot; href=&quot;https://youtu.be/LqVyP_EGKqw?list=PLRGAFpvDgm2ylbXYIjvu3kI426zAP_Lqc&amp;amp;t=421&quot;&gt;solved this error&lt;/a&gt; in Cursive by refreshing the project structure. I cannot seem to find any such commands in Calva. How can I update/refresh my project structure in Calva so that the &lt;code&gt;deps.edn&lt;/code&gt; changes are reflected in the repl?&lt;/p&gt;
&lt;p&gt;I have tried to restart the repl, reopening the folder in VS code, shuffling the &lt;code&gt;resources&lt;/code&gt; directory around to no avail.&lt;/p&gt;
&lt;p&gt;I could not find related answers to this problem after googling, so any help will be appreciated. &lt;/p&gt;
</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</guid>
<pubDate>Mon, 19 Aug 2024 15:16:49 +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>Answered: 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>Wed, 05 Jun 2024 19:36:01 +0000</pubDate>
</item>
<item>
<title>Answered: 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:51:22 +0000</pubDate>
</item>
<item>
<title>Answered: 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=13901#a13901</link>
<description>&lt;p&gt;Logged as &lt;a rel=&quot;nofollow&quot; href=&quot;https://clojure.atlassian.net/browse/TDEPS-264&quot;&gt;https://clojure.atlassian.net/browse/TDEPS-264&lt;/a&gt;&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=13901#a13901</guid>
<pubDate>Wed, 22 May 2024 19:46:51 +0000</pubDate>
</item>
<item>
<title>Answered: 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=13900#a13900</link>
<description>&lt;p&gt;Logged here: &lt;a rel=&quot;nofollow&quot; href=&quot;https://clojure.atlassian.net/browse/TDEPS-263&quot;&gt;https://clojure.atlassian.net/browse/TDEPS-263&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=13900#a13900</guid>
<pubDate>Wed, 22 May 2024 19:39:53 +0000</pubDate>
</item>
<item>
<title>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</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</guid>
<pubDate>Wed, 01 May 2024 05:35:46 +0000</pubDate>
</item>
<item>
<title>Answered: 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>Wed, 14 Feb 2024 23:46:16 +0000</pubDate>
</item>
<item>
<title>Answered: Race condition in .cpcache directory creation</title>
<link>https://ask.clojure.org/index.php/13671/race-condition-in-cpcache-directory-creation?show=13727#a13727</link>
<description>&lt;p&gt;We have a ticket for this in &lt;a rel=&quot;nofollow&quot; href=&quot;https://clojure.atlassian.net/browse/TDEPS-250&quot;&gt;https://clojure.atlassian.net/browse/TDEPS-250&lt;/a&gt;&lt;/p&gt;
</description>
<category>Clojure CLI</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/13671/race-condition-in-cpcache-directory-creation?show=13727#a13727</guid>
<pubDate>Wed, 14 Feb 2024 18:07:45 +0000</pubDate>
</item>
<item>
<title>Answered: 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=13603#a13603</link>
<description>&lt;p&gt;Fixed and released in tools.deps 0.18.1398.&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=13603#a13603</guid>
<pubDate>Thu, 04 Jan 2024 19:53:20 +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>Answered: clojure cli bug on windows</title>
<link>https://ask.clojure.org/index.php/13496/clojure-cli-bug-on-windows?show=13497#a13497</link>
<description>&lt;p&gt;The Clojure CLI reference talks about the quoting issues on Windows:&lt;/p&gt;
&lt;p&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://clojure.org/reference/deps_and_cli#quoting&quot;&gt;https://clojure.org/reference/deps_and_cli#quoting&lt;/a&gt;&lt;/p&gt;
</description>
<category>Clojure CLI</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/13496/clojure-cli-bug-on-windows?show=13497#a13497</guid>
<pubDate>Wed, 29 Nov 2023 06:14:49 +0000</pubDate>
</item>
<item>
<title>Answered: 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=13464#a13464</link>
<description>&lt;p&gt;I added &lt;a rel=&quot;nofollow&quot; href=&quot;https://clojure.atlassian.net/browse/TDEPS-257&quot;&gt;https://clojure.atlassian.net/browse/TDEPS-257&lt;/a&gt; for resolving without artifact downloads (poms etc of course will need to be downloaded).&lt;/p&gt;
&lt;p&gt;Once resolved to a list of lib/coords, the existing &lt;a rel=&quot;nofollow&quot; href=&quot;https://clojure.github.io/tools.deps/#clojure.tools.deps/lib-location&quot;&gt;https://clojure.github.io/tools.deps/#clojure.tools.deps/lib-location&lt;/a&gt; api can tell you location without procuring.&lt;/p&gt;
</description>
<category>Clojure CLI</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/13446/tools-deps-get-the-source-dependencies-without-downloading?show=13464#a13464</guid>
<pubDate>Tue, 14 Nov 2023 14:09:42 +0000</pubDate>
</item>
<item>
<title>Answered: 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>Fri, 06 Oct 2023 21:00:44 +0000</pubDate>
</item>
<item>
<title>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</link>
<description>&lt;p&gt;I have submitted a solution to the &lt;code&gt;bird watcher&lt;/code&gt; problem, and the test suit complains that it doesn't find the function &lt;code&gt;day-without-birds&lt;/code&gt;. Visual Studio Code is able to import it and run it from another file.&lt;/p&gt;
&lt;p&gt;The full implementation of the solution is as follows:&lt;/p&gt;
&lt;p&gt;Solution&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;(ns bird-watcher)

 (def last-week [0 2 5 3 7 8 4])

 (defn last_position [v]
   (- (clojure.core/count v) 1))

 (defn today [birds]
   (get birds (last_position birds)))

(defn inc-bird [birds]
  (assoc birds (last_position birds)  (+ (today birds) 1)))

(defn day-without-birds
  [birds]
  (loop [y birds]
    (let [[x &amp;amp; rest] y]
      (if (= x 0)
        true
        (if (empty? rest)
          false
          (recur rest))))))
 
 

(defn n-days-count [birds n]
  (reduce + (take n birds)))

(defn busy [day]
  (if (&amp;gt; day 5)
    1
    0))

(defn busy-days [birds]
  (reduce + (map busy birds)))

(defn odd-week-internal
  [birds x]
  (loop [y birds
         target x]
    (let [[x &amp;amp; rest] y
          target (- 1 target)]
      (if (= x target)
        (if (empty? rest)
          true
          (recur rest target))
        false))))

(defn odd-week [birds]
  (odd-week-internal birds 0))
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Thank you in advance!&lt;/p&gt;
</description>
<category>Portal</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/13348/test-suit-doesnt-find-function-implemented-in-my-solution</guid>
<pubDate>Sun, 01 Oct 2023 14:05:15 +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: 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>Thu, 07 Sep 2023 14:33:19 +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>Answered: 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 13:54:58 +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>Answered: 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>Tue, 22 Aug 2023 02:17:34 +0000</pubDate>
</item>
<item>
<title>Answered: Problem with leiningen and a local library</title>
<link>https://ask.clojure.org/index.php/13157/problem-with-leiningen-and-a-local-library?show=13161#a13161</link>
<description>&lt;p&gt;Your setup is uncommon, therefore it is kinda hard to figure out what you expect to happen or why you'd want typically development only files in the .jar.&lt;/p&gt;
&lt;p&gt;In common Clojure(Script) setups libraries only contain their source code, and no compiled artifacts. Actual projects then use those libraries to build what they need.&lt;/p&gt;
&lt;p&gt;There can still be CLJS builds in the library as well, but those would only be relevant for the development of that library, and not part of the actual published outputs.&lt;/p&gt;
&lt;p&gt;If for some reason you don't want this and prefer to keep the build in the library, then the only relevant file the project should include in the &lt;code&gt;.jar&lt;/code&gt; is the &lt;code&gt;.js&lt;/code&gt; file produced by the &lt;code&gt;prod&lt;/code&gt; build. Which is likely defined in a &lt;code&gt;prod.edn&lt;/code&gt; in the project. It likely only produces one output file. The files you complained about missing are development files, and should no longer be relevant.&lt;/p&gt;
&lt;p&gt;Your project also seems to be a little stitched together since there are still remnants of what probably used to be &lt;code&gt;lein-cljsbuild&lt;/code&gt; config, yet also some newer &lt;code&gt;figwheel.main&lt;/code&gt; references. You probably want to clean that up so it is easier to figure out what is actually going on.&lt;/p&gt;
&lt;p&gt;I'm also not sure about the use of &lt;code&gt;lein-localrepo&lt;/code&gt;. A simpler &lt;code&gt;lein install&lt;/code&gt; should achieve the same, if the goal is using the local installed library from the project. Not sure what else &lt;code&gt;localrepo&lt;/code&gt; does exactly.&lt;/p&gt;
</description>
<category>Leiningen</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/13157/problem-with-leiningen-and-a-local-library?show=13161#a13161</guid>
<pubDate>Wed, 16 Aug 2023 08:52:08 +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>
<item>
<title>Answered: proper XDG support</title>
<link>https://ask.clojure.org/index.php/12911/proper-xdg-support?show=12981#a12981</link>
<description>&lt;p&gt;The question continues to be: how could the Clojure CLI definitively know that you wish to use XDG configuration options. If there is a definitive answer to that question, I'd be happy to use that to select this behavior. We're not going to change that to be the default.&lt;/p&gt;
&lt;p&gt;Another option would be to have a Clojure CLI specific environment variable that you could set to do that (but you're going to have to take that action).&lt;/p&gt;
</description>
<category>Tools</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/12911/proper-xdg-support?show=12981#a12981</guid>
<pubDate>Tue, 30 May 2023 16:59:05 +0000</pubDate>
</item>
<item>
<title>Answered: Shutdown Morse Gracefully?</title>
<link>https://ask.clojure.org/index.php/12910/shutdown-morse-gracefully?show=12978#a12978</link>
<description>&lt;p&gt;As long as you don't hold any references to the UI yourself, then when you close the Morse window it should be released by the FX toolkit and eligible for garbage collection.&lt;/p&gt;
</description>
<category>Morse</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/12910/shutdown-morse-gracefully?show=12978#a12978</guid>
<pubDate>Tue, 30 May 2023 15:45:12 +0000</pubDate>
</item>
<item>
<title>Answered: clojure.tools.deps.cli.api/find-versions yields empty result for git-lib when offline</title>
<link>https://ask.clojure.org/index.php/12877/clojure-tools-deps-find-versions-yields-empty-result-offline?show=12973#a12973</link>
<description>&lt;p&gt;Logged as &lt;a rel=&quot;nofollow&quot; href=&quot;https://clojure.atlassian.net/browse/TDEPS-248&quot;&gt;https://clojure.atlassian.net/browse/TDEPS-248&lt;/a&gt;&lt;/p&gt;
</description>
<category>Clojure CLI</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/12877/clojure-tools-deps-find-versions-yields-empty-result-offline?show=12973#a12973</guid>
<pubDate>Tue, 30 May 2023 14:27:47 +0000</pubDate>
</item>
<item>
<title>Answered: incorrect test?  clojure.tools.deps.test-deps/test-dep-choice</title>
<link>https://ask.clojure.org/index.php/12951/incorrect-test-clojure-tools-deps-test-deps-test-dep-choice?show=12952#a12952</link>
<description>&lt;p&gt;Thanks, fixed&lt;/p&gt;
</description>
<category>Clojure CLI</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/12951/incorrect-test-clojure-tools-deps-test-deps-test-dep-choice?show=12952#a12952</guid>
<pubDate>Thu, 18 May 2023 12:43:48 +0000</pubDate>
</item>
<item>
<title>Answered: Clojure CLI has a way to specify namespace to REPL like Leiningen :init-ns?</title>
<link>https://ask.clojure.org/index.php/12869/clojure-cli-has-specify-namespace-repl-like-leiningen-init?show=12909#a12909</link>
<description>&lt;p&gt;There is no need to introduce code into any tooling to switch namespaces when starting a REPL.&lt;/p&gt;
&lt;p&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://practical.li/clojure/clojure-cli/repl-startup/&quot;&gt;Defining a custom &lt;code&gt;user&lt;/code&gt; namespace&lt;/a&gt; has been a long standing approach to managing component lifecycle (start, stop, restart) during development that is not editor, tool or component library dependant, i.e. it works with everything.&lt;/p&gt;
&lt;p&gt;Create a &lt;code&gt;dev/user.clj&lt;/code&gt; file in the project that defines a &lt;code&gt;user&lt;/code&gt; namespace.  Code in this namespace is loaded during REPL startup, unless it is in &lt;code&gt;comment&lt;/code&gt; forms.&lt;/p&gt;
&lt;p&gt;The repl starts in the &lt;code&gt;user&lt;/code&gt; namespace, so functions defined in &lt;code&gt;dev/user.clj&lt;/code&gt; are immediately available without having to switch to a different namespace or use fully qualified names.&lt;/p&gt;
&lt;p&gt;Defining functions that manage components in the custom &lt;code&gt;dev/user.clj&lt;/code&gt; &lt;code&gt;user&lt;/code&gt; namespace makes them immediately available in the default namespace used by the REPL.&lt;/p&gt;
&lt;p&gt;The added benefit of this approach is cleaner code and a clear separation between development support code and production code.&lt;/p&gt;
&lt;p&gt;Libraries such as component repl and integrant repl can be included via a Clojure CLI alias, so they are not adding weight to CI workflow and the resulting deployed uberjar.&lt;/p&gt;
&lt;p&gt;The custom &lt;code&gt;user&lt;/code&gt; namespace contains the require statements for component repl (or other develop-time component libraries like &lt;a rel=&quot;nofollow&quot; href=&quot;https://practical.li/clojure-web-services/service-repl-workflow/integrant-repl/&quot;&gt;Integrant REPL&lt;/a&gt;)&lt;/p&gt;
&lt;p&gt;Personally I use this &lt;a rel=&quot;nofollow&quot; href=&quot;https://practical.li/clojure/clojure-cli/repl-reloaded/&quot;&gt;approach for launching a range of supporting development tools&lt;/a&gt;, regardless of it being Leiningen or Clojure CLI project.&lt;/p&gt;
&lt;p&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://practical.li/clojure/clojure-cli/repl-startup/&quot;&gt;Practicalli Custom REPL Startup&lt;/a&gt; details the general approach&lt;/p&gt;
&lt;p&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://practical.li/clojure/clojure-cli/repl-reloaded/&quot;&gt;Practicalli REPL Reloaded&lt;/a&gt; details the specific development tooling I use (portal, hotload, namespace reload, event logging, etc)&lt;/p&gt;
&lt;p&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/practicalli/project-templates&quot;&gt;Practicalli Project Templates&lt;/a&gt; provides production level templates for seancorfiled/deps-new which include a &lt;code&gt;dev/user.clj&lt;/code&gt; custom &lt;code&gt;user&lt;/code&gt; namespace, the &lt;code&gt;practicalli/service&lt;/code&gt; template included Integrant REPL example with aero&lt;/p&gt;
</description>
<category>Clojure CLI</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/12869/clojure-cli-has-specify-namespace-repl-like-leiningen-init?show=12909#a12909</guid>
<pubDate>Fri, 28 Apr 2023 13:35:16 +0000</pubDate>
</item>
</channel>
</rss>