0

It seems as though it's not possible to reuse one deps.edn alias from another, but I'd love to be proven wrong about this.

For example, say you have a :dev alias with some :extra-deps, :extra-paths, etc, and then a handful of dev-related aliases which can only be run with the stuff in :dev. You can obviously just run with -A:dev:other-alias (or -M, -X, etc), but it seems like there should be a way to just say that :other-alias depends on :dev so that explicitly adding it is not necessary.

I have tried adding :main-opts ["-A:dev"], but this doesn't work (you get a java.io.FileNotFoundException: -A:dev (No such file or directory), suggesting that it thinks this is the name of a clj file you're trying to run.

Is there a way to do this, or are we stuck either duplicating content or requiring users to explicitly add the reused (e.g. :dev) alias?

metasoarous
  • 2,854
  • 1
  • 23
  • 24

1 Answers1

3

It is not possible right now. You can vote for this feature request at https://ask.clojure.org/index.php/10564/specify-an-alias-that-is-a-set-of-other-aliases

Alex Miller
  • 69,183
  • 25
  • 122
  • 167