tools-deps

Discuss tools.deps.alpha, tools.build, and the clj/clojure command-line scripts! See also #depstar #clj-new
dominicm 2020-09-13T13:35:53.217800Z

I suppose that the new -X stuff can't express regex directly, as it's EDN based. I only mention it because it's one of a handful of types that couldn't be passed to a function directly, and a wrapping string-based function would be needed for use from the CLI.

alexmiller 2020-09-13T13:49:47.218Z

Yep

seancorfield 2020-09-13T17:35:11.219Z

Yup, that's what I did for depstar's --exclude arg, but the command-line version is also a plain string so both logic paths have to turn it into a pattern.

borkdude 2020-09-13T18:26:21.219600Z

same with EDN config, I also use strings as regex in clj-kondo's config in places

2020-09-13T18:32:16.220500Z

I’m wondering about this strange syntax in <install-dir>/deps.edn:

{…
  {:aliases ...}
  R
  ...
}
So it looks like an embedded deps map is used as a key pointing at the -R option? How does this work? I couldn’t find this documented anywhere on the clojure site’s Deps and CLI reference. (Using clojure 1.10.1.590)

seancorfield 2020-09-13T20:32:54.221900Z

@kingcode I don't see that in any of the versions I have installed -- is it possible you've accidentally edited it?

seancorfield 2020-09-13T20:35:43.222400Z

Here's what's in my system install deps.edn for that version:

seanc@DESKTOP-30ICA76:~$ cat /home/linuxbrew/.linuxbrew/Cellar/clojure@1.10.1.590/1.10.1.590/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.9.745"}}}
    :test {:extra-paths ["test"]}
  }

  :mvn/repos {
    "central" {:url "<https://repo1.maven.org/maven2/>"}
    "clojars" {:url "<https://repo.clojars.org/>"}
  }
}

2020-09-13T20:40:35.224100Z

@seancorfield Sorry, I meant my config dir, not the install.. I think maybe installing rebl recently caused a bad edit - here is the effective content of .clojure/deps.edn:

{ ;...
 {:aliases
  {:rebl        ;; for JDK 11+
   {:extra-deps {com.cognitect/rebl          {:mvn/version "0.9.241"}
                 org.openjfx/javafx-fxml     {:mvn/version "15-ea+6"}
                 org.openjfx/javafx-controls {:mvn/version "15-ea+6"}
                 org.openjfx/javafx-swing    {:mvn/version "15-ea+6"}
                 org.openjfx/javafx-base     {:mvn/version "15-ea+6"}
                 org.openjfx/javafx-web      {:mvn/version "15-ea+6"}}
    :main-opts ["-m" "cognitect.rebl"]}
   :rebl-jdk8   ;; for JDK 8
   {:extra-deps {com.cognitect/rebl {:mvn/version "0.9.241"}}
    :main-opts ["-m" "cognitect.rebl"]}}}

R
;;....
}

seancorfield 2020-09-13T20:41:16.224500Z

This is definitely not legal syntax

alexmiller 2020-09-13T20:41:28.224800Z

Agreed :)

2020-09-13T20:42:16.225800Z

OK…<sigh-of-relief> thx for your comments. I probably should remove the R and make the embedded map the entire effective content then?

seancorfield 2020-09-13T20:44:44.227200Z

Hard to say. My ~/.clojure/deps.edn looks like this: https://github.com/seancorfield/dot-clojure/blob/develop/deps.edn

seancorfield 2020-09-13T20:45:08.227800Z

But :aliases should be a top-level key in the overall map.

2020-09-13T20:46:51.228600Z

Thanks @seancornfield - that makes sense 🙂

dpsutton 2020-09-13T21:19:05.234400Z

Aliases always go in a map with the other aliases. That example is correct. And your deps.edn locally will largely look the same yes?

2020-09-13T21:28:38.236500Z

woops @dpsutton and @alexmiller Sorry indeed my mistake. The Rebl distro alias example works fine 🙂 Too much staring.

1