Fork me on GitHub
#depstar
<
2021-05-08
>
Karol Wójcik13:05:26

I'm trying to set classpath for depstar like so:

USE_AGENT_CONTEXT=true clojure -X:uberjar :classpath "src:resources:/project/.holy-lambda/.m2/io/github/FieryCod/holy-lambda/0.1.47/holy-lambda-0.1.47.jar:/project/.holy-lambda/.m2/com/amazonaws/aws-lambda-java-core/1.2.1/aws-lambda-java-core-1.2.1.jar:/project/.holy-lambda/.m2/io/github/FieryCod/holy-lambda-default-retriever/0.0.5/holy-lambda-default-retriever-0.0.5.jar:/project/.holy-lambda/.m2/metosin/jsonista/0.3.2/jsonista-0.3.2.jar:/project/.holy-lambda/.m2/org/clojure/core.specs.alpha/0.2.56/core.specs.alpha-0.2.56.jar:/project/.holy-lambda/.m2/org/clojure/spec.alpha/0.2.194/spec.alpha-0.2.194.jar:/project/.holy-lambda/.m2/com/fasterxml/jackson/core/jackson-core/2.12.2/jackson-core-2.12.2.jar:/project/.holy-lambda/.m2/com/fasterxml/jackson/core/jackson-databind/2.12.2/jackson-databind-2.12.2.jar:/project/.holy-lambda/.m2/com/fasterxml/jackson/datatype/jackson-datatype-jsr310/2.12.2/jackson-datatype-jsr310-2.12.2.jar:/project/.holy-lambda/.m2/com/fasterxml/jackson/core/jackson-annotations/2.12.2/jackson-annotations-2.12.2.jar:/clojure-master-patched.jar" :aot true :jvm-opts '["-Dclojure.compiler.direct-linking=true", "-Dclojure.spec.skip-macros=true"]' :jar .holy-lambda/build/output-agent.jar :main-class example.core
but I have received following error:
Unreadable arg: "src:resources:/project/.holy-lambda/.m2/io/github/FieryCod/holy-lambda/0.1.47/holy-lambda-0.1.47.jar:/project/.holy-lambda/.m2/com/amazonaws/aws-lambda-java-core/1.2.1/aws-lambda-java-core-1.2.1.jar:/project/.holy-lambda/.m2/io/github/FieryCod/holy-lambda-default-retriever/0.0.5/holy-lambda-default-retriever-0.0.5.jar:/project/.holy-lambda/.m2/metosin/jsonista/0.3.2/jsonista-0.3.2.jar:/project/.holy-lambda/.m2/org/clojure/core.specs.alpha/0.2.56/core.specs.alpha-0.2.56.jar:/project/.holy-lambda/.m2/org/clojure/spec.alpha/0.2.194/spec.alpha-0.2.194.jar:/project/.holy-lambda/.m2/com/fasterxml/jackson/core/jackson-core/2.12.2/jackson-core-2.12.2.jar:/project/.holy-lambda/.m2/com/fasterxml/jackson/core/jackson-databind/2.12.2/jackson-databind-2.12.2.jar:/project/.holy-lambda/.m2/com/fasterxml/jackson/datatype/jackson-datatype-jsr310/2.12.2/jackson-datatype-jsr310-2.12.2.jar:/project/.holy-lambda/.m2/com/fasterxml/jackson/core/jackson-annotations/2.12.2/jackson-annotations-2.12.2.jar:/clojure-master-patched.jar"
On the other hand running the same command as specified in README.md spits different error. I'm using depstar 2.0.216

seancorfield16:05:45

Strings as exec args need '"…"' quoting — that’s just how the Clojure CLI works — you need a string in EDN — "..." — and that needs quoting for the shell — '"..."'

seancorfield17:05:31

The second one is a mistake in the README. I copied how it worked for the old -M -m arguments and the quoting is wrong for EDN.

seancorfield17:05:37

README fixed: '"'$(clojure -Spath)'"' is what you need there.

seancorfield17:05:25

The single quotes are for the shell quoting, the double quotes are for EDN. You have to do them separately to allow the shell to still expand $(clojure -Spath) @karol.wojcik

👍 3