<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>Clojure Q&amp;A - Recent questions tagged tools.deps</title>
<link>https://ask.clojure.org/index.php/tag/tools.deps</link>
<description></description>
<item>
<title>Concurrency bug in tools.deps use of Aether/Maven libs?</title>
<link>https://ask.clojure.org/index.php/15192/concurrency-bug-in-tools-deps-use-of-aether-maven-libs</link>
<description>&lt;p&gt;Occasionally, I've been seeing this error:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;[org.eclipse.aether.internal.impl.DefaultTrackingFileManager] [] {} Failed to read tracking file '/home/sean/.m2/repository/org/apache/maven/maven/3.8.8/_remote.repositories'
java.nio.channels.ClosedChannelException&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;which leads to&lt;/p&gt;
&lt;p&gt;&lt;code&gt;Expected HashMap$TreeNode, but was given HashMap$Node, at java.util.HashMap$TreeNode/moveRootToFront (HashMap.java:2020) - runtime error (unexpected type).&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;And the only solution seems to be to blow away part of the &lt;code&gt;~/.m2/repository&lt;/code&gt; and use &lt;code&gt;-Sforce&lt;/code&gt; to recompute/redownload.&lt;/p&gt;
&lt;p&gt;Any idea what might cause this sort of error? (Windows/WSL2, Ubuntu 20.04, all the very latest CLI/Clojure etc). See Slack thread for more discussion: &lt;a rel=&quot;nofollow&quot; href=&quot;https://clojurians.slack.com/archives/C6QH853H8/p1784653752175769&quot;&gt;https://clojurians.slack.com/archives/C6QH853H8/p1784653752175769&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;More of the stacktrace:&lt;br&gt;
&lt;code&gt;`&lt;/code&gt;&lt;br&gt;
at java.base/sun.nio.ch.FileChannelImpl.ensureOpen(FileChannelImpl.java:169)&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;    at java.base/sun.nio.ch.FileChannelImpl.lock(FileChannelImpl.java:1676)
    at org.eclipse.aether.internal.impl.DefaultTrackingFileManager.fileLock(DefaultTrackingFileManager.java:171)
    at org.eclipse.aether.internal.impl.DefaultTrackingFileManager.read(DefaultTrackingFileManager.java:65)
    at org.eclipse.aether.internal.impl.EnhancedLocalRepositoryManager.readRepos(EnhancedLocalRepositoryManager.java:220)
    at org.eclipse.aether.internal.impl.EnhancedLocalRepositoryManager.checkFind(EnhancedLocalRepositoryManager.java:151)
    at org.eclipse.aether.internal.impl.EnhancedLocalRepositoryManager.find(EnhancedLocalRepositoryManager.java:128)
    at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:360)
    at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:261)
    at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifact(DefaultArtifactResolver.java:243)
    at org.apache.maven.repository.internal.DefaultModelResolver.resolveModel(DefaultModelResolver.java:158)
    at org.apache.maven.repository.internal.DefaultModelResolver.resolveModel(DefaultModelResolver.java:204)
    at org.apache.maven.model.building.DefaultModelBuilder.readParentExternally(DefaultModelBuilder.java:1035)
    at org.apache.maven.model.building.DefaultModelBuilder.readParent(DefaultModelBuilder.java:827)
    at org.apache.maven.model.building.DefaultModelBuilder.build(DefaultModelBuilder.java:336)
    at org.apache.maven.model.building.DefaultModelBuilder.build(DefaultModelBuilder.java:248)
    at org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.loadPom(DefaultArtifactDescriptorReader.java:293)
    at org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.readArtifactDescriptor(DefaultArtifactDescriptorReader.java:183)
    at org.eclipse.aether.internal.impl.DefaultRepositorySystem.readArtifactDescriptor(DefaultRepositorySystem.java:269)
    at clojure.tools.deps.extensions.maven$read_descriptor.invokeStatic(maven.clj:117)
    at clojure.tools.deps.extensions.maven$read_descriptor.invoke(maven.clj:108)
    at clojure.tools.deps.extensions.maven$eval61086$fn__61087.invoke(maven.clj:148)
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;code&gt;`&lt;/code&gt;&lt;/p&gt;
</description>
<category>tools.deps</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/15192/concurrency-bug-in-tools-deps-use-of-aether-maven-libs</guid>
<pubDate>Tue, 21 Jul 2026 18:08:46 +0000</pubDate>
</item>
<item>
<title>How to access non-jar artifacts (aar, zip) downloaded via tools.deps in build.clj?</title>
<link>https://ask.clojure.org/index.php/14862/how-access-non-jar-artifacts-aar-downloaded-tools-deps-build</link>
<description>&lt;p&gt;I want to access an aar/zip artifact in build.clj that's already downloaded via deps.edn:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;{:deps
 {com.newrelic.agent.android/android-agent {:local/root &quot;build/jars/android-agent.jar&quot;
                                            :doc        &quot;extracted from aar&quot;}
  com.newrelic.agent.java/newrelic-api     {:local/root &quot;build/jars/newrelic-api.jar&quot;
                                            :doc        &quot;extracted from newrelic-java.zip&quot;}}
 :aliases
 {:build {:deps       {io.github.clojure/tools.build            {:mvn/version &quot;0.10.11&quot;}
                       com.newrelic.agent.java/newrelic-java    {:mvn/version &quot;8.25.1&quot;
                                                                 :extension   &quot;zip&quot;}
                       com.newrelic.agent.android/android-agent {:mvn/version &quot;7.6.14&quot;
                                                                 :extension   &quot;aar&quot;}}
          :ns-default build}}}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;In build.clj I need to unpack this zip and extract a jar from it.&lt;br&gt;
And I don't have to hardcode .m2 paths or duplicate the version.&lt;/p&gt;
&lt;p&gt;How can it be done?&lt;/p&gt;
&lt;p&gt;See &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/clojure/tools.deps/blob/46661e929ab702d0ee532188edb58d06b39cef6c/src/main/clojure/clojure/tools/deps/extensions/maven.clj#L172&quot;&gt;https://github.com/clojure/tools.deps/blob/46661e929ab702d0ee532188edb58d06b39cef6c/src/main/clojure/clojure/tools/deps/extensions/maven.clj#L172&lt;/a&gt;&lt;/p&gt;
</description>
<category>tools.deps</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14862/how-access-non-jar-artifacts-aar-downloaded-tools-deps-build</guid>
<pubDate>Wed, 24 Dec 2025 08:55:46 +0000</pubDate>
</item>
<item>
<title>Prepping -  cache invalidation</title>
<link>https://ask.clojure.org/index.php/14711/prepping-cache-invalidation</link>
<description>&lt;p&gt;Following the existing example:&lt;/p&gt;
&lt;p&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://clojure.org/reference/clojure_cli#deps_prep&quot;&gt;https://clojure.org/reference/clojure_cli#deps_prep&lt;/a&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;{:paths [&quot;src&quot; &quot;target/classes&quot;]
 :deps/prep-lib
 {:ensure &quot;target/classes&quot;
  :alias :build
  :fn compile-java}}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;How does one control cache invalidation? i.e. if any .java file has been added or modified, a compilation should be re-triggered.&lt;/p&gt;
