Skip to content

Commit 81f81ff

Browse files
committed
Fix computation of tool argmap when both aliases and -T are used
1 parent 9502dc7 commit 81f81ff

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

CHANGELOG.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@ Changelog
33

44
*Also see [Tools and installer changelog](https://github.com/clojure/brew-install/blob/1.12.0/CHANGELOG.md)*
55

6-
* next on Mar 5, 2025
6+
* next
7+
* Fix computation of tool argmap when both aliases and -T are used
8+
* 0.22.1507 on Mar 5, 2025
79
* Better error on missing -Sdeps file
810
* 0.22.1503 on Mar 5, 2025
911
* Error on missing -Sdeps file

src/main/clojure/clojure/tools/deps.clj

+4-1
Original file line numberDiff line numberDiff line change
@@ -851,7 +851,7 @@
851851
argmap-data (->> aliases
852852
(remove nil?)
853853
(map #(get alias-data %)))
854-
argmap (apply merge-alias-maps (conj argmap-data args))
854+
argmap (apply merge-alias-maps (concat argmap-data [args]))
855855

856856
project-tooled-edn (tool project-edn argmap)
857857
merged-edn (merge-edns [root-edn user-edn project-tooled-edn extra-edn])
@@ -953,6 +953,9 @@
953953
:mvn/repos (merge mvn/standard-repos {"datomic-cloud" {:url "s3://datomic-releases-1fc2183a/maven/releases"}})}
954954
nil)
955955

956+
(create-basis
957+
{:user {} :project {} :aliases [:deps] :args {:ns-default 'foo}})
958+
956959
(print-tree
957960
(resolve-deps {:deps {'org.clojure/clojure {:mvn/version "1.8.0"}
958961
'org.clojure/core.memoize {:mvn/version "0.5.8"}}

src/test/clojure/clojure/tools/deps/script/test_make_classpath2.clj

+1-1
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@
245245
paths (filter #(get-in classpath [% :path-key]) classpath-roots)]
246246
;; tool deps, not project deps
247247
(is (not (contains? libs 'cheshire/cheshire)))
248-
(is (= (map #(.getCanonicalPath (jio/file %)) ["." "x" "y"])
248+
(is (= (map #(.getCanonicalPath (jio/file %)) ["x" "y" "."])
249249
(map #(.getCanonicalPath (jio/file %)) paths)))))
250250

251251
(deftest config-data

0 commit comments

Comments
 (0)