tools-deps

Discuss tools.deps.alpha, tools.build, and the clj/clojure command-line scripts! See also #depstar #clj-new
porkostomus 2020-06-10T00:32:40.295700Z

I can use the CLI to launch the Liquid Clojure editor from Windows Powershell, but only if I escape the double-quotes:

PS C:\Users\admin> clj -Sdeps '{:deps {mogenslund/liquid {:mvn/version \"RELEASE\"}}}' -m liq.core
It fails however if I try to use the alias:
PS C:\Users\admin> clj -A:liquid
Execution error (FileNotFoundException) at clojure.main/main (main.java:40).
Could not locate dk/salza/liq/core__init.class, dk/salza/liq/core.clj or dk/salza/liq/core.cljc on classpath.

Full report at:
C:\Users\admin\AppData\Local\Temp\clojure-4978726344790284382.edn
My deps.edn entry:
:liquid
  {:extra-deps {mogenslund/liquid {:mvn/version "RELEASE"}}
   :main-opts ["-m" "dk.salza.liq.core"]}
All the other aliases seem to work fine.

seancorfield 2020-06-10T00:41:45.296400Z

@porkostomus Looks like the project changed it's main namespace (from dk.salza.liq.core to just liq.core)

seancorfield 2020-06-10T00:42:30.296700Z

I'll update my dot clojure file

seancorfield 2020-06-10T00:45:00.297300Z

@porkostomus I fixed the alias in my repo -- if you cloned that, you can just git pull to get the latest

porkostomus 2020-06-10T00:56:57.297700Z

@seancorfield Great, thanks!

Aaron Cummings 2020-06-10T21:34:53.303400Z

I have just upgraded from 1.10.0.442 to 1.10.1.536, and I've found a change in behavior. In .442 I had changed my $INSTALL/lib/clojure/deps.edn to point the central and clojars repos to a local partial mirror. In .536, the same change has no apparent effect. Here is an example of my lib/clojure/deps.edn:

{
  :paths ["src"]

  :deps {
    org.clojure/clojure {:mvn/version "1.10.1"}
  }

  :aliases {
    :deps {:extra-deps {org.clojure/tools.deps.alpha {:mvn/version "0.8.677"}}}
    :test {:extra-paths ["test"]}
  }

  :mvn/repos {
    ;; "central" {:url "<https://repo1.maven.org/maven2/>"}
    ;; "clojars" {:url "<https://repo.clojars.org/>"}
    "central" {:url "file:///home/aaron/cljtest/central/"}
    "clojars" {:url "file:///home/aaron/cljtest/clojars/"}
  }
}
The reason I'm doing this is our development machines at work do not have internet access, so I determine in advance all of our central and clojars dependencies and cache those locally in NFS. Is there a different way that I should override central and clojars default locations?

alexmiller 2020-06-10T21:37:06.303800Z

that file is no longer used - it's embedded in a resource in the uber jar

alexmiller 2020-06-10T21:37:20.304200Z

you can set those in your ~/.clojure/deps.edn though and should have the same effect

Aaron Cummings 2020-06-10T21:42:24.304500Z

Okay, I'll give that a try.

alexmiller 2020-06-10T21:43:56.304800Z

(that would have worked on older version too)

Derek Passen 2020-06-10T21:44:49.305400Z

on that note, when I run clj -Sverbose on 1.10.1.536, the config_paths still lists the system install deps.edn file

Aaron Cummings 2020-06-10T21:51:51.308300Z

Super, that did work. You're right @dpassen1 - the -Sverbose flag output did lead me astray. I did like the file in the installation - that let me setup for all of my users in one place. But I'll switch us over to the ~/.clojure/deps.edn instead.

seancorfield 2020-06-10T21:57:32.309700Z

Given that the system deps is meant to be stable and immutable, I think it's good for it to no longer be an actual file.

Derek Passen 2020-06-10T21:58:07.310Z

Agreed Sean

Derek Passen 2020-06-10T21:58:41.310400Z

There’s a reason for ~/.clojure/deps.edn and CLJ_CONFIG env var

Derek Passen 2020-06-10T21:58:46.310600Z

at least i think it’s CLJ_CONFIG

seancorfield 2020-06-10T21:59:45.311300Z

It is. We use that at work to point to a repo-wide deps file, and then each subproject in the repo has its own deps file.

Derek Passen 2020-06-10T22:00:34.312200Z

I probably learned it from your mention somewhere 🙂

seancorfield 2020-06-10T22:00:41.312500Z

CLJ_CONFIG=../versions clojure -A:defaults ... -- the :defaults alias pulls in all the :override-deps from versions/deps.edn

alexmiller 2020-06-10T22:01:01.312600Z

yeah, it's hard-coded in there and hasn't been updated

alexmiller 2020-06-10T22:02:11.312800Z

there are actually some tools that rely on this output and do (now incorrectly) still use the file so I have been delaying on removing it

Derek Passen 2020-06-10T22:02:26.313Z

makes sense

Aaron Cummings 2020-06-10T23:31:51.314600Z

I had forgotten about CLJ_CONFIG - that seems like the better solution to what I'm doing. Thanks for the pointers everybody.