Skip to content
This repository was archived by the owner on May 4, 2022. It is now read-only.

Commit 4f058a9

Browse files
committed
Avoid regenerating classpath cache.
Note, when running a new Polygott container, in order for `clj`/`clojure` command to find and use the classpath cache and the Maven artifact cache generated during the time the Polygott container image is built: 1) the container needs to be run as user `runner` in group `runner` (i.e., with `--user runner:runner`) 2) `polygott-lang-setup -l clojure` needs to be run first inside the container before running any other Polygott command (e.g., `polygott-self-test`, `polygott-survey`, and `run-project`)
1 parent 5f0cbb7 commit 4f058a9

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

languages/clojure.toml

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,23 +15,29 @@ setup = [
1515
"./linux-install-1.10.1.536.sh",
1616
"rm linux-install-1.10.1.536.sh",
1717

18-
# Fetch Maven artifacts eagerly in order to cache them in the container image.
18+
# Trigger downloading of Clojure JARs now to avoid downloading them at runtime.
1919
# (https://clojure.org/reference/deps_and_cli#_command_line_tools)
20-
"""clojure -Sverbose \
21-
-Sdeps '{:deps {org.clojure/tools.namespace {:mvn/version \"1.0.0\"}} :mvn/local-repo \"/home/runner/.m2/repository\"}' \
22-
--eval ''""",
20+
"""clojure \
21+
-Sdeps '{:deps {org.clojure/tools.namespace {:mvn/version "1.0.0"}} :paths ["src" "."] :mvn/local-repo "/home/runner/.m2/repository"}' \
22+
-Sforce \
23+
-Sverbose \
24+
--eval ''""",
2325

2426
"/usr/bin/build-prybar-lang.sh clojure"
2527
]
2628
versionCommand = [
27-
"clojure",
29+
"clj",
30+
"-Sdeps",
31+
"""{:deps {org.clojure/tools.namespace {:mvn/version "1.0.0"}} :paths ["src" "."] :mvn/local-repo "/home/runner/.m2/repository"}""",
2832
"--eval",
2933
"(clojure-version)"
3034
]
3135

3236
[run]
3337
command = [
34-
"clojure",
38+
"clj",
39+
"-Sdeps",
40+
"""{:deps {org.clojure/tools.namespace {:mvn/version "1.0.0"}} :paths ["src" "."] :mvn/local-repo "/home/runner/.m2/repository"}""",
3541
"main.clj"
3642
]
3743

0 commit comments

Comments
 (0)