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
?
not currently
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
but even better would be to describe your use case in a comment htere
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"}}}}}
please put it on ask, I'll lose this here
Np
@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”).
Sorry. Not :profiles
. :aliases
. I'll fix the example
I'm translated it from a project.clj
file for the example and got my wires crossed a bit
Ah, gotcha.