This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-09-11
Channels
- # announcements (7)
- # aws (52)
- # babashka (16)
- # beginners (49)
- # bristol-clojurians (1)
- # calva (2)
- # chlorine-clover (26)
- # cider (6)
- # clara (1)
- # clj-kondo (79)
- # cljfx (15)
- # clojure (82)
- # clojure-berlin (2)
- # clojure-czech (1)
- # clojure-europe (26)
- # clojure-france (91)
- # clojure-germany (48)
- # clojure-nl (7)
- # clojure-norway (99)
- # clojure-uk (54)
- # clojurescript (18)
- # code-reviews (9)
- # data-science (2)
- # datalog (15)
- # datomic (15)
- # depstar (20)
- # emacs (4)
- # events (1)
- # fulcro (30)
- # funcool (1)
- # graphql (1)
- # helix (5)
- # jobs (6)
- # kaocha (12)
- # leiningen (8)
- # luminus (1)
- # malli (13)
- # off-topic (73)
- # pathom (12)
- # portal (11)
- # portland-or (1)
- # re-frame (10)
- # reagent (1)
- # reitit (44)
- # remote-jobs (1)
- # ring (19)
- # shadow-cljs (64)
- # tools-deps (32)
I'm using clojure
1.10.1.645
on linux
When I do clojure -e "(compile 'app.main)"
it results in java .... -e '(compile '\''app.main)'
wich works
When I create a alias :aot {:main-opts ["-e" "(compile 'app.main)"]}
It results in java commnad like -e '(compile' ''\''conduit.server)'
which will do a EOF
error, as it will try to eval (compile
Is it a know issue? I think that I already used it before (it looks like a regression for me)
PS: I'm using bash -x /usr/bin/clojure ...
to know which "final java command" clojure is calling
nothing has changed in this area afaik
things in :main-opts go into a file, and then back out of a file which causes problems due to word-splitting in bash
so if you replace the space after compile with a , that will help
this is a known issue (but it has always been a known issue :)
there is a ticket and about 4 different patches on there already :)
let me find it
Here’s related issue around Windows https://clojure.atlassian.net/jira/software/c/projects/TDEPS/issues/TDEPS-133
I just routinely use ,
instead of whitespace when writing stuff in deps.edn
and even on the command-line for clojure
🙂
I can think of worse things to be known for 🙂
Now thinking about Windows. I can't implement a bash-friendly solution, once it may be dificult to implement in "cmd", once it may need to "interpret" that file as bash. How is going that idea of do like "deps.exe" and use a graal-binary to replace bash/bat?
If you want to work on plain old Windows and don’t need to stay with official Clojure tools, you might consider trying https://github.com/borkdude/deps.clj. Using its deps.exe
in place of clojujre.exe
made sense for me when testing my project under Windows on GitHub Actions.
I just routinely use ,
instead of whitespace when writing stuff in deps.edn
and even on the command-line for clojure
🙂
now of course, you can just use -X in many cases instead :)
Although you can't use -X
to do a simple compile
because it requires a symbol and -X
passes a hash map 🙂
All you need is a single invoke
:
(defn invoke [{:keys [fn args]}]
(apply fn args))
(invoke {:fn inc :args [1]}) => 2
All you need is a single invoke
:
(defn invoke [{:keys [fn args]}]
(apply fn args))
(invoke {:fn inc :args [1]}) => 2
A new prerelease version of clj is now available (1.10.1.681): • Reinstate -R, -C, and -Spom from last week's prerelease (but still deprecated) • TDEPS-155 - Some error message improvements for various bad coordinate cases
Based on feedback from last week, added some things back to ease the migration.
For the moment -Spom will not warn. The -X:deps mvn-pom version was really missing support for modifications to the classpath previously pulled from clj invocation itself. I've added that as an arg but needs more thinking.
@seancorfield I've also standardized all the deprecation warnings to be stderr, if you wanted to pipe redirect them to /dev/null and ignore that's at least possible now. also I fixed the exec.jar issue in the installation.
Thanks @alexmiller -- just to confirm, is -R
exactly the same as before? It hasn't expanded to support other types of arg maps like -A
?
yes, just re-added, not going to do the expanded thing
I had an uberjar alias using depstar that was configured with main opts of:
["-m" "hf.depstar.uberjar"
"target/myproject-with-dependencies.jar"
"--compile" "*" ;Note - the * seems to be needed for older versions of the args, but not now.
"--verbose"
"-m" "myproject.main"]
It was using the RELEASE version of depstar. I noticed that now instead of putting the jar in target/myproject-with-dependencies.jar it creates a jar named (Note: Do not rm *
). It seems to work fine if I set the explicit version to 1.1.104 and drop the "".
Is this the right way to build the standalone jar with aot compilation? It looks like --compile will do transitive compilation from your entry point. Is there a way to specify aoting the whole project? I saw that you can do :aot true. If I did that would it go in the main args or next to the :main-args key in the deps file?Actually, looks like :aot is part of the -X functionality. I missed that.
Thanks, I should have thought of that.