&lt;p&gt;The linked doc says:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;:ensure - directory existence determines whether prep is needed&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;It seems to me that &lt;em&gt;only&lt;/em&gt; the existence of a directory may not be sufficient to determine if a lib is 'prepped?' One might want to add a custom function, for instance.&lt;/p&gt;
&lt;p&gt;This use case is particularly painful in monorepos, where a given sub-project may depend on a sibling project's java classes.&lt;/p&gt;
&lt;p&gt;There's the option of wrapping things with babashka, which worked well for me, however it is surprising that standalone tools.deps appeared to be insufficient for this use case.&lt;/p&gt;
</description>
<category>Clojure CLI</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14711/prepping-cache-invalidation</guid>
<pubDate>Tue, 16 Sep 2025 10:31:56 +0000</pubDate>
</item>
<item>
<title>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</link>
<description>&lt;pre&gt;&lt;code&gt;&amp;gt; clojure -X:deps help/doc :fn mvn-install
-------------------------
clojure.tools.deps.cli.api/mvn-install
([{:keys [jar pom lib version classifier local-repo]}])
  Install a jar and pom to the Maven local cache.
  The pom file must either be supplied, or generated based
  on provided lib/version/classifier, or provided inside the jar.
  The group/artifact/version coordinate will be pulled from the
  pom source as above.

  Required:
    :jar (reqired) - path to jar file (embedded pom used by default)
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Should be &lt;code&gt;:jar (required)&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;In addition, further on in the docstring:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;  Execute ad-hoc:
    clj -X:deps mvn/install :jar '&quot;foo-1.2.3.jar&quot;'
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;That should be &lt;code&gt;mvn-install&lt;/code&gt;, not &lt;code&gt;mvn/install&lt;/code&gt;.&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</guid>
<pubDate>Sat, 09 Aug 2025 15:57:48 +0000</pubDate>
</item>
<item>
<title>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</link>
<description>&lt;p&gt;When Maven versions include pre-releases, &lt;code&gt;find-versions&lt;/code&gt; seems to sort correctly:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&amp;gt; clojure -X:deps find-versions :lib hiccup/hiccup
Downloading: hiccup/hiccup/maven-metadata.xml from clojars
{:mvn/version &quot;2.0.0-alpha1&quot;}
{:mvn/version &quot;2.0.0-alpha2&quot;}
{:mvn/version &quot;2.0.0-RC1&quot;}
{:mvn/version &quot;2.0.0-RC2&quot;}
{:mvn/version &quot;2.0.0-RC3&quot;}
{:mvn/version &quot;2.0.0-RC4&quot;}
{:mvn/version &quot;2.0.0-RC5&quot;}
{:mvn/version &quot;2.0.0&quot;}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;However, when a library is git-only with tags and pre-releases exist, they seem to be alpha-sorted instead:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&amp;gt; clojure -X:deps find-versions :lib io.github.seancorfield/deps-new
{:git/tag &quot;v0.7.1-rc&quot;, :git/sha &quot;5a6168d&quot;}
{:git/tag &quot;v0.8.0&quot;, :git/sha &quot;2f96530&quot;}
{:git/tag &quot;v0.8.1&quot;, :git/sha &quot;2859baf&quot;}
{:git/tag &quot;v0.9.0&quot;, :git/sha &quot;da2f764&quot;}
{:git/tag &quot;v0.9.0-rc&quot;, :git/sha &quot;b32e0f2&quot;}
{:git/tag &quot;v0.10.0&quot;, :git/sha &quot;20e82f8&quot;}
{:git/tag &quot;v0.10.1&quot;, :git/sha &quot;a90029c&quot;}
{:git/tag &quot;v0.10.1-rc&quot;, :git/sha &quot;35159b5&quot;}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Those &lt;code&gt;-rc&lt;/code&gt; versions should sort &lt;em&gt;before&lt;/em&gt; the full release.&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</guid>
<pubDate>Sat, 09 Aug 2025 14:04:34 +0000</pubDate>
</item>
<item>
<title>`create-basis` silently accepts missing aliases</title>
<link>https://ask.clojure.org/index.php/14584/create-basis-silently-accepts-missing-aliases</link>
<description>&lt;p&gt;In &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/clojars/clojars-web/commit/baade8967c7be8abd9a9b27499c511efd41f6164&quot;&gt;this scenario&lt;/a&gt;, the alias for &lt;code&gt;create-basis&lt;/code&gt; was incorrect, preventing security deps overrides from being applied. For 2 years clojars was deployed with these vulnerable deps.&lt;/p&gt;
&lt;p&gt;In this case, I proposed &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/clojars/clojars-web/pull/906&quot;&gt;to inline the alias&lt;/a&gt; into &lt;code&gt;:deps&lt;/code&gt;. However there may be other scenarios where a tools.deps change might be helpful to catch these mistakes earlier, for example a warning or error.&lt;/p&gt;
</description>
<category>tools.deps</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14584/create-basis-silently-accepts-missing-aliases</guid>
<pubDate>Tue, 10 Jun 2025 00:57:37 +0000</pubDate>
</item>
<item>
<title>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</link>
<description>&lt;p&gt;When you misspell the &lt;code&gt;:git/url&lt;/code&gt; of a git dependency (or the dep name used to infer a url) the error says :&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;Cloning: https://github.com/MISSPELLED-ORG-OR-REPO-PATH
Error building classpath. Unable to clone /home/user/.gitlibs/_repos/https/github.com/MISSPELLED-ORG-OR-REPO-PATH
fatal: could not read Username for 'https://github.com': terminal prompts disabled
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;I find the the 3 sentences confusing since they mention classpath, a local folder, username, and terminal prompts disabled. &lt;/p&gt;
&lt;p&gt;It would be great if it more clearly can express that no repo could be found with the provided URL, or at least remove the last sentence &lt;code&gt;fatal: could not read Username for 'https://github.com': terminal prompts disabled&lt;/code&gt; which I find misleading.&lt;/p&gt;
&lt;p&gt;Maybe the &lt;code&gt;Unable to clone&lt;/code&gt; could be followed by the url instead of the local folder also?&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</guid>
<pubDate>Thu, 05 Dec 2024 10:17:00 +0000</pubDate>
</item>
<item>
<title>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</link>
<description>&lt;p&gt;Does tools.deps treat a version (e.g. 1.2.3) as a range (i.e. [1.2.3,)) like Maven and Gradle or like a fixed version (i.e. [1.2.3])? In addition, Maven has the concept of &quot;soft&quot; versions where the specified version is &quot;preferred&quot;. Does tools.deps have a similar concept?&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</guid>
<pubDate>Wed, 05 Jun 2024 16:53:59 +0000</pubDate>
</item>
<item>
<title>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</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</guid>
<pubDate>Thu, 15 Feb 2024 13:57:44 +0000</pubDate>
</item>
<item>
<title>Improve error message for tools.deps when m2 permissions do not allow write</title>
<link>https://ask.clojure.org/index.php/13649/improve-error-message-tools-deps-when-permissions-allow-write</link>
<description>&lt;p&gt;I've encountered this error and it took a while to figure out. &lt;/p&gt;
&lt;p&gt;For some reason downloading eclipse artifacts was failing. &lt;br&gt;
It was very frustrating. &lt;br&gt;
I found the issue - to be caused by wrong permissions for directories under &lt;code&gt;$HOME/.m2/repository&lt;/code&gt;. &lt;/p&gt;
&lt;p&gt;Downloading deps failed to write any files to local Maven repo and that triggered a fail in deps resolving for my project. &lt;br&gt;
The error was related to &lt;code&gt;FileNotFound&lt;/code&gt; - and not &quot;I can't write to this directory&quot; . &lt;br&gt;
It was more confusing since I had some dependencies in that directory (probably from an previous download).&lt;/p&gt;
&lt;p&gt;I suspect the directory permissions where changed by mounting the local maven repo inside a docker container.  &lt;/p&gt;
&lt;p&gt;I reported this on slack and created this question as suggested by Alex Miller. &lt;br&gt;
He mentioned this might be caused by maven libraries and out of control of tools.deps. &lt;/p&gt;
&lt;p&gt;IMO I find it strange that maven libs don't error out when trying to create the local file and we get an exception when trying to read the file by tools.deps.  &lt;/p&gt;
&lt;p&gt;Steps to reproduce:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;rm -rf ~/.m2/repository/org/eclipse 
mkdir -p ~/.m2/repository/org/eclipse/
chown root:root ~/.m2/repository/org/eclipse
clojure -Sdeps '{:deps {info.sunng/ring-jetty9-adapter {:mvn/version &quot;0.22.0&quot;}}}'
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Exception &lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;clojure -Sdeps '{:deps {info.sunng/ring-jetty9-adapter {:mvn/version &quot;0.22.0&quot;}}}'&lt;br&gt;
Warning: failed to load the S3TransporterFactory class&lt;br&gt;
Warning: failed to load the S3TransporterFactory class&lt;br&gt;
Warning: failed to load the S3TransporterFactory class&lt;br&gt;
Warning: failed to load the S3TransporterFactory class&lt;br&gt;
SLF4J: Failed to load class &quot;org.slf4j.impl.StaticLoggerBinder&quot;.&lt;br&gt;
SLF4J: Defaulting to no-operation (NOP) logger implementation&lt;br&gt;
SLF4J: See &lt;a rel=&quot;nofollow&quot; href=&quot;http://www.slf4j.org/codes.html#StaticLoggerBinder&quot;&gt;http://www.slf4j.org/codes.html#StaticLoggerBinder&lt;/a&gt; for further details.&lt;br&gt;
Warning: failed to load the S3TransporterFactory class&lt;br&gt;
Warning: failed to load the S3TransporterFactory class&lt;br&gt;
Warning: failed to load the S3TransporterFactory class&lt;br&gt;
Warning: failed to load the S3TransporterFactory class&lt;br&gt;
Error building classpath. Failed to read artifact descriptor for org.eclipse.jetty.websocket:websocket-servlet:jar:11.0.15&lt;br&gt;
org.eclipse.aether.resolution.ArtifactDescriptorException: Failed to read artifact descriptor for org.eclipse.jetty.websocket:websocket-servlet:jar:11.0.15&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;    at org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.loadPom(Unknown Source)
    at org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.readArtifactDescriptor(Unknown Source)
    at org.eclipse.aether.internal.impl.DefaultRepositorySystem.readArtifactDescriptor(Unknown Source)
    at clojure.tools.deps.extensions.maven$read_descriptor.invokeStatic(maven.clj:115)
    at clojure.tools.deps.extensions.maven$read_descriptor.invoke(maven.clj:106)
    at clojure.tools.deps.extensions.maven$fn__825.invokeStatic(maven.clj:146)
    at clojure.tools.deps.extensions.maven$fn__825.invoke(maven.clj:143)
    at clojure.lang.MultiFn.invoke(MultiFn.java:244)
    at clojure.tools.deps$expand_deps$children_task__463$fn__465$fn__466.invoke(deps.clj:407)
    at clojure.lang.AFn.applyToHelper(AFn.java:152)
    at clojure.lang.AFn.applyTo(AFn.java:144)
    at clojure.core$apply.invokeStatic(core.clj:667)
    at clojure.core$with_bindings_STAR_.invokeStatic(core.clj:1990)
    at clojure.core$with_bindings_STAR_.doInvoke(core.clj:1990)
    at clojure.lang.RestFn.invoke(RestFn.java:425)
    at clojure.lang.AFn.applyToHelper(AFn.java:156)
    at clojure.lang.RestFn.applyTo(RestFn.java:132)
    at clojure.core$apply.invokeStatic(core.clj:671)
    at clojure.core$bound_fn_STAR_$fn__7194.doInvoke(core.clj:2020)
    at clojure.lang.RestFn.invoke(RestFn.java:397)
    at clojure.lang.AFn.call(AFn.java:18)
    at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
    at java.base/java.lang.Thread.run(Thread.java:1583)
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Caused by: org.eclipse.aether.resolution.ArtifactResolutionException: Could not transfer artifact org.eclipse.jetty.websocket:websocket-servlet:pom:11.0.15 from/to central (&lt;a rel=&quot;nofollow&quot; href=&quot;https://repo1.maven.org/maven2/&quot;&gt;https://repo1.maven.org/maven2/&lt;/a&gt;): /home/ieugen/.m2/repository/org/eclipse/jetty/websocket/websocket-servlet/11.0.15/websocket-servlet-11.0.15.pom.part.lock (No such file or directory)&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;    at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(Unknown Source)
    at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts(Unknown Source)
    at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifact(Unknown Source)
    ... 25 more
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Caused by: org.eclipse.aether.transfer.ArtifactTransferException: Could not transfer artifact org.eclipse.jetty.websocket:websocket-servlet:pom:11.0.15 from/to central (&lt;a rel=&quot;nofollow&quot; href=&quot;https://repo1.maven.org/maven2/&quot;&gt;https://repo1.maven.org/maven2/&lt;/a&gt;): /home/ieugen/.m2/repository/org/eclipse/jetty/websocket/websocket-servlet/11.0.15/websocket-servlet-11.0.15.pom.part.lock (No such file or directory)&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;    at org.eclipse.aether.connector.basic.ArtifactTransportListener.transferFailed(Unknown Source)
    at org.eclipse.aether.connector.basic.BasicRepositoryConnector$TaskRunner.run(Unknown Source)
    at org.eclipse.aether.util.concurrency.RunnableErrorForwarder$1.run(Unknown Source)
    at org.eclipse.aether.connector.basic.BasicRepositoryConnector$DirectExecutor.execute(Unknown Source)
    at org.eclipse.aether.connector.basic.BasicRepositoryConnector.get(Unknown Source)
    at org.eclipse.aether.internal.impl.DefaultArtifactResolver.performDownloads(Unknown Source)
    ... 28 more
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Caused by: java.io.FileNotFoundException: /home/ieugen/.m2/repository/org/eclipse/jetty/websocket/websocket-servlet/11.0.15/websocket-servlet-11.0.15.pom.part.lock (No such file or directory)&lt;/p&gt;
&lt;/blockquote&gt;
</description>
<category>tools.deps</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/13649/improve-error-message-tools-deps-when-permissions-allow-write</guid>
<pubDate>Mon, 29 Jan 2024 15:34:07 +0000</pubDate>
</item>
<item>
<title>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</link>
<description>&lt;p&gt;From the source of &lt;code&gt;tools.deps&lt;/code&gt;, I see that git and Maven is implemented via extensions and multimethods. Is there a way for someone to write a third-party extension and tell the &lt;code&gt;clojure&lt;/code&gt; CLI tool to use it? e.g. an extension for SVN dependencies via &lt;code&gt;:svn&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;My company has an internal build system that is not &lt;code&gt;git&lt;/code&gt; or Maven based. It should be able to integrate with the current extensions framework within &lt;code&gt;deps&lt;/code&gt;. However, I can't seem to find a way to tell &lt;code&gt;clojure&lt;/code&gt; to load this extension file. It would be nice if we could configure via &lt;code&gt;deps.edn&lt;/code&gt; or a flag when calling &lt;code&gt;clojure&lt;/code&gt; to include other extension implementations.&lt;/p&gt;
</description>
<category>Clojure CLI</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/13477/clojure-option-include-extensions-dependency-resolution</guid>
<pubDate>Mon, 20 Nov 2023 13:31:36 +0000</pubDate>
</item>
<item>
<title>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</link>
<description>&lt;p&gt;When using the tools.deps API, I would like to resolve dependencies without downloading all of the jars, and I would like the return value to tell me the original URL of the dependency, rather than the path on disk. &lt;/p&gt;
&lt;p&gt;The reason is I use bazel + &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/griffinbank/rules_clojure&quot;&gt;https://github.com/griffinbank/rules_clojure&lt;/a&gt;, and if I have the URL, I can immutably cache artifacts in bazel, and have that cache be shared with all other developers at work. &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</guid>
<pubDate>Thu, 09 Nov 2023 17:01:03 +0000</pubDate>
</item>
<item>
<title>how to convert deps,edn file to pom.xml file i am using leiningen</title>
<link>https://ask.clojure.org/index.php/13369/how-to-convert-deps-edn-file-to-pom-xml-file-am-using-leiningen</link>
<description>&lt;p&gt;how to convert deps,edn file to pom.xml file i am using leiningen&lt;/p&gt;
</description>
<category>tools.deps</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/13369/how-to-convert-deps-edn-file-to-pom-xml-file-am-using-leiningen</guid>
<pubDate>Mon, 09 Oct 2023 23:34:24 +0000</pubDate>
</item>
<item>
<title>install-latest with a name already in use by another tool results in cryptic error message</title>
<link>https://ask.clojure.org/index.php/13368/install-latest-already-another-results-cryptic-error-message</link>
<description>&lt;p&gt;Repro:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;$ clojure -Ttools install-latest :lib io.github.seancorfield/clj-new :as new
new: Installed io.github.seancorfield/clj-new v1.2.404 {:git/tag &quot;v1.2.404&quot;, :git/sha &quot;d4a6508&quot;}

$ clojure -Ttools install-latest :lib io.github.seancorfield/deps-new :as new
Execution error (ExceptionInfo) at clojure.tools.deps.extensions.git/coord-err (git.clj:46).
Library io.github.seancorfield/deps-new has invalid tag: v1.2.404
&lt;/code&gt;&lt;/pre&gt;
</description>
<category>Clojure</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/13368/install-latest-already-another-results-cryptic-error-message</guid>
<pubDate>Mon, 09 Oct 2023 12:14:59 +0000</pubDate>
</item>
<item>
<title>Abstract env var reading in tools.deps</title>
<link>https://ask.clojure.org/index.php/13300/abstract-env-var-reading-in-tools-deps</link>
<description>&lt;p&gt;I have a Cursive user wanting to use the &lt;code&gt;CLOJURE_CLI_ALLOW_HTTP_REPO &lt;/code&gt; env var. Since Cursive invokes tools.deps in-process, there's no way for me to set an env var in the current process. deps.clj has a &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/borkdude/deps.clj/blob/441a53821f6106ea86f33c0e9431110cb713c2e7/deps.clj#L239-L242&quot;&gt;nice abstraction&lt;/a&gt; for this - would it be possible to use this or something similar for tools.deps too? I assume this problem will affect any process using tools.deps as a library.&lt;/p&gt;
</description>
<category>tools.deps</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/13300/abstract-env-var-reading-in-tools-deps</guid>
<pubDate>Sat, 16 Sep 2023 02:35:57 +0000</pubDate>
</item>
<item>
<title>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</link>
<description>&lt;p&gt;The following code:&lt;/p&gt;
&lt;p&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://gist.github.com/vemv/0254e4f594626b090520f1da323f9476&quot;&gt;https://gist.github.com/vemv/0254e4f594626b090520f1da323f9476&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;(I used a gist due to this site's 12000 character limit)&lt;/p&gt;
&lt;p&gt;...will fail with:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;Unable to resolve org.clojure/clojure version: [1.2.1],[1.3.0]
{:lib org.clojure/clojure, :coord #:mvn{:version &quot;[1.2.1],[1.3.0]&quot;}}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Perhaps it's worth noting that &lt;code&gt;[org.clojure/clojure #:mvn{:version &quot;1.11.1&quot;}]&lt;/code&gt; is already explicitly specified.&lt;/p&gt;
&lt;p&gt;I'm using &lt;code&gt;org.clojure/tools.deps &quot;0.18.1354&quot;&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Thanks - V&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</guid>
<pubDate>Sat, 26 Aug 2023 06:26:56 +0000</pubDate>
</item>
<item>
<title>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</link>
<description>&lt;p&gt;In Cursive's new deps integration, I invoke &lt;code&gt;make-classpath2&lt;/code&gt; from within IntelliJ, which means that the CWD is not the project directory. I bind &lt;code&gt;clojure.tools.deps.util.dir/*the-dir*&lt;/code&gt; when I do this, and most things work correctly. However, there are some exceptions which don't work:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;:mvn/local-repo&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;:local/root&lt;/code&gt; deps inside &lt;code&gt;:override-deps&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;:classpath-overrides&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;It would be nice if they could be made to work too. If there's interest in a patch for this I could have a go at it.&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</guid>
<pubDate>Fri, 14 Jul 2023 13:49:38 +0000</pubDate>
</item>
<item>
<title>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</link>
<description>&lt;p&gt;Given the number of people (mostly beginners) who seem to run into problems with the CLI because they have an older version and are following either newer instructions or trying to use libraries that rely on newer features, I wonder whether it would be worth adding a check to the script that would output a warning if the current stable version is more recent (from the download site)?&lt;/p&gt;
&lt;p&gt;I know that won't help people who already have an old version installed but it would at least help future people...&lt;/p&gt;
&lt;p&gt;...or is the command-line &quot;API&quot; stable enough at this point that it wouldn't be worth it?&lt;/p&gt;
&lt;p&gt;Examples include the changing semantics for both -M and -T over the years, support for :git/sha (vs :sha), and several other changes, both in tools.deps itself and the CLI script.&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</guid>
<pubDate>Mon, 19 Jun 2023 18:49:58 +0000</pubDate>
</item>
<item>
<title>Using deps/root with local/root</title>
<link>https://ask.clojure.org/index.php/12913/using-deps-root-with-local-root</link>
<description>&lt;p&gt;When working with monorepos, specifically depending on libs defined in monorepos, it is common to see those pulled in via &lt;code&gt;:git/url,tag,sha&lt;/code&gt; and &lt;code&gt;:deps/root&lt;/code&gt; like:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;; clojure -Sdeps '{:deps {polylith-kaocha/kaocha-wrapper
  {:git/url &quot;https://github.com/imrekoszo/polylith-kaocha&quot;
   :git/sha &quot;d1fcd406cf0813b836419e39706ae61929a391a2&quot;
   :deps/root &quot;projects/kaocha-wrapper&quot;}}}' -Stree | grep 'lambdaisland/kaocha'
    . lambdaisland/kaocha 1.68.1059
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;There are cases when it is beneficial for development or debugging to clone the monorepo and reference its libs using &lt;code&gt;:local/root&lt;/code&gt;. However, simply replacing the git attributes and point to a local folder does not currently work (Clojure CLI version 1.11.1.1273):&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;; clojure -Sdeps '{:deps {polylith-kaocha/kaocha-wrapper
  {:local/root &quot;/Users/ikoszo/imre/oss/polylith-kaocha&quot;
   :deps/root &quot;projects/kaocha-wrapper&quot;}}}' -Stree | grep 'lambdaisland/kaocha'
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;(notice that lambdaisland/kaocha is not printed indicating it isn't in the dep tree)&lt;/p&gt;
&lt;p&gt;As tools.deps currently appears to ignore &lt;code&gt;:deps/root&lt;/code&gt; for &lt;code&gt;:local/root&lt;/code&gt; dependencies, developers currently have to combine the two into &lt;code&gt;:local/root&lt;/code&gt; like so:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;; clojure -Sdeps '{:deps {polylith-kaocha/kaocha-wrapper
  {:local/root &quot;/Users/ikoszo/imre/oss/polylith-kaocha/projects/kaocha-wrapper&quot;}}}' -Stree | grep 'lambdaisland/kaocha'
    . lambdaisland/kaocha /Users/ikoszo/imre/oss/kaocha
    . lambdaisland/kaocha /Users/ikoszo/imre/oss/kaocha
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;At &lt;a rel=&quot;nofollow&quot; href=&quot;https://clojure.org/reference/deps_and_cli&quot;&gt;https://clojure.org/reference/deps_and_cli&lt;/a&gt; the following are currently stated:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;Common coordinate attributes (all optional):&lt;br&gt;
...&lt;br&gt;
:deps/root - relative directory path within a file based dep to search for the manifest file&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;and&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;Local project attributes:&lt;br&gt;
:local/root (required) - directory path (will auto detect whether a deps or pom project, also see :deps/manifest)&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Reading the above, &lt;code&gt;:local/root&lt;/code&gt; can qualify as a file based dep, which to me implies that &lt;code&gt;:deps/root&lt;/code&gt; should work as it isn't stated otherwise.&lt;/p&gt;
&lt;p&gt;Could support be added for this? This would make life easier switching between local and git deps when developing a library or tool.&lt;/p&gt;
&lt;p&gt;If yes, this &lt;em&gt;might&lt;/em&gt; also be a way to help solve at least a subset of the problem reported in &lt;a rel=&quot;nofollow&quot; href=&quot;https://clojure.atlassian.net/browse/TDEPS-132&quot;&gt;https://clojure.atlassian.net/browse/TDEPS-132&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;(Originally asked and discussed in this slack thread: &lt;a rel=&quot;nofollow&quot; href=&quot;https://clojurians.slack.com/archives/C6QH853H8/p1682712720554439&quot;&gt;https://clojurians.slack.com/archives/C6QH853H8/p1682712720554439&lt;/a&gt;)&lt;/p&gt;
</description>
<category>tools.deps</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/12913/using-deps-root-with-local-root</guid>
<pubDate>Thu, 04 May 2023 12:45:13 +0000</pubDate>
</item>
<item>
<title>&quot;Execution error  at java.lang.ProcessImpl/forkAndExec Argument list too long&quot; when using add-lib</title>
<link>https://ask.clojure.org/index.php/12852/execution-error-java-processimpl-forkandexec-argument-using</link>
<description>&lt;p&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://clojurians.slack.com/archives/C03S1KBA2/p1681486745587169&quot;&gt;Slack Discussion&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;This error was being thrown for me on Linux running:&lt;br&gt;
clojure 1.12.0-alpha2&lt;br&gt;
clojure CLI: 1.11.1.1273&lt;/p&gt;
&lt;p&gt;The deps.edn file in the directory I was running &lt;code&gt;clj&lt;/code&gt; included four non-clojure dependencies which expanded to &lt;code&gt;222&lt;/code&gt; transitive dependencies. Additionally I had nine aliases in my &lt;code&gt;~/.clojure/deps.edn&lt;/code&gt; which added additional dependencies to the tools.deps basis.&lt;/p&gt;
&lt;p&gt;Alex Miller mentioned on Slack that large basis data could cause this exception and that he would try to address the problem.&lt;/p&gt;
</description>
<category>Clojure</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/12852/execution-error-java-processimpl-forkandexec-argument-using</guid>
<pubDate>Fri, 14 Apr 2023 15:55:25 +0000</pubDate>
</item>
<item>
<title>Can clojure.tools.deps.script.make-classpath2/run-core be considered a public API?</title>
<link>https://ask.clojure.org/index.php/12679/clojure-tools-deps-script-make-classpath2-considered-public</link>
<description>&lt;p&gt;If not, could it (or something like it) be? This would be useful for allowing projects which embed &lt;code&gt;tools.deps&lt;/code&gt;, like Cursive, to get classpath info from a project without having to muck around creating a bunch of files.&lt;/p&gt;
&lt;p&gt;If &lt;code&gt;-main&lt;/code&gt; is going to be the only officially-sanctioned public API to this functionality, it would be good to abstract calls to &lt;code&gt;System/exit&lt;/code&gt; in such a way that embedding tools can catch process exits without being killed. &lt;code&gt;deps.clj&lt;/code&gt; has an example of one way to do this here: &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/borkdude/deps.clj/blob/master/deps.clj#L34-L39&quot;&gt;https://github.com/borkdude/deps.clj/blob/master/deps.clj#L34-L39&lt;/a&gt;.&lt;/p&gt;
</description>
<category>tools.deps</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/12679/clojure-tools-deps-script-make-classpath2-considered-public</guid>
<pubDate>Wed, 22 Feb 2023 03:10:38 +0000</pubDate>
</item>
<item>
<title>Support `:mvn/repos` inside an alias</title>
<link>https://ask.clojure.org/index.php/12367/support-mvn-repos-inside-an-alias</link>
<description>&lt;p&gt;This is similar to &lt;a rel=&quot;nofollow&quot; href=&quot;https://ask.clojure.org/index.php/11711/set-mvn-local-repo-via-alias&quot;&gt;https://ask.clojure.org/index.php/11711/set-mvn-local-repo-via-alias&lt;/a&gt;, sorry if I should have just added a note there instead of opening another question.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;:mvn/repos&lt;/code&gt; does not seem to work inside of an alias either -- only at the top level of &lt;code&gt;deps.edn&lt;/code&gt;. If this is intentional, it would be a nicer experience if CLI logged some sort of &quot;&lt;code&gt;:mvn/repos&lt;/code&gt; is not supported inside of aliases&quot; warning on launch.&lt;/p&gt;
</description>
<category>Tools</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/12367/support-mvn-repos-inside-an-alias</guid>
<pubDate>Tue, 08 Nov 2022 19:08:24 +0000</pubDate>
</item>
<item>
<title>Add retries when downloading dependencies?</title>
<link>https://ask.clojure.org/index.php/12315/add-retries-when-downloading-dependencies</link>
<description>&lt;p&gt;Our CI runs failed because of a temporary Clojars blip:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;Error building classpath. Could not transfer artifact&lt;br&gt;
rewrite-clj:rewrite-clj:jar:1.1.45 from/to clojars&lt;br&gt;
(&lt;a rel=&quot;nofollow&quot; href=&quot;https://repo.clojars.org/&quot;&gt;https://repo.clojars.org/&lt;/a&gt;): Connect to repo.clojars.org:443&lt;br&gt;
[repo.clojars.org/146.75.29.128] failed: Connect timed out 401 Error:&lt;br&gt;
Process completed with exit code 1.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Does it seem like it could be good to add some retries to tools.deps when downloading dependencies to handle temporary failures?&lt;/p&gt;
</description>
<category>Tools</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/12315/add-retries-when-downloading-dependencies</guid>
<pubDate>Tue, 18 Oct 2022 00:42:44 +0000</pubDate>
</item>
<item>
<title>Add example of clojure -Sdeps to Deps and CLI guide or reference</title>
<link>https://ask.clojure.org/index.php/12281/add-example-of-clojure-sdeps-to-deps-and-cli-guide-reference</link>
<description>&lt;p&gt;Testing libraries before adding them to a &lt;code&gt;deps.edn&lt;/code&gt; file by using &lt;code&gt;-Sdeps '{...}'&lt;/code&gt; is a frequent recommendation, but it's only mentioned in a single line in the &lt;a rel=&quot;nofollow&quot; href=&quot;https://clojure.org/reference/deps_and_cli#_deps_edn_sources&quot;&gt;Reference page&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;I think it would be helpful if it (and the other flags) had examples with more detail about how they're used and why. Maybe something like:&lt;/p&gt;
&lt;hr&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;-Sdeps&lt;/strong&gt; - pass the config data on the command line&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;For example, instead of creating a new &lt;code&gt;deps.edn&lt;/code&gt; file to experiment with a new library, you can use &lt;code&gt;-Sdeps&lt;/code&gt; to pass in the &lt;code&gt;:deps&lt;/code&gt; map to &lt;code&gt;clojure&lt;/code&gt;:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;$ clojure -Sdeps '{:deps {org.clojure/core.match {:mvn/version &quot;1.0.0&quot;}}}'
Clojure 1.11.1
user=&amp;gt; (require '[clojure.core.match :refer [match]])
nil
&lt;/code&gt;&lt;/pre&gt;
</description>
<category>Docs</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/12281/add-example-of-clojure-sdeps-to-deps-and-cli-guide-reference</guid>
<pubDate>Tue, 04 Oct 2022 18:38:54 +0000</pubDate>
</item>
<item>
<title>create-basis uses the wrong local maven repository</title>
<link>https://ask.clojure.org/index.php/12232/create-basis-uses-the-wrong-local-maven-repository</link>
<description>&lt;p&gt;I am attempting to build a Clojure project with numerous dependencies and contain everything into a single folder. The reason for doing this is because I will eventually build this software in an environment where I am not permitted to modify the home folder.&lt;/p&gt;
&lt;p&gt;The following command is being used&lt;br&gt;
&lt;code&gt;GITLIBS=/var/build/software/.gitlibs clojure -Srepro -Sdeps '{:mvn/local-repo &quot;/var/build/software/.m2/repository&quot;}' -T:build uber-aot&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;tools.deps is able to download all dependencies into the specified local repository. Once it's time for tools.build to run, I seem to get an error in the middle of a call to &lt;code&gt;b/create-basis&lt;/code&gt;. Here is what the error looks like.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;Execution error (FileNotFoundException) at java.io.RandomAccessFile/open0 (RandomAccessFile.java:-2).
/home/user/.m2/repository/org/clojure/clojure/1.11.1/clojure-1.11.1.pom.part.lock (No such file or directory)&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Is there any way to pass in the local Maven repository to tools.build? Preferably in the command line.&lt;/p&gt;
</description>
<category>Clojure CLI</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/12232/create-basis-uses-the-wrong-local-maven-repository</guid>
<pubDate>Sat, 24 Sep 2022 08:29:08 +0000</pubDate>
</item>
<item>
<title>clojure tools invalid certificate exception when downloading dependencies behind a firewall</title>
<link>https://ask.clojure.org/index.php/12190/certificate-exception-downloading-dependencies-firewall</link>
<description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I'm getting a PKIX certificate exception when trying to download project dependnecies with the clojure tool behind a strict firewall on MS-Windows:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;Could not transfer artifact ... from/to central&lt;br&gt;
(&lt;a rel=&quot;nofollow&quot; href=&quot;https://repo1.maven.org/maven2/&quot;&gt;https://repo1.maven.org/maven2/&lt;/a&gt;): &lt;br&gt;
sun.security.validator.ValidatorException: PKIX path building failed: &lt;br&gt;
sun.security.provider.certpath.SunCertPathBuilderException:    unable&lt;br&gt;
to find valid certification path to requested target&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;I believe this is due to self-signed root certificate utilized by the Firewall to control &amp;amp; monitor the traffic.&lt;/p&gt;
&lt;p&gt;Analysis follows and apologies for the long read.&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;It is a standard practice in big organisations for workstations to sit behind a firewall that controls and monitors all traffic to and from the Internet. It is also common for the company to create their own self-signed root certificate and replace with it the certificates found in the https traffic so as to decrypt and analyze the data flows, utilizing in effect the man-in-the-middle attack to their advantage.&lt;/p&gt;
&lt;p&gt;For this to work, the user workstation where the connection originates from needs to have the self-signed certificates installed in their trusted certificate store. On Windows, this will be the trusted root authority certification keystore.&lt;/p&gt;
&lt;p&gt;Java comes with its own certificate store, the java KeyStore, which is separate from the general keystore available on the workstation. Thus, any java https connections to the Internet through the firewall is most likely to fail with an unknown certificate error, since the self-signed certs are not installed on the java keystore.&lt;/p&gt;
&lt;p&gt;This adversely affects the clojure/clj command line tools when downloading libs because it can't find the self-signed cert in the java keystore. For example, an exception is thrown when trying to access the Internet from such computers:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt; &amp;gt; clojure -P
 
 Error building classpath ... 
 org.eclipse.aether.resolution.ArtifactDescriptorException:   Failed to
 read artifact descriptor for ....  ...  Caused by:
 org.eclipse.aether.resolution.ArtifactResolutionException:   Could not
 transfer artifact ... from/to central
 (https://repo1.maven.org/maven2/):   
 sun.security.validator.ValidatorException: PKIX path building failed:
      sun.security.provider.certpath.SunCertPathBuilderException:
        unable to find valid certification path to requested target  ...
  ...
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;I can think of at least two solution to circumvent this problem:&lt;br&gt;
1. Install the missing certificates in the java keystore, or&lt;br&gt;
2. Instruct the java instance to look into the general keystore.&lt;/p&gt;
&lt;p&gt;There does not seem to be a straightforward way to discover the missing certificates and would probably require some user effort to install them into the java keystore using the java keytool (See Working with Certificates and SSL at &lt;a rel=&quot;nofollow&quot; href=&quot;https://docs.oracle.com/cd/E19830-01/819-4712/ablqw/index.html&quot;&gt;https://docs.oracle.com/cd/E19830-01/819-4712/ablqw/index.html&lt;/a&gt;).&lt;/p&gt;
&lt;p&gt;Instead, it seems easier to instruct java to look at the general or alternative keystores using the &lt;code&gt;java.next.ssl.*&lt;/code&gt; properties (&lt;a rel=&quot;nofollow&quot; href=&quot;https://stackoverflow.com/questions/5871279/ssl-and-cert-keystore&quot;&gt;https://stackoverflow.com/questions/5871279/ssl-and-cert-keystore&lt;/a&gt;).&lt;/p&gt;
&lt;p&gt;On Windows, which I assume most of users with such restrictive firewalls are sitting on, it is a just matter of setting a simple java property to instruct java to use the general windows keystore (&lt;a rel=&quot;nofollow&quot; href=&quot;https://stackoverflow.com/questions/41257366/import-windows-certificates-to-java&quot;&gt;https://stackoverflow.com/questions/41257366/import-windows-certificates-to-java&lt;/a&gt;):&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;javax.net.ssl.trustStoreType=Windows-ROOT
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Given this, I was expecting the following to work on windows&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;clojure -J-D'javax.net.ssl.trustStoreType=Windows-ROOT' -P
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;but it doesn't. It turns out the &lt;code&gt;$JvmOpts&lt;/code&gt; variable is not passed onto the prep command by the powershell script here &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/clojure/brew-install/blob/b91fb78e321b5e39bedda594f5d578579d448d19/src/main/resources/clojure/install/ClojureTools.psm1#L388&quot;&gt;https://github.com/clojure/brew-install/blob/b91fb78e321b5e39bedda594f5d578579d448d19/src/main/resources/clojure/install/ClojureTools.psm1#L388&lt;/a&gt; :&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&amp;amp; $JavaCmd -classpath $ToolsCp clojure.main -m clojure.tools.deps.alpha.script.make-classpath2 --config-user $ConfigUser --config-project $ConfigProject --basis-file $BasisFile --libs-file $LibsFile --cp-file $CpFile --jvm-file $JvmFile --main-file $MainFile --manifest-file $ManifestFile @ToolsArgs
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Some options I can think of to utilise java properties to solve the general issue, from most intrusive/specific to the general case:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Have the &lt;code&gt;clojure.tools.deps.alpha.script.make-classpath2&lt;/code&gt; fn which is responsible for downloading the dependencies set &lt;code&gt;javax.net.ssl.trustStoreType=Windows-ROOT&lt;/code&gt; at runtime, if running on  Windows,&lt;ul&gt;
&lt;li&gt;.e.g. &lt;code&gt;(System/setProperty &quot;javax.net.ssl.trustStoreType&quot; &quot;Windows-ROOT&quot;)&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;cons:&lt;ul&gt;
&lt;li&gt;This only works on windows.&lt;/li&gt;
&lt;li&gt;forces to use of the general keystore, which might not be what the user always want.&lt;ul&gt;
&lt;li&gt;This can be mitigated by having a new script option (say -W) that is passed onto &lt;code&gt;clojure.tools.deps.alpha&lt;/code&gt; as an option. The drawback is that users/tooling has to always pass this flag on invocation.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;setting the &lt;code&gt;javax.net.ssl.tustStoreType&lt;/code&gt; property at runtime with &lt;code&gt;System/setProperty&lt;/code&gt; could have no effect if any SSL connection was previously made from other parts of the code.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Same as previous, but with a new script option (say -Sssl EDN) whose EDN are the &lt;code&gt;javax.net.ssl.*&lt;/code&gt; properties, and will be passed as such to &lt;code&gt;clojure.tools.deps.alpha&lt;/code&gt; for setting at  runtime.&lt;ul&gt;
&lt;li&gt;e.g. &lt;code&gt;clojure -Sssl {:trustStoreType &quot;Windows-ROOT&quot;} -P&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;cons:&lt;ul&gt;
&lt;li&gt;Same disadvantages as in #1, and moreover is more cumbersome for the user to type an edn map each time it invokes clojure.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Invent a new deps.edn key (e.g. &lt;code&gt;:clojure.tools.deps.alpha/ssl&lt;/code&gt;) whose pairs shall be &lt;code&gt;java.net.ssl.*&lt;/code&gt; properties, that can be set in the user config deps.edn and parsed by &lt;code&gt;clojure.tools.deps.alpha&lt;/code&gt; s &lt;code&gt;make-classpath2&lt;/code&gt; fn setting the properties using &lt;code&gt;System/setProperty&lt;/code&gt;at runtime.&lt;ul&gt;
&lt;li&gt;e.g. example clj user config &lt;code&gt;{:clojure.tools.deps.alpha/ssl {:trustStore &quot;Windows-ROOT&quot;}}&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;cons&lt;ul&gt;
&lt;li&gt;setting the &lt;code&gt;javax.net.ssl.*&lt;/code&gt; properties at runtime with &lt;code&gt;System/setProperty&lt;/code&gt; might have no effect if any SSL connection was previously made from other parts of the code.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Update script so that -J jvm options are passed onto the java invocation of the -P command (I have tested this to work).&lt;ul&gt;
&lt;li&gt;e.g. &lt;code&gt;clojure -J-D'javax.net.ssl.trustStoreType=Windows-ROOT' -P&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;cons:&lt;ul&gt;
&lt;li&gt;User/tooling still have to provide the &lt;code&gt;-J-Djavax.net.ssl.*&lt;/code&gt; options at each clojure invocation.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Same as previous, but introduce a &lt;code&gt;CLJ_JVMOPTS&lt;/code&gt; environment variable whose value is inserted in the script's &lt;code&gt;$JvmOpts&lt;/code&gt; variable.&lt;ul&gt;
&lt;li&gt;e.g. &lt;code&gt;set CLJ_JVMOPTS=-D'javax.net.ssl.trustStoreType=Windows-ROOT'&lt;/code&gt;, and then &lt;code&gt;clojure -P&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;I'm more in favor of #5, since this does not seem to have any disadvantages and can be set once and be applied on all clojure invocations, creating a better experience for the user/tooling.&lt;/p&gt;
&lt;p&gt;Let me know your thoughts. Happy to look after the changes in the scripts and/or &lt;code&gt;tools.deps.alpha&lt;/code&gt; lib.&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;
&lt;p&gt;PS: I have also tried to set the properties in the &lt;code&gt;MAVEN_OPTS&lt;/code&gt; variable as pe r &lt;a rel=&quot;nofollow&quot; href=&quot;https://maven.apache.org/guides/mini/guide-repository-ssl.html&quot;&gt;https://maven.apache.org/guides/mini/guide-repository-ssl.html&lt;/a&gt;, but it had no effect. I suspect this only take effect when invoking the &lt;code&gt;mvn&lt;/code&gt; command line tool directly.&lt;/p&gt;
</description>
<category>Clojure CLI</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/12190/certificate-exception-downloading-dependencies-firewall</guid>
<pubDate>Fri, 09 Sep 2022 17:17:02 +0000</pubDate>
</item>
<item>
<title>Add validation for lib groupId and name coordinate of git deps in tools.deps</title>
<link>https://ask.clojure.org/index.php/12147/add-validation-for-groupid-name-coordinate-deps-tools-deps</link>
<description>&lt;p&gt;In tools.deps, when using git deps, the following declared dependencies:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;{io.github.xadecimal/riddley {...}}

{com.github.xadecimal/riddley {...}}

{com.xadecimal/riddley {:git/url &quot;https://github.com/xadecimal/riddley.git&quot; ...}}

{com.xadecimal/riddley {:mvn/version ...}}

{garbage/whatever {:git/url &quot;https://github.com/xadecimal/riddley.git&quot; ...}}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;will all resolve, but they will not conflict against one another, even though they are all the same lib.&lt;/p&gt;
&lt;p&gt;As it stands, the consumer that declares the dependency can choose from all these equivalent declarations, but if it chooses differently than any of its transitive dependencies have chosen, a hidden conflict is created, and more than one version of the lib will be pulled into the classpath, giving non-deterministic behavior to what version of the code will actually be used at runtime.&lt;/p&gt;
&lt;p&gt;This problem could be solved by letting the lib author choose the canonical lib group/name that users must use always when declaring a dependency on it.&lt;/p&gt;
&lt;p&gt;This can be achieved by adding a new key to &lt;code&gt;deps.edn&lt;/code&gt;, such as &lt;code&gt;:lib&lt;/code&gt; which takes a fully qualified symbol which will be validated against the symbol declared in the &lt;code&gt;:deps&lt;/code&gt; map of the consuming libs.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;deps.edn&lt;/code&gt; of the library being depended upon:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;{:lib com.xadecimal/riddley ;; &amp;lt;-- This new key is added to deps.edn, declaring the canonical lib name
 :paths [&quot;src&quot;]
 :deps {...}
 ...}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;code&gt;deps.edn&lt;/code&gt; of the libraries that declare a dependency on the above lib:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;{:paths [&quot;src&quot;]
 :deps {com.xadecimal/riddley {...}}
 ...}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;When tools.deps resolves the above, it will check if the pulled lib has &lt;code&gt;:lib&lt;/code&gt; key declared in its &lt;code&gt;deps.edn&lt;/code&gt;, if it does, it will assert that the symbol used here matches the declared &lt;code&gt;:lib&lt;/code&gt; symbol, if it does not, it will error to the user, making this an illegal dependency declaration. In the above it is correct, but in the following it is wrong:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;deps.edn&lt;/code&gt; of a library that badly declared an illegal dependency on the above lib:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;{:paths [&quot;src&quot;]
 :deps {com.github.xadecimal/riddley {...}}
 ...}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This would error, because even if the library is found at &lt;code&gt;github.com/xadecimal/riddley.git&lt;/code&gt; and thus the above resolves, the library at &lt;code&gt;github.com/xadecimal/riddley.git&lt;/code&gt; declared that its canonical lib name was &lt;code&gt;com.xadecimal/riddley&lt;/code&gt; and not &lt;code&gt;com.github.xadecimal/riddley&lt;/code&gt;. Therefore, in this case the only valid git dependency declaration is:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;{:paths [&quot;src&quot;]
 :deps {com.xadecimal/riddley {:git/url &quot;https://github.com/xadecimal/riddley.git&quot; ...}}
 ...}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This validation would follow a similar ideology to asserting that the git/tag matches the git/sha, by asserting that the lib name used matches what the lib expects to uniquely be identified by.&lt;/p&gt;
&lt;p&gt;Doing this allows conflict resolution to work as expected, and avoids the possibility that transitive dependencies use a different name, causing hidden runtime version conflicts not detected and resolved by tools.deps.&lt;/p&gt;
</description>
<category>Clojure CLI</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/12147/add-validation-for-groupid-name-coordinate-deps-tools-deps</guid>
<pubDate>Mon, 05 Sep 2022 02:56:53 +0000</pubDate>
</item>
<item>
<title>tools.deps integration with Sourcehut</title>
<link>https://ask.clojure.org/index.php/12005/tools-deps-integration-with-sourcehut</link>
<description>&lt;p&gt;The implementation of &lt;code&gt;tools.deps&lt;/code&gt; currently allows developers to specify git dependencies for their projects in ways that allow them to omit a git url if they are using specific git forges. &lt;/p&gt;
&lt;p&gt;For example, &lt;code&gt;io.github.username/example&lt;/code&gt; would resolve to &lt;code&gt;https://github.com/username/example.git&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;I would like to request that &lt;a rel=&quot;nofollow&quot; href=&quot;https://sourcehut.org&quot;&gt;sourcehut&lt;/a&gt; be added to the list of git forges that are supported by &lt;code&gt;tools.deps&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Sourcehut git urls are of the form &lt;code&gt;https://git.sr.ht/~username/example&lt;/code&gt;&lt;br&gt;
I would like to suggest that the artifact name take on the form &lt;code&gt;ht.sr.username/example&lt;/code&gt;, at the discretion of the maintainers.&lt;/p&gt;
</description>
<category>tools.deps</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/12005/tools-deps-integration-with-sourcehut</guid>
<pubDate>Wed, 22 Jun 2022 15:06:24 +0000</pubDate>
</item>
<item>
<title>Why does tools install-latest not always find the latest version?</title>
<link>https://ask.clojure.org/index.php/11983/why-does-tools-install-latest-not-always-find-latest-version</link>
<description>&lt;p&gt;As seen on Slack: &lt;a rel=&quot;nofollow&quot; href=&quot;https://clojurians.slack.com/archives/C03S1KBA2/p1655612767836199&quot;&gt;https://clojurians.slack.com/archives/C03S1KBA2/p1655612767836199&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I have confirmed that:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;clojure -Ttools install-latest :lib io.github.seancorfield/deps-new :as new
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Installs v0.4.9 despite three releases having been made since then.&lt;/p&gt;
&lt;p&gt;And if you have an earlier version of &lt;code&gt;deps-new&lt;/code&gt; installed and try to update it:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;clojure -Ttools install-latest :tool new
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;you get v0.4.9.&lt;/p&gt;
&lt;p&gt;How is it comparing the versions? A lexical sort won't work because v0.4.10, v0.4.11, and v0.4.12 will all sort &quot;earlier&quot; than v0.4.9 but they are later versions.&lt;/p&gt;
</description>
<category>Clojure CLI</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/11983/why-does-tools-install-latest-not-always-find-latest-version</guid>
<pubDate>Sun, 19 Jun 2022 20:08:24 +0000</pubDate>
</item>
<item>
<title>relative directories in classpath-roots</title>
<link>https://ask.clojure.org/index.php/11982/relative-directories-in-classpath-roots</link>
<description>&lt;p&gt;In the context of a monorepo containing several modules I have noticed an issue with &lt;code&gt;clojure.tools.build.api/compile-clj&lt;/code&gt; which is making difficult to compile files when the basis project root is not in the current directory.&lt;/p&gt;
&lt;p&gt;Here is a minimal scenario demonstrating the problem.&lt;/p&gt;
&lt;p&gt;I have a top-level monorepo &lt;code&gt;deps.edn&lt;/code&gt; using tools.build to prepare/package its modules&lt;/p&gt;
&lt;pre&gt;&lt;code&gt; {:deps {monorepo/module-a {:local/root &quot;modules/a&quot;}}
 :aliases {:build {:deps {io.github.clojure/tools.build {:git/tag &quot;v0.8.2&quot;
                                                         :git/sha &quot;ba1a2bf&quot;}}
                   :ns-default build}}}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Module A contains some clojure source files. Here is &lt;code&gt;modules/a/deps.edn&lt;/code&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;{:paths [&quot;src&quot;]}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Those files require a compilation step. Here is the top-level &lt;code&gt;build.clj&lt;/code&gt; file expected to proccess those files.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;(ns build
  (:require [clojure.tools.build.api :as b]))

(def module-a (binding [b/*project-root* &quot;modules/a&quot;]
                (b/create-basis {:project &quot;deps.edn&quot;})))

(defn compile-a [_]
  (b/compile-clj
   {:basis module-a
    :src-dirs [&quot;modules/a/src&quot;]
    :class-dir &quot;target/module-a/classes&quot;}))
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;However when invoking &lt;code&gt;clojure -T:build compile-a&lt;/code&gt; from top-level directory I encounter the following error &lt;/p&gt;
&lt;pre&gt;&lt;code&gt;Execution error (FileNotFoundException) at user/eval136$fn (compile.clj:5).
Could not locate monorepo/module/a__init.class, monorepo/module/a.clj or monorepo/module/a.cljc on classpath.
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The problem is that the  &quot;src&quot; relative directory is not expanded in the &lt;code&gt;:classpath-roots&lt;/code&gt; which lead &lt;code&gt;compile-clj&lt;/code&gt; to search source files in the wrong location. It is possible to work around the issue by  binding the &lt;code&gt;*project-root*&lt;/code&gt; again and adapting &lt;code&gt;:src-dirs&lt;/code&gt; and &lt;code&gt;class-dir&lt;/code&gt; relative to module A root directory like this&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;(defn compile-a [_]
  (binding [b/*project-root* &quot;modules/a&quot;]
    (b/compile-clj
     {:basis module-a
      :src-dirs [&quot;src&quot;]
      :class-dir &quot;../../target/module-a/classes&quot;})))
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;However IMO it would be better if the computed classpath in the basis was fully expanded by transforming relative paths into absolute ones to avoid this extra ceremony.&lt;/p&gt;
&lt;p&gt;What do you think?&lt;br&gt;
Is there a reason why relative source path directories are currently kept relative ?&lt;/p&gt;
</description>
<category>tools.build</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/11982/relative-directories-in-classpath-roots</guid>
<pubDate>Sun, 19 Jun 2022 16:50:53 +0000</pubDate>
</item>
<item>
<title>Regression in tools.deps.alpha - can't use find-versions with non-git coordinates</title>
<link>https://ask.clojure.org/index.php/11974/regression-tools-deps-alpha-cant-find-versions-coordinates</link>
<description>&lt;p&gt;This commit seems to be the culprit: &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/clojure/tools.deps.alpha/commit/a4ad9c23250270a173101aee6bb2eceeaee53d92&quot;&gt;https://github.com/clojure/tools.deps.alpha/commit/a4ad9c23250270a173101aee6bb2eceeaee53d92&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Before it, using a non-git library name would just result in &lt;code&gt;nil&lt;/code&gt; returned from &lt;code&gt;find-vesions&lt;/code&gt;, which would allow &lt;code&gt;find-all-versions&lt;/code&gt; to try out other coord types.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;$ clj --version
Clojure CLI version 1.11.1.1129

$ clj -X:deps find-versions :lib org.clojure/clojure
Execution error (ExceptionInfo) at clojure.tools.deps.alpha.extensions.git/coord-err (git.clj:44).
Failed to determine git url for: org.clojure/clojure

Full report at:
/tmp/clojure-5949355979496977609.edn

$ clj -X:deps find-versions :lib org.clojure/tools.deps.alpha                                    
Execution error (ExceptionInfo) at clojure.tools.deps.alpha.extensions.git/coord-err (git.clj:44).
Failed to determine git url for: org.clojure/tools.deps.alpha

Full report at:
/tmp/clojure-5130519385828631638.edn

$ clj -X:deps find-versions :lib io.github.clojure/tools.build
Cloning: https://github.com/clojure/tools.build.git
{:git/tag &quot;0.0.1&quot;}
{:git/tag &quot;0.0.2&quot;}
[...]
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Not entirely related, but page at &lt;a rel=&quot;nofollow&quot; href=&quot;https://clojure.org/reference/deps_and_cli#find-versions&quot;&gt;https://clojure.org/reference/deps_and_cli#find-versions&lt;/a&gt; says:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;To search for available versions of a &lt;strong&gt;git lib&lt;/strong&gt; use the &lt;code&gt;find-versions&lt;/code&gt; tool provided with the built-in &lt;code&gt;:deps&lt;/code&gt; alias&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;So the docs make it sound as if &lt;code&gt;find-versions&lt;/code&gt; is only for Git-based coordinates. All while it used to work with other things as well.&lt;/p&gt;
</description>
<category>Clojure CLI</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/11974/regression-tools-deps-alpha-cant-find-versions-coordinates</guid>
<pubDate>Thu, 16 Jun 2022 08:11:23 +0000</pubDate>
</item>
<item>
<title>-X:deps prep not handling nested :local/root</title>
<link>https://ask.clojure.org/index.php/11954/x-deps-prep-not-handling-nested-local-root</link>
<description>&lt;p&gt;While setting up a monorepo using tools.deps I have noticed that &lt;code&gt;clojure -X:deps prep&lt;/code&gt; was not handling the case of nested &lt;code&gt;:local/root&lt;/code&gt; dependency. Here is a minimal example that should help understand the issue.&lt;/p&gt;
&lt;p&gt;I have a top-level &lt;code&gt;deps.edn&lt;/code&gt; serving as a development basis depending two modules.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;{:deps {monopero/module-a {:local/root &quot;modules/a&quot;}
        monopero/module-b {:local/root &quot;modules/b&quot;}}}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Here is &lt;code&gt;module/a/deps.edn&lt;/code&gt; which is a module without dependency&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;{:paths [&quot;src&quot;]}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;And here is  &lt;code&gt;module/b/deps.edn&lt;/code&gt;  which defines a prep only dependency on module A&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;{:paths [&quot;target/resources&quot;]
 :deps/prep-lib {:alias :resources
                 :fn monorepo.b.core/generate
                 :ensure &quot;target/resources&quot;}
 :aliases {:resources {:paths [&quot;src&quot;]
                       :deps {monopero/module-a {:local/root &quot;../a&quot;}}}}}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;From the top-level development basis I would expect to be able to run &lt;code&gt;clojure -X:deps prep&lt;/code&gt; to trigger the preparation of module B. However when doing so I encounter the following error &lt;/p&gt;
&lt;pre&gt;&lt;code&gt;~/src/scratch/recur-prep $ clojure -X:deps prep
Prepping monopero/module-b in /home/mthl/src/scratch/recur-prep/modules/b
Execution error (ExceptionInfo) at clojure.tools.deps.alpha.extensions/throw-bad-manifest (extensions.clj:158).
Manifest type not detected when finding deps for monopero/module-a in coordinate #:local{:root &quot;/home/mthl/src/scratch/a&quot;}

Full report at:
/tmp/clojure-5135322536447899533.edn
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;And here is the content of  &lt;code&gt;/tmp/clojure-5135322536447899533.edn&lt;/code&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;{:clojure.main/message
 &quot;Execution error (ExceptionInfo) at clojure.tools.deps.alpha.extensions/throw-bad-manifest (extensions.clj:158).\nManifest type not detected when finding deps for monopero/module-a in coordinate #:local{:root \&quot;/home/mthl/src/scratch/a\&quot;}\n&quot;,
 :clojure.main/triage
 {:clojure.error/class clojure.lang.ExceptionInfo,
  :clojure.error/line 158,
  :clojure.error/cause
  &quot;Manifest type not detected when finding deps for monopero/module-a in coordinate #:local{:root \&quot;/home/mthl/src/scratch/a\&quot;}&quot;,
  :clojure.error/symbol
  clojure.tools.deps.alpha.extensions/throw-bad-manifest,
  :clojure.error/source &quot;extensions.clj&quot;,
  :clojure.error/phase :execution},
 :clojure.main/trace
 {:via
  [{:type clojure.lang.ExceptionInfo,
    :message
    &quot;Manifest type not detected when finding deps for monopero/module-a in coordinate #:local{:root \&quot;/home/mthl/src/scratch/a\&quot;}&quot;,
    :data
    {:lib monopero/module-a,
     :coord {:local/root &quot;/home/mthl/src/scratch/a&quot;}},
    :at
    [clojure.tools.deps.alpha.extensions$throw_bad_manifest
     invokeStatic
     &quot;extensions.clj&quot;
     158]}],
  :trace
  [[clojure.tools.deps.alpha.extensions$throw_bad_manifest
    invokeStatic
    &quot;extensions.clj&quot;
    158]
   [clojure.tools.deps.alpha.extensions$throw_bad_manifest
    invoke
    &quot;extensions.clj&quot;
    153]
   [clojure.tools.deps.alpha.extensions$eval443$fn__444
    invoke
    &quot;extensions.clj&quot;
    166]
   [clojure.lang.MultiFn invoke &quot;MultiFn.java&quot; 244]
   [clojure.tools.deps.alpha$expand_deps$children_task__611$fn__613$fn__614
    invoke
    &quot;alpha.clj&quot;
    405]
   [clojure.tools.deps.alpha.util.concurrent$submit_task$task__247
    invoke
    &quot;concurrent.clj&quot;
    35]
   [clojure.lang.AFn call &quot;AFn.java&quot; 18]
   [java.util.concurrent.FutureTask run &quot;FutureTask.java&quot; 264]
   [java.util.concurrent.ThreadPoolExecutor
    runWorker
    &quot;ThreadPoolExecutor.java&quot;
    1128]
   [java.util.concurrent.ThreadPoolExecutor$Worker
    run
    &quot;ThreadPoolExecutor.java&quot;
    628]
   [java.lang.Thread run &quot;Thread.java&quot; 829]],
  :cause
  &quot;Manifest type not detected when finding deps for monopero/module-a in coordinate #:local{:root \&quot;/home/mthl/src/scratch/a\&quot;}&quot;,
  :data
  {:lib monopero/module-a,
   :coord {:local/root &quot;/home/mthl/src/scratch/a&quot;}}}}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;As I understand it the issue is that the &quot;../a&quot; local reference in module B is resolved from top-level directory instead of module B directory. While looking at the code I noticed that &lt;code&gt;clojure.tools.deps.alpha/prep-libs!&lt;/code&gt; is not changing the current directory when creating the basis. My intuition is that it should do so with something like the following snippet &lt;/p&gt;
&lt;pre&gt;&lt;code&gt;(let [root-dir (jio/file root)
      basis (dir/with-dir root-dir
              (create-basis
               {:extra {:aliases {:deps/TOOL {:replace-deps {} :replace-paths [&quot;.&quot;]}}}
                :aliases [:deps/TOOL alias]}))
      ,,,]
  ,,,)
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;In case it matters I am using &lt;strong&gt;Clojure CLI version 1.11.1.1113&lt;/strong&gt;&lt;/p&gt;
</description>
<category>Clojure CLI</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/11954/x-deps-prep-not-handling-nested-local-root</guid>
<pubDate>Sat, 11 Jun 2022 23:28:53 +0000</pubDate>
</item>
<item>
<title>Memory leak in clojure.tools.deps.alpha/resolve-deps ?</title>
<link>https://ask.clojure.org/index.php/11937/memory-leak-in-clojure-tools-deps-alpha-resolve-deps</link>
<description>&lt;p&gt;Hi Clojure team,&lt;/p&gt;
&lt;p&gt;At Liftoff, we are big users of Clojure (400k LOC across 250+ projects). We have built some tooling that automatically generates deps.edn files for projects, based on static analysis of the project's code.&lt;/p&gt;
&lt;p&gt;Some of our tools and test code repeatedly calls clojure.tools.deps.alpha/resolve-deps. As of version v0.14.1178, we have noticed the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;resolve-deps creates a new java.util.concurrent.ExecutorService on each call, but doesn't shut it down before returning (&lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/clojure/tools.deps.alpha/blob/v0.14.1178/src/main/clojure/clojure/tools/deps/alpha.clj#L477&quot;&gt;code&lt;/a&gt;). This lead our test code to spawn 20k+ threads.&lt;/li&gt;
&lt;li&gt;clojure.tools.deps.alpha.util.concurrent/submit-task pushes thread bindings onto a fixed size threadpool, but doesn't pop them (&lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/clojure/tools.deps.alpha/blob/v0.14.1178/src/main/clojure/clojure/tools/deps/alpha/util/concurrent.clj#L34&quot;&gt;code&lt;/a&gt;). As threads are re-used, the frame stack keeps growing.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Internally, we are now using a patched version of the tools that unconditionally shuts down the ExecutorService on each call to resolve-deps and pops the thread bindings for each task. This solves our problem, but we don't know if this is right solution. &lt;/p&gt;
&lt;p&gt;How is the core Clojure team thinking about concurrency in the context of the CLI tools? Can we expect this behavior to change in future releases of the CLI tools?&lt;/p&gt;
&lt;p&gt;Thanks!&lt;/p&gt;
</description>
<category>Clojure CLI</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/11937/memory-leak-in-clojure-tools-deps-alpha-resolve-deps</guid>
<pubDate>Thu, 02 Jun 2022 14:21:52 +0000</pubDate>
</item>
<item>
<title>tools.deps not working when downloading a big jar on a small machine</title>
<link>https://ask.clojure.org/index.php/11840/tools-deps-not-working-when-downloading-big-jar-small-machine</link>
<description>&lt;p&gt;I started an ec2 t3.nano instance and created a clojure deps project. The only dependency I had was a private jar file which weighted around ~100mb.&lt;br&gt;
&lt;code&gt;clj&lt;/code&gt; command could not download the file and was misleading in its error :&lt;br&gt;
 &lt;code&gt;Error building classpath. Could not find artifact name/of/artifact&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;By curiosity I looked at tools.deps code and tried to run the s3 call :&lt;br&gt;
&lt;code&gt;`&lt;/code&gt;&lt;br&gt;
(aws/invoke s3-client {:op :GetObject&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;                     :request {:Bucket &quot;bucketname&quot;
                               :Key &quot;/path/to/jar&quot;}})
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;code&gt;`&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;and then we had a clear error (see &lt;a rel=&quot;nofollow&quot; href=&quot;https://clojurians.slack.com/files/U2N9GDB1U/F03E16TB10Q/image.png&quot;&gt;https://clojurians.slack.com/files/U2N9GDB1U/F03E16TB10Q/image.png&lt;/a&gt;)&lt;/p&gt;
&lt;p&gt;It looks like cognitect http is keeping the file in memory, on a really small instance or a container it does not work (it worked with mvn)&lt;br&gt;
Quick fix: have a better error message&lt;br&gt;
Thanks a lot&lt;/p&gt;
</description>
<category>tools.deps</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/11840/tools-deps-not-working-when-downloading-big-jar-small-machine</guid>
<pubDate>Fri, 29 Apr 2022 06:54:04 +0000</pubDate>
</item>
<item>
<title>Possible concurrency issue with git deps</title>
<link>https://ask.clojure.org/index.php/11663/possible-concurrency-issue-with-git-deps</link>
<description>&lt;p&gt;When launching &lt;code&gt;clojure&lt;/code&gt; in our CI pipeline, we're occasionally seeing the problem in the logs below (edited for brevity). Clojure is trying to clone one of our git dependencies multiple times at once and ends up failing with the git error message &lt;code&gt;fatal: destination path '...' already exists and is not an empty directory.&lt;/code&gt;. The said dependency appears multiple times in our dependency tree.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;$ clojure -A:build:dev:test -P
Cloning: ssh://git@gitlab.com/xxx/yyy/www/our-repo.git
Cloning: ssh://git@gitlab.com/xxx/yyy/www/our-repo.git
Cloning: ssh://git@gitlab.com/xxx/yyy/www/our-repo.git
Downloading: org/clojure/clojure/1.10.3/clojure-1.10.3.pom from central
Error building classpath. Unable to clone /builds/xxx/yyy/zzz/.gitlibs/_repos/ssh/gitlab.com/xxx/yyy/www/our-repo
fatal: destination path '/builds/xxx/yyy/zzz/.gitlibs/_repos/ssh/gitlab.com/xxx/yyy/www/our-repo' already exists and is not an empty directory.
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Could this be a bug in tools.deps.alpha or in tools.gitlibs? This is different from &lt;a rel=&quot;nofollow&quot; href=&quot;https://clojure.atlassian.net/browse/TDEPS-180&quot;&gt;TDEPS-180&lt;/a&gt; in that in our case, we're launching only one &lt;code&gt;clojure&lt;/code&gt; process.&lt;/p&gt;
&lt;p&gt;We're using &lt;code&gt;Clojure CLI version 1.10.3.1040&lt;/code&gt;. We're upgrading to 1.10.3.1087, but since this problem happens intermittently, it will take a while to tell if it helps.&lt;/p&gt;
</description>
<category>tools.deps</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/11663/possible-concurrency-issue-with-git-deps</guid>
<pubDate>Thu, 24 Mar 2022 07:23:41 +0000</pubDate>
</item>
<item>
<title>Allow configuring behavior for -X when it's invoked as entry point</title>
<link>https://ask.clojure.org/index.php/11598/allow-configuring-behavior-for-when-its-invoked-entry-point</link>
<description>&lt;h2&gt;Problem&lt;/h2&gt;
&lt;p&gt;It is useful to add custom behavior for program entry points. Examples of such behavior:&lt;br&gt;
- calling &lt;code&gt;(shutdown-agents)&lt;/code&gt; to ensure graceful shutdown;&lt;br&gt;
- calling &lt;code&gt;(Platform/exit)&lt;/code&gt; for JavaFX applications to ensure graceful shutdown;&lt;br&gt;
- rebinding &lt;code&gt;System/out&lt;/code&gt; and &lt;code&gt;System/err&lt;/code&gt; in test runners to collect &lt;em&gt;all&lt;/em&gt; output.&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;-main&lt;/code&gt; function for &lt;code&gt;-M&lt;/code&gt;-style entry points is a natural place to put these behaviors.&lt;/p&gt;
&lt;p&gt;One property of these behaviors is that they might be very useful for entry points, but they affect JVM in such a way that these programs might be impossible to integrate into longer-running programs.&lt;/p&gt;
&lt;p&gt;The situation with &lt;code&gt;-X&lt;/code&gt;-invokable functions is where this property is problematic because these are supposed to be invokable both as an entry point and as a part of a longer-running program called by the user of the dependency, but there is no way to tell those apart from inside the function.&lt;/p&gt;
&lt;h2&gt;Considered solutions&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;Do nothing. Library authors can add optional arguments to their &lt;code&gt;-X&lt;/code&gt;-invokable functions that disable special entry-point behavior, although this might be annoying to users if their programs break in unexpected ways when invoked from user code. Library authors can add optional args to enable special entry-point behavior instead of disabling it, but it makes the library more inconvenient to use at the command line. Library authors can create separate &lt;code&gt;-X&lt;/code&gt;-invokable functions for use at the command line and at the user code, but it decreases the usefulness of the whole idea of having the same API in code and at the CLI with &lt;code&gt;-X&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;-X&lt;/code&gt;-style invocations can be given an extra argument by clj-exec that hints that it is invoked as an entry point, e.g. &lt;code&gt;clj -X clojure.core/prn :a 1&lt;/code&gt; will print &lt;code&gt;{:entry-point true :a 1}&lt;/code&gt;. I think this is behavior is unexpected and might be confusing or even annoying.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;-X&lt;/code&gt;-invokable vars can define metadata that will be added to the arg when invoked as an entry point, e.g.:&lt;br&gt;
&lt;code&gt;(defn ^{:default-clj-exec-argmap {:rebind-system-err true}} do-stuff [argmap] ...)&lt;/code&gt;&lt;br&gt;
Then, running &lt;code&gt;clj -X my.ns/do-stuff :other :args&lt;/code&gt; will use &lt;code&gt;{:rebind-system-err true}&lt;/code&gt; as a default argmap that will then be merged with other args.&lt;/li&gt;
&lt;/ol&gt;
</description>
<category>Tools</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/11598/allow-configuring-behavior-for-when-its-invoked-entry-point</guid>
<pubDate>Mon, 21 Feb 2022 19:51:06 +0000</pubDate>
</item>
<item>
<title>Will tools.build be released as a jar?</title>
<link>https://ask.clojure.org/index.php/11433/will-tools-build-be-released-as-a-jar</link>
<description>&lt;p&gt;I am developing a library with a dependency on tools.build and I would like to publish it as a jar.  Whilst tools.build is only available as a git dep, I cannot include it as a dependency in my pom file.  A wider discussion on this topic was held on this &lt;a rel=&quot;nofollow&quot; href=&quot;https://clojurians.slack.com/archives/C6QH853H8/p1641381677207800&quot;&gt;slack thread&lt;/a&gt;, where @alexmiller requested that I raise this topic here.&lt;/p&gt;
</description>
<category>tools.build</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/11433/will-tools-build-be-released-as-a-jar</guid>
<pubDate>Wed, 05 Jan 2022 15:02:43 +0000</pubDate>
</item>
<item>
<title>tools.deps.graph uses an outdated version of tools.deps.alpha that doesn't support :git/sha coordinates</title>
<link>https://ask.clojure.org/index.php/11376/tools-graph-outdated-version-alpha-doesnt-support-coordinates</link>
<description>&lt;p&gt;Repro deps.edn:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;{:deps {io.github.clojure/spec-alpha2 {:git/sha &quot;99456b1856a6fd934e2c30b17920bd790dd81775&quot;}}}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Running &lt;code&gt;clj -X:project/graph-deps&lt;/code&gt;, where project/graph-deps is the following alias in &lt;code&gt;~/.clojure/deps.edn&lt;/code&gt;:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;:project/graph-deps
{:replace-paths []
 :replace-deps  {org.clojure/tools.deps.graph {:mvn/version &quot;1.0.63&quot;}}
 :ns-default    clojure.tools.deps.graph
 :exec-fn       graph
 :exec-args     {:output &quot;project-dependencies-graph.png&quot;
                 :size   true}}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Results in:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;Library io.github.clojure/spec-alpha2 has missing :sha in coordinate.&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Bumping the &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/clojure/tools.deps.graph/blob/4a103ca8c510295f1608969a6ad237f23e96d74e/deps.edn#L3&quot;&gt;version of tools.deps.alpha&lt;/a&gt; to 0.12.1090 seems to fix the issue&lt;/p&gt;
</description>
<category>tools.deps.graph</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/11376/tools-graph-outdated-version-alpha-doesnt-support-coordinates</guid>
<pubDate>Fri, 10 Dec 2021 12:54:46 +0000</pubDate>
</item>
<item>
<title>Is it possible to build an uberwar using deps.edn using tools.build or other tool?</title>
<link>https://ask.clojure.org/index.php/11341/possible-build-uberwar-using-deps-using-tools-build-other-tool</link>
<description>&lt;p&gt;We have a small Clojure &amp;amp; ClojureScript web app running in Tomcat. The project managed to end up with a deps.edn for use with Shadow-cljs &amp;amp; lein for the backend to essentially build an uberwar. Is there a way to build an uberwar with tools-build or in some other way using deps.edn?&lt;/p&gt;
&lt;p&gt;Thanks for any pointers&lt;/p&gt;
&lt;p&gt;Cheers&lt;br&gt;
Daniel Sunnerek&lt;/p&gt;
</description>
<category>tools.build</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/11341/possible-build-uberwar-using-deps-using-tools-build-other-tool</guid>
<pubDate>Thu, 02 Dec 2021 13:22:01 +0000</pubDate>
</item>
<item>
<title>tools.deps - How do I list dependencies and their versions from the REPL?</title>
<link>https://ask.clojure.org/index.php/11268/tools-deps-how-list-dependencies-and-their-versions-from-repl</link>
<description>&lt;p&gt;I want to check which version of some dependencies I have loaded in the project from the REPL. Can it be done? How do I do this, if so?&lt;/p&gt;
&lt;p&gt;The project I am working with is started via a rather involved script, making it a bit hard to know what version of certain dependencies are eventually loaded. I am thinking that once I have a REPL, then I have the truth. &lt;/p&gt;
&lt;p&gt;It's a tools.deps project&lt;/p&gt;
</description>
<category>REPL</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/11268/tools-deps-how-list-dependencies-and-their-versions-from-repl</guid>
<pubDate>Thu, 11 Nov 2021 11:47:04 +0000</pubDate>
</item>
<item>
<title>Allow absolute paths for file-based Git URLS</title>
<link>https://ask.clojure.org/index.php/11251/allow-absolute-paths-for-file-based-git-urls</link>
<description>&lt;p&gt;&lt;strong&gt;Type:&lt;/strong&gt; Enhancement&lt;br&gt;
&lt;strong&gt;Summary:&lt;/strong&gt; Expand &lt;code&gt;tools.gitlibs&lt;/code&gt; support for local Git URLs&lt;br&gt;
&lt;strong&gt;Description:&lt;/strong&gt;&lt;br&gt;
When specifying a local file-based URL for a Git repo containing a dependency, I encounter the following error when using an absolute URL:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;`&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;java.lang.IllegalArgumentException: /path/to/my/repo is not a relative path&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;    at clojure.java.io$as_relative_path.invokeStatic(io.clj:414)
    at clojure.java.io$file.invokeStatic(io.clj:426)
    at clojure.java.io$file.invoke(io.clj:418)
    at clojure.lang.ArraySeq.reduce(ArraySeq.java:111)
    at clojure.core$reduce.invokeStatic(core.clj:6829)
    at clojure.java.io$file.invokeStatic(io.clj:418)
    at clojure.tools.gitlibs.impl$git_dir.invokeStatic(impl.clj:59)
    at clojure.tools.gitlibs.impl$ensure_git_dir.invokeStatic(impl.clj:80)
    at clojure.tools.gitlibs$procure.invokeStatic(gitlibs.clj:61)
    at clojure.tools.deps.alpha.extensions.git$fn__1317.invokeStatic(git.clj:98)
    at clojure.tools.deps.alpha.extensions.git$fn__1317.invoke(git.clj:96)
    at clojure.lang.MultiFn.invoke(MultiFn.java:239)
    at clojure.tools.deps.alpha$expand_deps.invokeStatic(alpha.clj:425)
    at clojure.tools.deps.alpha$resolve_deps.invokeStatic(alpha.clj:495)
    at clojure.tools.deps.alpha$calc_basis.invokeStatic(alpha.clj:738)
    ...
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;code&gt;`&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;The requirement of relative URLs makes specifying dependencies more difficult in certain contexts - the specific motivating use case for me is a WSL environment where the Clojure process is running in Ubuntu/WSL but the source code is in the Windows filesystem.&lt;/p&gt;
&lt;p&gt;Alex Miller mentioned on the Clojurians Slack when I mentioned this problem that &quot;that's really a subset of the problem - the code that translates git urls to cache dirs and libs doesn't handle either raw paths or relative urls.&quot;&lt;/p&gt;
</description>
<category>tools.gitlibs</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/11251/allow-absolute-paths-for-file-based-git-urls</guid>
<pubDate>Fri, 05 Nov 2021 19:24:15 +0000</pubDate>
</item>
<item>
<title>Using a git SHA for a local git dependency?</title>
<link>https://ask.clojure.org/index.php/11250/using-a-git-sha-for-a-local-git-dependency</link>
<description>&lt;p&gt;&lt;strong&gt;Type:&lt;/strong&gt; Enhancement&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Summary:&lt;/strong&gt; Use git SHAs + tags for local deps&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Description:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Currently, when working with local dependencies, I cannot use a git tag to refer to a specific revision of a project. &lt;code&gt;:local/root&lt;/code&gt; only respects the current version of the working tree, which can make using local deps under active development a bit trickier. &lt;/p&gt;
&lt;p&gt;Support for SHAs and tags for local projects which are specified via file-based Git URLs would allow projects consuming local deps to specify the state of those projects unambiguously.&lt;/p&gt;
&lt;p&gt;I previously asked a version of this question on the Clojurians slack and was referred here by Alex Miller.&lt;/p&gt;
</description>
<category>tools.deps</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/11250/using-a-git-sha-for-a-local-git-dependency</guid>
<pubDate>Fri, 05 Nov 2021 19:12:28 +0000</pubDate>
</item>
<item>
<title>:deps in dependency not (always) working when there is no :path specified in dependency</title>
<link>https://ask.clojure.org/index.php/11193/deps-dependency-always-working-there-specified-dependency</link>
<description>&lt;p&gt;Similar to this question &lt;a rel=&quot;nofollow&quot; href=&quot;https://ask.clojure.org/index.php/7848/transitive-paths-current-project-unspecified-transitive&quot;&gt;https://ask.clojure.org/index.php/7848/transitive-paths-current-project-unspecified-transitive&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I am not sure how to reliably reproduce this, but I had a problem with dependencies not being picked up from a &lt;code&gt;:local/root&lt;/code&gt; dependency, and my colleague found the linked question, and it helped me find a workaround.&lt;/p&gt;
&lt;p&gt;In my case my full deps in the dependency project was:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;{:paths [&quot;src&quot;]}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Changing it to:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;{:paths [&quot;src&quot;]
 :deps {}}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;made things work.&lt;/p&gt;
&lt;p&gt;I do have another project with the same dependency, and it was happy with the no-deps version.&lt;/p&gt;
&lt;p&gt;This was in a dependency of a dependency. So I have both these cases:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Not working&lt;/strong&gt;: &lt;code&gt;project-a&lt;/code&gt; -&amp;gt; -&lt;code&gt;dependency-1&lt;/code&gt; -&amp;gt; &lt;code&gt;dependency-2-path-only&lt;/code&gt; &lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Working&lt;/strong&gt;: &lt;code&gt;project-b&lt;/code&gt; -&amp;gt; -&lt;code&gt;dependency-1&lt;/code&gt; -&amp;gt; &lt;code&gt;dependency-2-path-only&lt;/code&gt; &lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;(”Not working/Working” as in &lt;code&gt;dependency-2-path-only&lt;/code&gt; not being on the classpath of  &lt;code&gt;project-a&lt;/code&gt;, but on the classpath of &lt;code&gt;project-b&lt;/code&gt;.)&lt;/p&gt;
&lt;p&gt;Further... &lt;code&gt;dependency-1&lt;/code&gt; is in a sub directory of &lt;code&gt;dependency-2-path-only&lt;/code&gt;.  So in &lt;code&gt;dependency-2-path-only/dependency-1/deps.edn&lt;/code&gt;:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;{:paths [&quot;src&quot;]
 :deps {d2/dependency-2-path-only {:local/root &quot;..&quot;}}}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;I realize now, after having described all this that I could have made a repro instead.  Let me know if that is needed.&lt;/p&gt;
&lt;p&gt;I'm currently on 1.10.3.967, btw.&lt;/p&gt;
</description>
<category>tools.deps</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/11193/deps-dependency-always-working-there-specified-dependency</guid>
<pubDate>Tue, 26 Oct 2021 08:42:30 +0000</pubDate>
</item>
<item>
<title>tools.build uber task fails when the dependency tree contains a dep which has no jar</title>
<link>https://ask.clojure.org/index.php/11156/tools-build-uber-task-fails-when-dependency-contains-which</link>
<description>&lt;p&gt;The &lt;code&gt;clojure.tools.build.api/uber&lt;/code&gt; task fails when the dependency tree contains a dep which has no jar.  &lt;/p&gt;
&lt;p&gt;A relatively minimal failing test case is the following tools.build task:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;(ns build 
  (:require [clojure.tools.build.api :as b]))

(defn failing-uber [_]
    (b/uber {:class-dir &quot;classes&quot;
     :uber-file &quot;foo.jar&quot;
     :basis (b/create-basis {:project {:deps {'org.apache.jena/apache-jena-libs {:mvn/version &quot;4.2.0&quot; :extension &quot;pom&quot;} }}})})

(comment 
   (failing-uber {})
 )
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Evaluating the above function results in the following exception:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;1. Unhandled clojure.lang.ExceptionInfo
   Unexpected lib file:
   /Users/rick/.m2/repository/org/apache/jena/apache-jena-libs/4.2.0/apache-jena-libs-4.2.0.pom
   {}
                  uber.clj:  182  clojure.tools.build.tasks.uber/explode
                  uber.clj:  141  clojure.tools.build.tasks.uber/explode
                  uber.clj:  257  clojure.tools.build.tasks.uber/uber/fn/fn
     PersistentVector.java:  343  clojure.lang.PersistentVector/reduce
                  core.clj: 6829  clojure.core/reduce
                  core.clj: 6812  clojure.core/reduce
                  uber.clj:  256  clojure.tools.build.tasks.uber/uber/fn
             protocols.clj:   49  clojure.core.protocols/iter-reduce
             protocols.clj:   75  clojure.core.protocols/fn
             protocols.clj:   75  clojure.core.protocols/fn
             protocols.clj:   13  clojure.core.protocols/fn/G
                  core.clj: 6830  clojure.core/reduce
                  core.clj: 6812  clojure.core/reduce
                  uber.clj:  254  clojure.tools.build.tasks.uber/uber
                  uber.clj:  241  clojure.tools.build.tasks.uber/uber
                  Var.java:  384  clojure.lang.Var/invoke
                   api.clj:  394  clojure.tools.build.api/uber
                   api.clj:  339  clojure.tools.build.api/uber
                      REPL:   21  build/eval25043
                      REPL:   21  build/eval25043
             Compiler.java: 7181  clojure.lang.Compiler/eval
             Compiler.java: 7136  clojure.lang.Compiler/eval
                  core.clj: 3202  clojure.core/eval
                  core.clj: 3198  clojure.core/eval
    interruptible_eval.clj:   87  nrepl.middleware.interruptible-eval/evaluate/fn/fn
                  AFn.java:  152  clojure.lang.AFn/applyToHelper
                  AFn.java:  144  clojure.lang.AFn/applyTo
                  core.clj:  667  clojure.core/apply
                  core.clj: 1977  clojure.core/with-bindings*
                  core.clj: 1977  clojure.core/with-bindings*
               RestFn.java:  425  clojure.lang.RestFn/invoke
    interruptible_eval.clj:   87  nrepl.middleware.interruptible-eval/evaluate/fn
                  main.clj:  437  clojure.main/repl/read-eval-print/fn
                  main.clj:  437  clojure.main/repl/read-eval-print
                  main.clj:  458  clojure.main/repl/fn
                  main.clj:  458  clojure.main/repl
                  main.clj:  368  clojure.main/repl
               RestFn.java:  137  clojure.lang.RestFn/applyTo
                  core.clj:  667  clojure.core/apply
                  core.clj:  662  clojure.core/apply
                regrow.clj:   20  refactor-nrepl.ns.slam.hound.regrow/wrap-clojure-repl/fn
               RestFn.java: 1523  clojure.lang.RestFn/invoke
    interruptible_eval.clj:   84  nrepl.middleware.interruptible-eval/evaluate
    interruptible_eval.clj:   56  nrepl.middleware.interruptible-eval/evaluate
    interruptible_eval.clj:  152  nrepl.middleware.interruptible-eval/interruptible-eval/fn/fn
                  AFn.java:   22  clojure.lang.AFn/run
               session.clj:  202  nrepl.middleware.session/session-exec/main-loop/fn
               session.clj:  201  nrepl.middleware.session/session-exec/main-loop
                  AFn.java:   22  clojure.lang.AFn/run
               Thread.java:  825  java.lang.Thread/run
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;I believe this is because the above dependency has no corresponding jar file, and only contains a pom.xml which groups up a set of dependencies.&lt;/p&gt;
</description>
<category>tools.build</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/11156/tools-build-uber-task-fails-when-dependency-contains-which</guid>
<pubDate>Tue, 12 Oct 2021 14:00:42 +0000</pubDate>
</item>
<item>
<title>Resolve git deps via artifactory</title>
<link>https://ask.clojure.org/index.php/11063/resolve-git-deps-via-artifactory</link>
<description>&lt;p&gt;As a follow up to &lt;a rel=&quot;nofollow&quot; href=&quot;https://ask.clojure.org/index.php/8866/using-git-deps-in-a-restricted-environment?show=8866#q8866&quot;&gt;https://ask.clojure.org/index.php/8866/using-git-deps-in-a-restricted-environment?show=8866#q8866&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Given the increasing usage of git deps (eg tools.build) it is increasingly painful to use in corporate environments without direct github access. The majority of such corporates use tools like artifactory which, other than proxy things like maven, also allow proxying GitHub. &lt;/p&gt;
&lt;p&gt;Specifically it allows access, via an API, that will download a specific sha or tag from github as a zip/tar archive. &lt;/p&gt;
&lt;p&gt;In a general sense, could tools.deps be augmented to support this use case? I can see a few scenarios:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Provide a remote/root or remote/archive  that works similar to a local/root, but can source from an arbitrary zip/tar provided by a url&lt;/li&gt;
&lt;li&gt;Similarly allow git deps to resolve from some archive provided from a url&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Since the url will have the tag/sha in it, presumably tools.deps would not need to download it again unless the URL was changed. &lt;/p&gt;
</description>
<category>tools.deps</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/11063/resolve-git-deps-via-artifactory</guid>
<pubDate>Wed, 15 Sep 2021 13:07:15 +0000</pubDate>
</item>
<item>
<title>Should tools.build functions respect with-dir (from tools.deps.alpha)?</title>
<link>https://ask.clojure.org/index.php/11027/should-tools-build-functions-respect-with-from-tools-alpha</link>
<description>&lt;p&gt;I ran across this issue with &lt;code&gt;depstar&lt;/code&gt; but observed that &lt;code&gt;tools.build&lt;/code&gt; behaves the same, possibly incorrect, way.&lt;/p&gt;
&lt;p&gt;See &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/seancorfield/with-dir-repro&quot;&gt;https://github.com/seancorfield/with-dir-repro&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;If you wrap &lt;code&gt;(b/create-basis ..)&lt;/code&gt; in &lt;code&gt;with-dir&lt;/code&gt; from &lt;code&gt;tools.deps.alpha&lt;/code&gt;, it calculates the basis from the &lt;code&gt;deps.edn&lt;/code&gt; file in the context of the &lt;code&gt;with-dir&lt;/code&gt; location.&lt;/p&gt;
&lt;p&gt;However, if you use that basis with &lt;code&gt;tools.build&lt;/code&gt; functions, they do not behave correctly -- even if they are also wrapped in the same &lt;code&gt;with-dir&lt;/code&gt; context.&lt;/p&gt;
&lt;p&gt;The dependencies come from the project &lt;code&gt;deps.edn&lt;/code&gt; (Clojure 1.9.0 in this example) but the &lt;code&gt;src&lt;/code&gt; used is from the root of the repo, not from the project folder.&lt;/p&gt;
&lt;p&gt;This is counter-intuitive (and took me a while to track down with &lt;code&gt;depstar&lt;/code&gt; -- where I definitely consider it to be a bug).&lt;/p&gt;
</description>
<category>tools.build</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/11027/should-tools-build-functions-respect-with-from-tools-alpha</guid>
<pubDate>Wed, 08 Sep 2021 22:02:10 +0000</pubDate>
</item>
<item>
<title>Hope tools.deps.alpha add feature for listing available aliases</title>
<link>https://ask.clojure.org/index.php/11007/hope-tools-deps-alpha-add-feature-listing-available-aliases</link>
<description>&lt;p&gt;I think add an option for listing out available aliases will be helpful when there are many alaises.&lt;/p&gt;
&lt;p&gt;Here is my try. &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/seancorfield/dot-clojure/issues/7&quot;&gt;https://github.com/seancorfield/dot-clojure/issues/7&lt;/a&gt;&lt;/p&gt;
</description>
<category>tools.deps</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/11007/hope-tools-deps-alpha-add-feature-listing-available-aliases</guid>
<pubDate>Fri, 03 Sep 2021 07:54:40 +0000</pubDate>
</item>
<item>
<title>Why tools-deps downloads all deps again when i run the tests (locally and on CI)</title>
<link>https://ask.clojure.org/index.php/10999/why-tools-deps-downloads-all-deps-again-when-run-tests-locally</link>
<description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I am trying to download all deps so tests and other steps on CI should not do it.&lt;/p&gt;
&lt;p&gt;I run this command to download all deps&lt;br&gt;
&lt;code&gt; clojure -Sdeps '{:mvn/local-repo &quot;.m2&quot;}' -A:dev:test:prod:frontend -Spath &amp;gt; /dev/null&lt;/code&gt;&lt;br&gt;
I can confirm &lt;code&gt;.m2&lt;/code&gt; and &lt;code&gt;.cpcache&lt;/code&gt; dirs are there.&lt;/p&gt;
&lt;p&gt;But when I run &lt;br&gt;
&lt;code&gt;clojure -Sdeps '{:mvn/local-repo &quot;.m2&quot;}' -M:dev:test&lt;/code&gt;&lt;br&gt;
All deps are being downloaded again.&lt;/p&gt;
&lt;p&gt;It reproduces locally and on ci.&lt;/p&gt;
&lt;p&gt;Sdescribe&lt;br&gt;
&lt;code&gt;{:version &quot;1.10.3.967&quot;
 :config-files [&quot;/usr/local/Cellar/clojure/1.10.3.967/deps.edn&quot; &quot;/Users/kirill/.clojure/deps.edn&quot; &quot;deps.edn&quot; ]
 :config-user &quot;/Users/kirill/.clojure/deps.edn&quot;
 :config-project &quot;deps.edn&quot;
 :install-dir &quot;/usr/local/Cellar/clojure/1.10.3.967&quot;
 :config-dir &quot;/Users/kirill/.clojure&quot;
 :cache-dir &quot;.cpcache&quot;
 :force false
 :repro false
 :main-aliases &quot;&quot;
 :repl-aliases &quot;&quot;}&lt;/code&gt;&lt;/p&gt;
</description>
<category>Tools</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/10999/why-tools-deps-downloads-all-deps-again-when-run-tests-locally</guid>
<pubDate>Thu, 02 Sep 2021 13:50:27 +0000</pubDate>
</item>
<item>
<title>getting &quot;Function not found&quot; when invoking clojure with -X:alias</title>
<link>https://ask.clojure.org/index.php/10947/getting-function-not-found-when-invoking-clojure-with-alias</link>
<description>&lt;p&gt;I have two aliases in my deps.edn:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;{
 :deps
 {
  org.clojure/spec.alpha {:mvn/version &quot;0.2.194&quot;}
  aleph/aleph {:mvn/version &quot;0.4.7-alpha7&quot;}
  hiccup/hiccup {:mvn/version &quot;2.0.0-alpha2&quot;}
  }

 :aliases 
 { 
  :web-server {
               :exec-fn web.network-service/run 
               :exec-args {:port 8080} 
               }
  :test-web-server { 
                    :exec-fn test.tnetwork-service/run 
                    :exec-args {:port 9090}
                    }
  }
 }
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;When invoking &lt;/p&gt;
&lt;pre&gt;&lt;code&gt;clojure -X:web-server
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;I get &lt;/p&gt;
&lt;pre&gt;&lt;code&gt;Function not found: web.network-service/run
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Everything is honky dory when invoking &lt;/p&gt;
&lt;pre&gt;&lt;code&gt;clojure -X:test-web-server
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;I don't see why would that be, the exec-funs are basically identical. Take a look at full code here: &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/sidesteps/network-grid&quot;&gt;https://github.com/sidesteps/network-grid&lt;/a&gt;&lt;br&gt;
I have   &lt;code&gt;:paths [&quot;.&quot; &quot;src&quot;]&lt;/code&gt; in my global deps.edn&lt;/p&gt;
</description>
<category>Tools</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/10947/getting-function-not-found-when-invoking-clojure-with-alias</guid>
<pubDate>Wed, 18 Aug 2021 16:07:57 +0000</pubDate>
</item>
<item>
<title>Did TDEPS-187 break add-libs?</title>
<link>https://ask.clojure.org/index.php/10936/did-tdeps-187-break-add-libs</link>
<description>&lt;p&gt;TDEPS-187 changed &lt;code&gt;clojure.tools.deps.alpha/calc-basis&lt;/code&gt;, which now merges &lt;code&gt;argmaps&lt;/code&gt; after &lt;code&gt;{:libs libs}&lt;/code&gt; - &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/clojure/tools.deps.alpha/commit/f6fd34bc0118fa09d85d17e69f2bd43c55443d05#diff-44962de9e3f059bc9f2882985c29b51ec5b55fc0c9710fdff00c2af211fce72f&quot;&gt;diff&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;I'm running on tools deps at &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/clojure/tools.deps.alpha/commit/02809dbd41d4fe6e269ee67316d054a04bc70678&quot;&gt;this commit&lt;/a&gt;, and I'm unable to add libs.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;clojure.tools.deps.alpha.repl/add-libs&lt;/code&gt; calls &lt;code&gt;calc-basis&lt;/code&gt; with &lt;code&gt;initial-basis&lt;/code&gt; as the second argument, which means the &lt;code&gt;:libs&lt;/code&gt; in initial basis replace those calculated by &lt;code&gt;calc-basis&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Switching the merge order to: &lt;/p&gt;
&lt;p&gt;&lt;code&gt;`&lt;/code&gt;clojure&lt;br&gt;
(merge master-edn cp argmaps {:libs libs})&lt;code&gt;
&lt;/code&gt;``&lt;/p&gt;
&lt;p&gt;enables me to add libs to the classpath.&lt;/p&gt;
&lt;p&gt;Is this a regression, or am I holding it wrong?&lt;/p&gt;
</description>
<category>REPL</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/10936/did-tdeps-187-break-add-libs</guid>
<pubDate>Thu, 12 Aug 2021 14:02:38 +0000</pubDate>
</item>
</channel>
</rss>