Compare commits

...

3 commits

Author SHA1 Message Date
Imre Kószó
78076f8cd0 update build script
- add scm block to pom so it links to the repo
- add license as it is now required by clojars
- fix paths in build alias
- bump tools.build
2024-01-22 13:16:55 +01:00
Imre Kószó
18de93c8fe cut 0.19.6 2024-01-22 11:43:53 +01:00
Imre Kószó
7ae8bed997 fix MapEntry not found error in clj 2024-01-22 11:43:53 +01:00
5 changed files with 41 additions and 9 deletions

View file

@ -228,6 +228,14 @@ Evaluation count : 24 in 6 samples of 4 calls.
## Changelog ## Changelog
### 0.19.6
* Fix regression in 0.19.5 #54
### 0.19.5
* Support ClojureDart
### 0.19.4 ### 0.19.4
* Fix ClojureScript compilation broken in `0.19.3` #49 * Fix ClojureScript compilation broken in `0.19.3` #49

View file

@ -3,10 +3,23 @@
[clojure.java.shell :as sh])) [clojure.java.shell :as sh]))
(def lib 'net.cgrand/xforms) (def lib 'net.cgrand/xforms)
(def version "0.19.5" #_(format "0.0.%s" (b/git-count-revs nil))) (def version "0.19.6" #_(format "0.0.%s" (b/git-count-revs nil)))
(def class-dir "target/classes") (def class-dir "target/classes")
(def basis (b/create-basis {:project "deps.edn"})) (def basis (b/create-basis {:project "deps.edn"}))
(def jar-file (format "target/%s-%s.jar" (name lib) version)) (def jar-file (format "target/%s-%s.jar" (name lib) version))
(def scm {:connection "scm:git:git://github.com/cgrand/xforms.git"
:developerConnection "scm:git:git://github.com/cgrand/xforms.git"
:url "https://github.com/cgrand/xforms"})
(def extra-pom-data
[[:licenses
[:license
[:name "Eclipse Public License 1.0"]
[:url "https://opensource.org/license/epl-1-0/"]
[:distribution "repo"]]
[:license
[:name "Eclipse Public License 2.0"]
[:url "https://opensource.org/license/epl-2-0/"]
[:distribution "repo"]]]])
(defn clean [_] (defn clean [_]
(b/delete {:path "target"})) (b/delete {:path "target"}))
@ -16,7 +29,9 @@
:lib lib :lib lib
:version version :version version
:basis basis :basis basis
:src-dirs ["src"]}) :src-dirs ["src"]
:scm (assoc scm :tag (str "v" version))
:pom-data extra-pom-data})
(b/copy-dir {:src-dirs ["src" "resources"] (b/copy-dir {:src-dirs ["src" "resources"]
:target-dir class-dir}) :target-dir class-dir})
(b/jar {:class-dir class-dir (b/jar {:class-dir class-dir

View file

@ -40,5 +40,6 @@
:main-opts ["-m" "cljs-test-runner.main"]} :main-opts ["-m" "cljs-test-runner.main"]}
:build :build
{:deps {io.github.clojure/tools.build {:git/tag "v0.9.4" :git/sha "76b78fe"}} {:paths ["."]
:ns-default build}}} :deps {io.github.clojure/tools.build {:git/tag "v0.9.6" :git/sha "8e78bcc"}}
:ns-default build}}}

View file

@ -105,11 +105,13 @@
(if (destructuring-pair? arg) (if (destructuring-pair? arg)
(let [[karg varg] arg] (let [[karg varg] arg]
`([~acc ~karg ~varg] ~@body)) `([~acc ~karg ~varg] ~@body))
`([~acc k# v#] (let [~arg (let [k (gensym "k__")
(macros/case v (gensym "v__")
:clj (clojure.lang.MapEntry. k# v#) arg-value (macros/case
:cljs [k# v#] :clj `(clojure.lang.MapEntry. ~k ~v)
:cljd (MapEntry k# v#))] ~@body))))) :cljs [k v]
:cljd `(MapEntry ~k ~v))]
`([~acc ~k ~v] (let [~arg ~arg-value] ~@body))))))
(not (arities 2)) (conj (let [[[acc karg varg] & body] (arities 3)] (not (arities 2)) (conj (let [[[acc karg varg] & body] (arities 3)]
`([~acc [~karg ~varg]] ~@body))))] `([~acc [~karg ~varg]] ~@body))))]
`(reify `(reify

View file

@ -158,3 +158,9 @@
'(a b) false '(a b) false
'{foo bar} false '{foo bar} false
'{foo :bar} false))) '{foo :bar} false)))
(defmacro wraps-for-with-no-destructuring []
(x/into [] (x/for [x (range 5)] x)))
(deftest for-in-macro
(is (= [0 1 2 3 4] (wraps-for-with-no-destructuring))))