From 73b63c5936640e9d3cff3c005c086fea70a7eb80 Mon Sep 17 00:00:00 2001 From: vemv Date: Sun, 1 Aug 2021 06:33:55 +0200 Subject: [PATCH] Upgrade tools.reader Fixes https://github.com/jonase/eastwood/issues/413 Closes https://github.com/jonase/eastwood/issues/297 --- .circleci/crucible.sh | 16 +++ .circleci/tools.reader | 1 + .gitmodules | 3 + .../copieddeps/dep10/clojure/tools/reader.clj | 133 +++++++++++------- .../dep10/clojure/tools/reader/edn.clj | 17 ++- .../clojure/tools/reader/impl/errors.clj | 31 ++-- .../dep10/clojure/tools/reader/impl/utils.clj | 2 +- .../clojure/tools/reader/reader_types.clj | 66 ++++++--- copy-deps-scripts/README.md | 6 +- copy-deps-scripts/deps/README.md | 9 -- copy-deps-scripts/deps/project.clj | 29 ---- 11 files changed, 176 insertions(+), 137 deletions(-) create mode 160000 .circleci/tools.reader delete mode 100644 copy-deps-scripts/deps/README.md delete mode 100644 copy-deps-scripts/deps/project.clj diff --git a/.circleci/crucible.sh b/.circleci/crucible.sh index d572d5c6..ff0163cd 100755 --- a/.circleci/crucible.sh +++ b/.circleci/crucible.sh @@ -23,6 +23,22 @@ fi grep --silent "== Warnings: 34. Exceptions thrown: 0" output || exit 1 +# Exercise tools.reader, see https://github.com/jonase/eastwood/issues/413 +cd ../tools.reader || exit 1 + +if lein with-profile +test update-in :plugins conj "[jonase/eastwood \"RELEASE\"]" -- eastwood | tee output; then + echo "Should have failed! Emitted output:" + cat output + exit 1 +fi + +if grep --silent "Reflection warning" output; then + echo "Reflection warnings should have been detected as an Eastwood linter and not as mere stdout!" + exit 1 +fi + +grep --silent "== Warnings: 14. Exceptions thrown: 0" output || exit 1 + # Exercise clojurescript as it's large and interesting cd ../clojurescript || exit 1 diff --git a/.circleci/tools.reader b/.circleci/tools.reader new file mode 160000 index 00000000..3b0211b3 --- /dev/null +++ b/.circleci/tools.reader @@ -0,0 +1 @@ +Subproject commit 3b0211b3504e9a8e321bfaa16fe6d5f517fa44be diff --git a/.gitmodules b/.gitmodules index 4a9ea402..22b08934 100644 --- a/.gitmodules +++ b/.gitmodules @@ -10,3 +10,6 @@ [submodule ".circleci/clojurescript"] path = .circleci/clojurescript url = git@github.com:clojure/clojurescript.git +[submodule ".circleci/tools.reader"] + path = .circleci/tools.reader + url = git@github.com:clojure/tools.reader.git diff --git a/copied-deps/eastwood/copieddeps/dep10/clojure/tools/reader.clj b/copied-deps/eastwood/copieddeps/dep10/clojure/tools/reader.clj index 08ba161d..9d52982f 100644 --- a/copied-deps/eastwood/copieddeps/dep10/clojure/tools/reader.clj +++ b/copied-deps/eastwood/copieddeps/dep10/clojure/tools/reader.clj @@ -9,11 +9,11 @@ (ns ^{:doc "A clojure reader in clojure" :author "Bronsa"} eastwood.copieddeps.dep10.clojure.tools.reader - (:refer-clojure :exclude [read read-line read-string char + (:refer-clojure :exclude [read read-line read-string char read+string default-data-readers *default-data-reader-fn* *read-eval* *data-readers* *suppress-read*]) (:require [eastwood.copieddeps.dep10.clojure.tools.reader.reader-types :refer - [read-char unread peek-char indexing-reader? + [read-char unread peek-char indexing-reader? source-logging-push-back-reader source-logging-reader? get-line-number get-column-number get-file-name string-push-back-reader log-source]] [eastwood.copieddeps.dep10.clojure.tools.reader.impl.utils :refer :all] ;; [char ex-info? whitespace? numeric? desugar-meta] [eastwood.copieddeps.dep10.clojure.tools.reader.impl.errors :as err] @@ -22,8 +22,10 @@ (:import (clojure.lang PersistentHashSet IMeta RT Symbol Reflector Var IObj PersistentVector IRecord Namespace) + eastwood.copieddeps.dep10.clojure.tools.reader.reader_types.SourceLoggingPushbackReader java.lang.reflect.Constructor - (java.util regex.Pattern List LinkedList))) + java.util.regex.Pattern + (java.util List LinkedList))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; helpers @@ -283,7 +285,7 @@ (read-unicode-char rdr ch 16 4 true))) (if (numeric? ch) (let [ch (read-unicode-char rdr ch 8 3 false)] - (if (> (int ch) 0337) + (if (> (int ch) 0377) (err/throw-bad-octal-number rdr) ch)) (err/throw-bad-escape-char rdr ch))))) @@ -672,8 +674,8 @@ ret)) (defn- syntax-quote-coll [type coll] - ;; We use sequence rather than seq here to fix http://dev.clojure.org/jira/browse/CLJ-1444 - ;; But because of http://dev.clojure.org/jira/browse/CLJ-1586 we still need to call seq on the form + ;; We use sequence rather than seq here to fix https://clojure.atlassian.net/browse/CLJ-1444 + ;; But because of https://clojure.atlassian.net/browse/CLJ-1586 we still need to call seq on the form (let [res (list 'clojure.core/sequence (list 'clojure.core/seq (cons 'clojure.core/concat @@ -750,7 +752,8 @@ (defn- read-namespaced-map [rdr _ opts pending-forms] - (let [token (read-token rdr :namespaced-map (read-char rdr))] + (let [[start-line start-column] (starting-line-col-info rdr) + token (read-token rdr :namespaced-map (read-char rdr))] (if-let [ns (cond (= token ":") (ns-name *ns*) @@ -763,13 +766,22 @@ (let [ch (read-past whitespace? rdr)] (if (identical? ch \{) - (let [items (read-delimited :namespaced-map \} rdr opts pending-forms)] + (let [items (read-delimited :namespaced-map \} rdr opts pending-forms) + [end-line end-column] (ending-line-col-info rdr)] (when (odd? (count items)) (err/throw-odd-map rdr nil nil items)) (let [keys (take-nth 2 items) vals (take-nth 2 (rest items))] - - (RT/map (to-array (mapcat list (namespace-keys (str ns) keys) vals))))) + (with-meta + (RT/map (to-array (mapcat list (namespace-keys (str ns) keys) vals))) + (when start-line + (merge + (when-let [file (get-file-name rdr)] + {:file file}) + {:line start-line + :column start-column + :end-line end-line + :end-column end-column}))))) (err/throw-ns-map-no-map rdr token))) (err/throw-bad-ns rdr token)))) @@ -828,7 +840,7 @@ (loop [i 0] (if (>= i ctors-num) (err/reader-error rdr "Unexpected number of constructor arguments to " (str class) - ": got" numargs) + ": got " numargs) (if (== (count (.getParameterTypes ^Constructor (aget all-ctors i))) numargs) (Reflector/invokeConstructor class entries) @@ -910,47 +922,46 @@ (err/reader-error "Reading disallowed - *read-eval* bound to :unknown")) (try (loop [] - (log-source reader - (if (seq pending-forms) - (.remove ^List pending-forms 0) - (let [ch (read-char reader)] - (cond - (whitespace? ch) (recur) - (nil? ch) (if eof-error? (err/throw-eof-error reader nil) sentinel) - (= ch return-on) READ_FINISHED - (number-literal? reader ch) (read-number reader ch) - :else (let [f (macros ch)] - (if f - (let [res (f reader ch opts pending-forms)] - (if (identical? res reader) - (recur) - res)) - (read-symbol reader ch)))))))) - (catch Exception e - (if (ex-info? e) - (let [d (ex-data e)] - (if (= :reader-exception (:type d)) - (throw e) - (throw (ex-info (.getMessage e) - (merge {:type :reader-exception} - d - (if (indexing-reader? reader) - {:line (get-line-number reader) - :column (get-column-number reader) - :file (get-file-name reader)})) - e)))) - (throw (ex-info (.getMessage e) - (merge {:type :reader-exception} - (if (indexing-reader? reader) - {:line (get-line-number reader) - :column (get-column-number reader) - :file (get-file-name reader)})) - e))))))) + (let [ret (log-source reader + (if (seq pending-forms) + (.remove ^List pending-forms 0) + (let [ch (read-char reader)] + (cond + (whitespace? ch) reader + (nil? ch) (if eof-error? (err/throw-eof-error reader nil) sentinel) + (= ch return-on) READ_FINISHED + (number-literal? reader ch) (read-number reader ch) + :else (if-let [f (macros ch)] + (f reader ch opts pending-forms) + (read-symbol reader ch))))))] + (if (identical? ret reader) + (recur) + ret))) + (catch Exception e + (if (ex-info? e) + (let [d (ex-data e)] + (if (= :reader-exception (:type d)) + (throw e) + (throw (ex-info (.getMessage e) + (merge {:type :reader-exception} + d + (if (indexing-reader? reader) + {:line (get-line-number reader) + :column (get-column-number reader) + :file (get-file-name reader)})) + e)))) + (throw (ex-info (.getMessage e) + (merge {:type :reader-exception} + (if (indexing-reader? reader) + {:line (get-line-number reader) + :column (get-column-number reader) + :file (get-file-name reader)})) + e))))))) (defn read "Reads the first object from an IPushbackReader or a java.io.PushbackReader. Returns the object read. If EOF, throws if eof-error? is true. - Otherwise returns sentinel. If no stream is providen, *in* will be used. + Otherwise returns sentinel. If no stream is provided, *in* will be used. Opts is a persistent map with valid keys: :read-cond - :allow to process reader conditionals, or @@ -970,8 +981,16 @@ {:arglists '([] [reader] [opts reader] [reader eof-error? eof-value])} ([] (read *in* true nil)) ([reader] (read reader true nil)) - ([{eof :eof :as opts :or {eof :eofthrow}} reader] (read* reader (= eof :eofthrow) eof nil opts (LinkedList.))) - ([reader eof-error? sentinel] (read* reader eof-error? sentinel nil {} (LinkedList.)))) + ([{eof :eof :as opts :or {eof :eofthrow}} reader] + (when (source-logging-reader? reader) + (let [^StringBuilder buf (:buffer @(.source-log-frames ^SourceLoggingPushbackReader reader))] + (.setLength buf 0))) + (read* reader (= eof :eofthrow) eof nil opts (LinkedList.))) + ([reader eof-error? sentinel] + (when (source-logging-reader? reader) + (let [^StringBuilder buf (:buffer @(.source-log-frames ^SourceLoggingPushbackReader reader))] + (.setLength buf 0))) + (read* reader eof-error? sentinel nil {} (LinkedList.)))) (defn read-string "Reads one object from the string s. @@ -996,3 +1015,17 @@ [form] (binding [gensym-env {}] (syntax-quote* form))) + +(defn read+string + "Like read, and taking the same args. reader must be a SourceLoggingPushbackReader. + Returns a vector containing the object read and the (whitespace-trimmed) string read." + ([] (read+string (source-logging-push-back-reader *in*))) + ([stream] (read+string stream true nil)) + ([^SourceLoggingPushbackReader stream eof-error? eof-value] + (let [o (log-source stream (read stream eof-error? eof-value)) + s (.trim (str (:buffer @(.source-log-frames stream))))] + [o s])) + ([opts ^SourceLoggingPushbackReader stream] + (let [o (log-source stream (read opts stream)) + s (.trim (str (:buffer @(.source-log-frames stream))))] + [o s]))) diff --git a/copied-deps/eastwood/copieddeps/dep10/clojure/tools/reader/edn.clj b/copied-deps/eastwood/copieddeps/dep10/clojure/tools/reader/edn.clj index c6c02e41..f469e7ce 100644 --- a/copied-deps/eastwood/copieddeps/dep10/clojure/tools/reader/edn.clj +++ b/copied-deps/eastwood/copieddeps/dep10/clojure/tools/reader/edn.clj @@ -52,14 +52,15 @@ :else (loop [sb (StringBuilder.) - ch (do (unread rdr initch) initch)] + ch initch] (if (or (whitespace? ch) (macro-terminating? ch) (nil? ch)) - (str sb) + (do (unread rdr ch) + (str sb)) (if (not-constituent? ch) (err/throw-bad-char rdr kind ch) - (recur (doto sb (.append (read-char rdr))) (peek-char rdr)))))))) + (recur (doto sb (.append ch)) (read-char rdr)))))))) @@ -70,9 +71,7 @@ (if-let [ch (read-char rdr)] (if-let [dm (dispatch-macros ch)] (dm rdr ch opts) - (if-let [obj (read-tagged (doto rdr (unread ch)) ch opts)] - obj - (err/throw-no-dispatch rdr ch))) + (read-tagged (doto rdr (unread ch)) ch opts)) (err/throw-eof-at-dispatch rdr))) (defn- read-unmatched-delimiter @@ -231,7 +230,7 @@ (read-unicode-char rdr ch 16 4 true))) (if (numeric? ch) (let [ch (read-unicode-char rdr ch 8 3 false)] - (if (> (int ch) 0337) + (if (> (int ch) 0377) (err/throw-bad-octal-number rdr) ch)) (err/throw-bad-escape-char rdr ch))))) @@ -272,9 +271,9 @@ (let [^String ns (s 0) ^String name (s 1)] (if (identical? \: (nth token 0)) - (err/throw-invalid reader :keyword token) ; No ::kw in edn. + (err/throw-invalid reader :keyword (str \: token)) ; No ::kw in edn. (keyword ns name))) - (err/throw-invalid reader :keyword token))) + (err/throw-invalid reader :keyword (str \: token)))) (err/throw-single-colon reader)))) (defn- wrapping-reader diff --git a/copied-deps/eastwood/copieddeps/dep10/clojure/tools/reader/impl/errors.clj b/copied-deps/eastwood/copieddeps/dep10/clojure/tools/reader/impl/errors.clj index c605ba40..8b49d3ea 100644 --- a/copied-deps/eastwood/copieddeps/dep10/clojure/tools/reader/impl/errors.clj +++ b/copied-deps/eastwood/copieddeps/dep10/clojure/tools/reader/impl/errors.clj @@ -84,7 +84,7 @@ (defn throw-invalid-unicode-literal [rdr token] (throw (illegal-arg-error rdr - (str "Invalid unicode literal: \\" token ".")))) + "Invalid unicode literal: \\" token "."))) (defn throw-invalid-unicode-escape [rdr ch] (reader-error @@ -105,9 +105,6 @@ (defn throw-eof-at-dispatch [rdr] (eof-error rdr "Unexpected EOF while reading dispatch character.")) -(defn throw-bad-dispatch [rdr ch] - (reader-error rdr "No dispatch macro for " ch ".")) - (defn throw-unmatch-delimiter [rdr ch] (reader-error rdr "Unmatched delimiter " ch ".")) @@ -115,34 +112,30 @@ (let [init (case kind :regex "#\"" :string \")] (eof-error rdr "Unexpected EOF reading " (name kind) " starting " (apply str init start) "."))) -(defn throw-no-dispatch [rdr ch] - (throw-bad-dispatch rdr ch)) - (defn throw-invalid-unicode-char[rdr token] (throw (illegal-arg-error rdr - (str "Invalid unicode character \\" token ".")))) + "Invalid unicode character \\" token "."))) (defn throw-invalid-unicode-digit-in-token [rdr ch token] (throw (illegal-arg-error rdr - (str "Invalid digit " ch " in unicode character \\" token ".")))) + "Invalid digit " ch " in unicode character \\" token "."))) (defn throw-invalid-unicode-digit[rdr ch] (throw (illegal-arg-error rdr - (str "Invalid digit " ch " in unicode character.")))) + "Invalid digit " ch " in unicode character."))) (defn throw-invalid-unicode-len[rdr actual expected] (throw (illegal-arg-error rdr - (str - "Invalid unicode literal. Unicode literals should be " - expected - "characters long. " - "value suppled is " - actual - "characters long.")))) + "Invalid unicode literal. Unicode literals should be " + expected + " characters long. " + "Value supplied is " + actual + " characters long."))) (defn throw-invalid-character-literal[rdr token] (reader-error rdr "Invalid character literal \\u" token ".")) @@ -150,7 +143,7 @@ (defn throw-invalid-octal-len[rdr token] (reader-error rdr - "Invalid octal escape sequence in a character literal:" + "Invalid octal escape sequence in a character literal: " token ". Octal escape sequences must be 3 or fewer digits.")) @@ -193,7 +186,7 @@ rdr "Feature cannot be " (i/inspect feature) - " Features must be keywords.")) + ". Features must be keywords.")) (defn throw-ns-map-no-map [rdr ns-name] (reader-error rdr "Namespaced map with namespace " ns-name " does not specify a map.")) diff --git a/copied-deps/eastwood/copieddeps/dep10/clojure/tools/reader/impl/utils.clj b/copied-deps/eastwood/copieddeps/dep10/clojure/tools/reader/impl/utils.clj index dc61dfa9..635f1b0f 100644 --- a/copied-deps/eastwood/copieddeps/dep10/clojure/tools/reader/impl/utils.clj +++ b/copied-deps/eastwood/copieddeps/dep10/clojure/tools/reader/impl/utils.clj @@ -7,7 +7,7 @@ ;; You must not remove this notice, or any other, from this software. (ns ^:skip-wiki eastwood.copieddeps.dep10.clojure.tools.reader.impl.utils - (:refer-clojure :exclude [char])) + (:refer-clojure :exclude [char reader-conditional tagged-literal])) (defn char [x] (when x diff --git a/copied-deps/eastwood/copieddeps/dep10/clojure/tools/reader/reader_types.clj b/copied-deps/eastwood/copieddeps/dep10/clojure/tools/reader/reader_types.clj index dbbfcc70..a7a39165 100644 --- a/copied-deps/eastwood/copieddeps/dep10/clojure/tools/reader/reader_types.clj +++ b/copied-deps/eastwood/copieddeps/dep10/clojure/tools/reader/reader_types.clj @@ -102,23 +102,25 @@ (when (instance? Closeable rdr) (.close ^Closeable rdr)))) -(defn- normalize-newline [rdr ch] - (if (identical? \return ch) - (let [c (peek-char rdr)] - (when (or (identical? \formfeed c) - (identical? \newline c)) - (read-char rdr)) - \newline) - ch)) - (deftype IndexingPushbackReader [rdr ^:unsynchronized-mutable ^long line ^:unsynchronized-mutable ^long column ^:unsynchronized-mutable line-start? ^:unsynchronized-mutable prev - ^:unsynchronized-mutable ^long prev-column file-name] + ^:unsynchronized-mutable ^long prev-column file-name + ^:unsynchronized-mutable normalize?] Reader (read-char [reader] (when-let [ch (read-char rdr)] - (let [ch (normalize-newline rdr ch)] + (let [ch (if normalize? + (do (set! normalize? false) + (if (or (identical? \newline ch) + (identical? \formfeed ch)) + (read-char rdr) + ch)) + ch) + ch (if (identical? \return ch) + (do (set! normalize? true) + \newline) + ch)] (set! prev line-start?) (set! line-start? (newline? ch)) (when line-start? @@ -138,7 +140,23 @@ (set! column prev-column)) (update! column dec)) (set! line-start? prev) - (unread rdr ch)) + ;; This may look a bit convoluted, but it helps in the following + ;; scenario: + ;; + The underlying reader is about to return \return from the + ;; next read-char, and then \newline after that. + ;; + read-char gets \return, sets normalize? to true, returns + ;; \newline instead. + ;; + Caller calls unread on the \newline it just got. If we + ;; unread the \newline to the underlying reader, now it is ready + ;; to return two \newline chars in a row, which will throw off + ;; the tracked line numbers. + (let [ch (if normalize? + (do (set! normalize? false) + (if (identical? \newline ch) + \return + ch)) + ch)] + (unread rdr ch))) IndexingReader (get-line-number [reader] (int line)) @@ -157,7 +175,7 @@ (read-char [rdr] (let [c (.read ^java.io.PushbackReader rdr)] (when (>= c 0) - (normalize-newline rdr (char c))))) + (char c)))) (peek-char [rdr] (when-let [c (read-char rdr)] @@ -245,11 +263,22 @@ (deftype SourceLoggingPushbackReader [rdr ^:unsynchronized-mutable ^long line ^:unsynchronized-mutable ^long column ^:unsynchronized-mutable line-start? ^:unsynchronized-mutable prev - ^:unsynchronized-mutable ^long prev-column file-name source-log-frames] + ^:unsynchronized-mutable ^long prev-column file-name source-log-frames + ^:unsynchronized-mutable normalize?] Reader (read-char [reader] (when-let [ch (read-char rdr)] - (let [ch (normalize-newline rdr ch)] + (let [ch (if normalize? + (do (set! normalize? false) + (if (or (identical? \newline ch) + (identical? \formfeed ch)) + (read-char rdr) + ch)) + ch) + ch (if (identical? \return ch) + (do (set! normalize? true) + \newline) + ch)] (set! prev line-start?) (set! line-start? (newline? ch)) (when line-start? @@ -291,7 +320,7 @@ new-frame (assoc-in @frame [:offset] (.length buffer))] (with-bindings {frame new-frame} (let [ret (f)] - (if (instance? clojure.lang.IMeta ret) + (if (instance? clojure.lang.IObj ret) (merge-meta ret {:source (peek-source-log frame)}) ret))))) @@ -347,7 +376,7 @@ (indexing-push-back-reader s-or-rdr buf-len nil)) ([s-or-rdr buf-len file-name] (IndexingPushbackReader. - (to-pbr s-or-rdr buf-len) 1 1 true nil 0 file-name))) + (to-pbr s-or-rdr buf-len) 1 1 true nil 0 file-name false))) (defn ^Closeable source-logging-push-back-reader "Creates a SourceLoggingPushbackReader from a given string or PushbackReader" @@ -366,7 +395,8 @@ file-name (doto (make-var) (alter-var-root (constantly {:buffer (StringBuilder.) - :offset 0})))))) + :offset 0}))) + false))) (defn read-line "Reads a line from the reader or from *in* if no reader is specified" diff --git a/copy-deps-scripts/README.md b/copy-deps-scripts/README.md index 4382f5a0..2d60c5ff 100644 --- a/copy-deps-scripts/README.md +++ b/copy-deps-scripts/README.md @@ -115,14 +115,16 @@ for details. ### Using Dolly to copy dependencies into Eastwood source code +From the project root: + % lein repl (require '[dolly.clone :as c]) (def dry-run {:dry-run? true :print? true}) (def for-real {:dry-run? false :print? true}) - (def e-root "/Users/jafinger/clj/eastwood/newest/eastwood") - (def src-path (str e-root "/src")) + (def e-root (System/getProperty "user.dir")) + (def src-path (str e-root "/copied-deps")) (def staging-path (str e-root "/staging")) (def taj-src-path (str e-root "/copy-deps-scripts/repos/tools.analyzer.jvm/src/main/clojure")) diff --git a/copy-deps-scripts/deps/README.md b/copy-deps-scripts/deps/README.md deleted file mode 100644 index 5c7f9b3a..00000000 --- a/copy-deps-scripts/deps/README.md +++ /dev/null @@ -1,9 +0,0 @@ -# deps - -See README.md in the directory above this one for info. - -## License - -Copyright © 2014 FIXME - -Distributed under the Eclipse Public License version 1.0. diff --git a/copy-deps-scripts/deps/project.clj b/copy-deps-scripts/deps/project.clj deleted file mode 100644 index 2eb9f1e5..00000000 --- a/copy-deps-scripts/deps/project.clj +++ /dev/null @@ -1,29 +0,0 @@ -(defproject deps "0.1.5-alpha1" - :description "A project only for tracking dependencies of Eastwood" - ;;:aot [eastwood.copieddeps.dep10.clojure.tools.reader.impl.ExceptionInfo] - ;; This project.clj file has the same dependencies as Eastwood's project.clj file used to, before I copied in the source of many of those dependencies. - - :dependencies [[org.clojure/clojure "1.6.0"] - [org.clojure/tools.analyzer "0.6.9"] - [org.clojure/tools.analyzer.jvm "0.7.1"] - [org.clojure/tools.namespace "0.3.0-alpha3"] - [org.clojure/tools.reader "1.1.0"] - [leinjacker "0.4.1"] - [org.clojars.brenton/google-diff-match-patch "0.1"]] - :profiles {:dev {:dependencies [[org.clojure/tools.macro "0.1.2"] - [jafingerhut/dolly "0.1.0"]] - ;; I want the namespaces defined in files in - ;; "cases" and its subdirectories to be accessible - ;; during 'lein test' in the classpath, but they - ;; themselves should not be eval'd by 'lein test'. - ;; I also want those namespaces available for - ;; one-off tests at the command line like "lein - ;; eastwood '{:namespaces [testcases.testtest]}'", - ;; and for that, the :test profile does not work, - ;; so put them in :dev - :resource-paths [ "cases" ]} - :1.5 {:dependencies [[org.clojure/clojure "1.5.1"]]} - :1.7 {:dependencies [[org.clojure/clojure "1.7.0-master-SNAPSHOT"]]}} - ;; Eastwood may work with earlier Leiningen versions, but this is - ;; close to the earliest version that it was most tested with. - :min-lein-version "2.3.0")