Skip to content

Commit

Permalink
Turn off print-namespace-maps across all tasks, not just uberjar.
Browse files Browse the repository at this point in the history
  • Loading branch information
technomancy committed Feb 14, 2019
1 parent 0a373f2 commit f709e51
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
5 changes: 4 additions & 1 deletion leiningen-core/src/leiningen/core/main.clj
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,10 @@ These get replaced with the corresponding values from the project map."
"Entry point for tasks run other tasks as if they were called from the CLI."
[project args]
(let [[task-name args] (task-args args project)]
(apply-task task-name project args)))
;; See https://github.com/technomancy/leiningen/issues/2530
;; We can't assume the project uses the same clojure version as lein does.
(binding [*print-namespace-maps* false]
(apply-task task-name project args))))

(defn leiningen-version []
(or (System/getenv "LEIN_VERSION")
Expand Down
8 changes: 1 addition & 7 deletions src/leiningen/uberjar.clj
Original file line number Diff line number Diff line change
Expand Up @@ -53,16 +53,10 @@
"Project `:uberjar-merge-with` merger for components.xml files."
[components-read into components-write])

(defn- pr-str-backwards-compatibly
"Produce EDN that should work with older clojure versions."
[val]
(binding [*print-namespace-maps* false]
(pr-str val)))

(def clj-map-merger
"Project `:uberjar-merge-with` for files containing a single map
read with `clojure.core/read`, such as data_readers.clj."
[(comp read-string slurp) merge #(spit %1 (pr-str-backwards-compatibly %2))])
[(comp read-string slurp) merge #(spit %1 (pr-str %2))])

(defn- merger-match? [[pattern] filename]
(boolean
Expand Down

0 comments on commit f709e51

Please sign in to comment.