Fork me on GitHub
#tools-deps
<
2020-06-10
>
porkostomus00:06:40

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.

seancorfield00:06:45

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

seancorfield00:06:30

I'll update my dot clojure file

seancorfield00:06:00

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

Aaron Cummings21:06:53

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 ""}
    ;; "clojars" {:url ""}
    "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?

alexmiller21:06:06

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

alexmiller21:06:20

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

Aaron Cummings21:06:24

Okay, I'll give that a try.

alexmiller21:06:56

(that would have worked on older version too)

Derek Passen21:06:49

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

alexmiller22:06:01

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

alexmiller22:06:11

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

Aaron Cummings21:06:51

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.

seancorfield21:06:32

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 Passen21:06:41

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

Derek Passen21:06:46

at least i think it’s CLJ_CONFIG

seancorfield21:06:45

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 Passen22:06:34

I probably learned it from your mention somewhere 🙂

seancorfield22:06:41

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

Aaron Cummings23:06:51

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