tools-deps

Discuss tools.deps.alpha, tools.build, and the clj/clojure command-line scripts! See also #depstar #clj-new
camsaul 2021-06-18T21:13:12.255300Z

If I'm using a :local/root dependency, is there any way to tell it to use a specific profile alias from its deps.edn?

alexmiller 2021-06-18T21:17:05.259200Z

not currently

alexmiller 2021-06-18T21:18:51.260Z

if you want to vote, there is a request for that here https://ask.clojure.org/index.php/7843/allow-specifying-aliases-coordinates-that-point-projects

đź‘Ť 1
alexmiller 2021-06-18T21:19:14.260700Z

but even better would be to describe your use case in a comment htere

camsaul 2021-06-18T21:24:29.264800Z

Sure. Here's my specific use-case: At Metabase we ship both an FOSS edition (under the AGPL) and an Enterprise Edition under a commercial license. We can't ship the Oracle JDBC driver in the FOSS edition because the license terms of the JDBC driver make it AGPL-incompatible. However, we can ship it with the EE version. The Oracle driver is itself a subproject in the larger Metabase-core repo. So I want to be able to have a top-level :ee aliases that merges in the :ee aliases from the :local/root stuff it pulls in. Example:

;; ./deps.edn
{:deps
 {:local/root "oracle-driver"}
 
 :aliases
 {:ee
  {:extra-deps {:local/root "oracle-driver", :alias :ee}}}}

;; oracle-driver/deps.edn
{:aliases 
 {:ee
  {:extra-deps
   {com.oracle.ojdbc/ojdbc8 {:mvn/version "19.3.0.0"}}}}}

alexmiller 2021-06-18T21:24:53.265200Z

please put it on ask, I'll lose this here

camsaul 2021-06-18T21:25:15.265600Z

Np

seancorfield 2021-06-18T21:28:17.267Z

@camsaul You’ve introduced a new top-level key into your deps.edn file? I think that’s a bit of a “no-no” — you could put it under an alias though (aliases can be “just data”).

camsaul 2021-06-18T21:28:50.267400Z

Sorry. Not :profiles. :aliases. I'll fix the example

camsaul 2021-06-18T21:29:06.267900Z

I'm translated it from a project.clj file for the example and got my wires crossed a bit

seancorfield 2021-06-18T21:29:50.268300Z

Ah, gotcha.