Skip to content

Commit 24144bc

Browse files
committed
helpers for compile testing
1 parent df30268 commit 24144bc

File tree

2 files changed

+32
-1
lines changed

2 files changed

+32
-1
lines changed

build.clj

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
(ns build
2+
(:refer-clojure :exclude [compile])
3+
(:require [clojure.tools.build.api :as b]))
4+
5+
(def class-dir "target/classes")
6+
(def basis (b/create-basis {:project "deps.edn"}))
7+
8+
(defn compile
9+
[_]
10+
(b/delete {:path "target"})
11+
(b/compile-clj {:basis basis, :src-dirs ["src/main/clojure"], :class-dir class-dir,
12+
:filter-nses '[clojure.core.async]
13+
:ns-compile '[clojure.core.async.impl.exec.threadpool
14+
clojure.core.async.impl.protocols
15+
clojure.core.async.impl.mutex
16+
clojure.core.async.impl.concurrent
17+
clojure.core.async.impl.dispatch
18+
clojure.core.async.impl.ioc-macros
19+
clojure.core.async.impl.ioc-alt
20+
clojure.core.async.impl.buffers
21+
clojure.core.async.impl.channels
22+
clojure.core.async.impl.timers
23+
clojure.core.async]}))
24+

deps.edn

+8-1
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,11 @@
33
{org.clojure/tools.analyzer.jvm {:mvn/version "1.2.2"}}
44
:aliases
55
{:cljs-test {:extra-deps {org.clojure/clojurescript {:mvn/version "1.10.597"}}
6-
:extra-paths ["src/test/cljs"]}}}
6+
:extra-paths ["src/test/cljs"]}
7+
8+
;; For compile test purposes
9+
;; clj -T:build compile
10+
:build
11+
{:deps {io.github.clojure/tools.build {:tag "v0.6.6" :sha "4d41c26"}}
12+
:ns-default build}
13+
}}

0 commit comments

Comments
 (0)