2 changes: 1 addition & 1 deletion Makefile
Expand Up @@ -20,7 +20,7 @@ install-deps: install-base
install-plugin: install-base
cd lein-plugin; lein with-profile -user install

# Usage: PROJECT_VERSION=1.18.4 make install
# Usage: PROJECT_VERSION=1.18.5 make install
# PROJECT_VERSION is needed because it's not computed dynamically
install: install-base install-deps install-plugin

Expand Down
2 changes: 1 addition & 1 deletion examples/Makefile
Expand Up @@ -30,7 +30,7 @@ DEPS_MAIN_OPTS ?= "-M:dev:test"

# The enrich-classpath version to be injected.
# Feel free to upgrade this.
ENRICH_CLASSPATH_VERSION="1.18.4"
ENRICH_CLASSPATH_VERSION="1.18.5"

# Create and cache a `java` command. project.clj is mandatory; the others are optional but are taken into account for cache recomputation.
# It's important not to silence with step with @ syntax, so that Enrich progress can be seen as it resolves dependencies.
Expand Down
2 changes: 1 addition & 1 deletion lein-plugin/Makefile
Expand Up @@ -27,7 +27,7 @@ DEPS_MAIN_OPTS ?= "-M:dev:test"

# The enrich-classpath version to be injected.
# Feel free to upgrade this.
ENRICH_CLASSPATH_VERSION="1.18.4"
ENRICH_CLASSPATH_VERSION="1.18.5"

# Create and cache a `java` command. project.clj is mandatory; the others are optional but are taken into account for cache recomputation.
# It's important not to silence with step with @ syntax, so that Enrich progress can be seen as it resolves dependencies.
Expand Down
2 changes: 1 addition & 1 deletion tools.deps/Makefile
Expand Up @@ -27,7 +27,7 @@ DEPS_MAIN_OPTS ?= "-M:dev:test"

# The enrich-classpath version to be injected.
# Feel free to upgrade this.
ENRICH_CLASSPATH_VERSION="1.18.4"
ENRICH_CLASSPATH_VERSION="1.18.5"

# Create and cache a `java` command. project.clj is mandatory; the others are optional but are taken into account for cache recomputation.
# It's important not to silence with step with @ syntax, so that Enrich progress can be seen as it resolves dependencies.
Expand Down
6 changes: 6 additions & 0 deletions tools.deps/src/cider/enrich_classpath/clojure.clj
Expand Up @@ -110,6 +110,12 @@
mv))
libs)
paths (into paths extra-paths)
paths (into []
(mapcat (fn [path]
(if (keyword? path)
(get-in basis [:aliases path] path)
(vector path))))
paths)
original-paths-set (set paths)
original-deps-set (->> original-deps (map first) set)
shortened-jar-signature (string/join File/separator
Expand Down
2 changes: 1 addition & 1 deletion tools.deps/src/cider/enrich_classpath/clojure.sh
Expand Up @@ -37,7 +37,7 @@ else
cd "$there"

# enrich-classpath will emit a command starting by "clojure", or print a stacktrace:
output=$(2>&1 "$clojure" -Sforce -Srepro -J-XX:-OmitStackTraceInFastThrow -J-Dclojure.main.report=stderr -Sdeps '{:deps {mx.cider/tools.deps.enrich-classpath {:mvn/version "1.18.4"}}}' -M -m cider.enrich-classpath.clojure "$clojure" "$here" "true" "$@")
output=$(2>&1 "$clojure" -Sforce -Srepro -J-XX:-OmitStackTraceInFastThrow -J-Dclojure.main.report=stderr -Sdeps '{:deps {mx.cider/tools.deps.enrich-classpath {:mvn/version "1.18.5"}}}' -M -m cider.enrich-classpath.clojure "$clojure" "$here" "true" "$@")
cmd=$(tail -n1 <(echo "$output"))

cd "$here"
Expand Down
5 changes: 5 additions & 0 deletions tools.deps/test-resources/path-aliases/deps.edn
@@ -0,0 +1,5 @@
{:paths [:clj-paths]
:deps {}
:aliases {:clj-paths ["the-main-source-path"]
:cljs-paths ["the-other-source-path"]
:cljc-paths {:extra-paths [:cljs-paths]}}}
16 changes: 16 additions & 0 deletions tools.deps/test/integration/cider/enrich_classpath/clojure.clj
Expand Up @@ -151,6 +151,22 @@
(is (string/includes? cp "-e \"(println \\\"foo\\\")\"")
"Escapes the -e value")))

(deftest path-aliases
(let [cp (sut/impl "clojure"
"deps.edn"
(str (io/file (System/getProperty "user.dir") "test-resources" "path-aliases"))
[]
true)]
(is (string/includes? cp "the-main-source-path")
"Resolves `:paths` defined as aliases"))
(let [cp (sut/impl "clojure"
"deps.edn"
(str (io/file (System/getProperty "user.dir") "test-resources" "path-aliases"))
["-A:cljc-paths"]
true)]
(is (string/includes? cp "the-main-source-path:the-other-source-path")
"CLI aliases can use `:paths` aliases too")))

(when-not (jdk/jdk8?)
(deftest jvm-opts
(testing "https://github.com/clojure-emacs/enrich-classpath/issues/56"
Expand Down