1
- .PHONY : test quick-test eastwood cljfmt cljfmt-fix install fast-install smoketest deploy clean detect_timeout lein-repl repl lint light-kondo docs test_impl
1
+ .PHONY : test quick-test eastwood cljfmt cljfmt-fix install fast-install smoketest deploy clean detect_timeout lint light-kondo docs test_impl
2
2
.DEFAULT_GOAL := quick-test
3
3
4
- CLOJURE_VERSION ?= 1.11
5
-
6
- # The Lein profiles that will be selected for `lein-repl`.
7
- # Feel free to upgrade this, or to override it with an env var named LEIN_PROFILES.
8
- # Expected format: "+dev,+test"
9
- # Don't use spaces here.
10
- LEIN_PROFILES ?= "+dev,+test"
11
-
12
- TEST_PROFILES ?= "-user,-dev,+test"
13
-
14
- # The enrich-classpath version to be injected.
15
- # Feel free to upgrade this.
16
- ENRICH_CLASSPATH_VERSION ="1.18.2"
17
-
18
4
# Set bash instead of sh for the @if [[ conditions,
19
5
# and use the usual safety flags:
20
6
SHELL = /bin/bash -Ee
21
7
8
+ CLOJURE_VERSION ?= 1.12
9
+ TEST_PROFILES ?= "-user,-dev,+test"
10
+
22
11
# We need Java sources to test Java parsing functionality, but the Docker images
23
12
# we use on CircleCI doesn't include src.zip. So we have to download them from
24
13
# Github and repackage in a form that is resemblant to src.zip from normal
25
14
# distributions.
26
- base-src.zip :
27
- wget https://github.com/adoptium/jdk21u/archive/refs/tags/jdk-21.0.5+3.zip -O full-src.zip
28
- unzip -q full-src.zip
29
- cp -r jdk21u-* /src/java.base/share/classes java.base
30
- cp -r jdk21u-* /src/java.desktop/share/classes java.desktop
31
- zip -qr base-src.zip java.base java.desktop
32
- rm -rf java.base java.desktop jdk21u-* full-src.zip
15
+ base-src-jdk8.zip :
16
+ # echo 'Placeholder. We dont parse sources on JDK8.'
17
+ touch $@
18
+
19
+ base-src-jdk11.zip :
20
+ bash download-jdk-sources.sh https://github.com/adoptium/jdk11u/archive/refs/tags/jdk-11.0.25+9.zip jdk11 $@
21
+
22
+ base-src-jdk17.zip :
23
+ bash download-jdk-sources.sh https://github.com/adoptium/jdk17u/archive/refs/tags/jdk-17.0.13+11.zip jdk17 $@
24
+
25
+ base-src-jdk21.zip :
26
+ bash download-jdk-sources.sh https://github.com/adoptium/jdk21u/archive/refs/tags/jdk-21.0.5+3.zip jdk21 $@
27
+
28
+ base-src-jdk23.zip :
29
+ bash download-jdk-sources.sh https://github.com/adoptium/jdk23u/archive/refs/tags/jdk-23.0.1+11.zip jdk23 $@
30
+
31
+ copy-sources-to-jdk : base-src-$(JDK_SRC_VERSION ) .zip
32
+ mkdir -p $(JAVA_HOME ) /lib && cp base-src-$(JDK_SRC_VERSION ) .zip $(JAVA_HOME ) /lib/src.zip
33
33
34
34
dump-version :
35
35
echo ' "$(PROJECT_VERSION)"' > resources/cider/nrepl/version.edn
@@ -39,7 +39,7 @@ target/srcdeps: project.clj
39
39
# Remove cljfmt.main because it depends on tools.cli which we explicitly removed.
40
40
rm -f target/srcdeps/cider/nrepl/inlined/deps/cljfmt/*/cljfmt/main.clj
41
41
42
- test_impl : base-src.zip
42
+ test_impl : copy-sources-to-jdk
43
43
lein with-profile $(TEST_PROFILES ) ,+$(CLOJURE_VERSION ) test
44
44
45
45
test : target/srcdeps
@@ -115,22 +115,5 @@ clean:
115
115
lein with-profile -user clean
116
116
cd test/smoketest && lein with-profile -user clean
117
117
118
- # Create and cache a `java` command. project.clj is mandatory; the others are optional but are taken into account for cache recomputation.
119
- # It's important not to silence with step with @ syntax, so that Enrich progress can be seen as it resolves dependencies.
120
- .enrich-classpath-lein-repl : Makefile project.clj $(wildcard checkouts/* /project.clj) $(wildcard deps.edn) $(wildcard $(HOME ) /.clojure/deps.edn) $(wildcard profiles.clj) $(wildcard $(HOME ) /.lein/profiles.clj) $(wildcard $(HOME ) /.lein/profiles.d) $(wildcard /etc/leiningen/profiles.clj)
121
- bash ' lein' ' update-in' ' :plugins' ' conj' " [mx.cider/lein-enrich-classpath \" $( ENRICH_CLASSPATH_VERSION) \" ]" ' --' ' with-profile' $(LEIN_PROFILES ) ' update-in' ' :middleware' ' conj' ' cider.enrich-classpath.plugin-v2/middleware' ' --' ' repl' | grep " -cp " > $@
122
-
123
- # Launches a repl, falling back to vanilla lein repl if something went wrong during classpath calculation.
124
- lein-repl : .enrich-classpath-lein-repl
125
- @if grep --silent " -cp " .enrich-classpath-lein-repl; then \
126
- export YOURKIT_SESSION_NAME=" $( basename $( PWD) ) " ; \
127
- eval " $$ (cat .enrich-classpath-lein-repl) --interactive" ; \
128
- else \
129
- echo " Falling back to lein repl... (you can avoid further falling back by removing .enrich-classpath-lein-repl)" ; \
130
- lein with-profiles $(LEIN_PROFILES ) repl; \
131
- fi
132
-
133
- repl : lein-repl
134
-
135
118
docs :
136
119
lein docs
0 commit comments