This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-02-12
Channels
- # aws (3)
- # beginners (28)
- # boot (3)
- # cider (28)
- # clara (5)
- # cljs-dev (107)
- # cljsrn (1)
- # clojure (40)
- # clojure-austin (2)
- # clojure-brasil (5)
- # clojure-canada (1)
- # clojure-italy (1)
- # clojure-spec (39)
- # clojure-uk (38)
- # clojurescript (33)
- # community-development (11)
- # cursive (11)
- # datomic (43)
- # duct (6)
- # emacs (7)
- # flambo (1)
- # fulcro (68)
- # graphql (11)
- # jobs (1)
- # jobs-discuss (8)
- # leiningen (16)
- # luminus (2)
- # lumo (1)
- # off-topic (38)
- # om (2)
- # onyx (15)
- # parinfer (32)
- # portkey (5)
- # re-frame (50)
- # reagent (50)
- # reitit (1)
- # shadow-cljs (63)
- # spacemacs (10)
- # sql (27)
- # unrepl (6)
- # yada (2)
Hey so I have only recently discovered clojure but already have a dumb question maybe someone here could answer. I read that clojure makes for good "glue" code and someone I was talking to about this said that he thought Leinengen could be used to compile other jvm-lang projects and might be able to replace gradle as a build tool for things like Kotlin and what not. Is that a real possibility or just ill-informed nonsense? I figured tooling may be a practical place to start getting to know clojure but i'm still green enough that I can't tell if this is as dumb a question as I suspect it is.
leiningen is a dependency manager, it already knows how to compile and package clojure and java, if you like clojure better than groovy it might make sense to try managing a complex build in leiningen
I haven't used lein-kotlin, but it apparently exists https://github.com/reutermj/lein-kotlin
the small size of the code should give a hint about how easy it would be to compile other targets from clojure https://github.com/reutermj/lein-kotlin/blob/master/src/leiningen/kotlin.clj
Whoa, that is much less code than I imagined there being
one change that might be called for in that project is having a dedicated dependency vector for kotlin - in case kotlin should see deps other code doesn't or other code should see deps kotlin doesn't - but perhaps there's no need
or a more general thing would be to respect the :kotlin profile if present(?)
Hm, interesting.
also, there's an alternative build and dependency tool for clojure, boot, which is more oriented to builds as code (where leiningen is essentially a data based declarative dsl) - you might want to take a moment to compare before committing to doing tooling in a specific way
I’d like to use runit
to run lein
.
runit
needs to know the real PID of the process, but /usr/local/bin/lein
creates a child process (rather than exec), so signals sent to the /usr/local/bin/lein
PID don’t get passed to my code.
How might I get around this?
So far the only fix is to add exec
in front of "$LEIN_JAVA_CMD"
… but I’d rather not patch lein
OK, my workaround for now is to skip the /usr/local/bin/lein
script and run the java
command from line 351 directly (with -Dleiningen.original.pwd
etc) https://github.com/technomancy/leiningen/blob/stable/bin/lein#L351
@aaron51 that’s very interesting, I’d bet you’d get good feedback on that on the freenode #leiningen channel where the devs hang out
@aaron51 you can use lein trampoline run
to get lein to run a single process
@aaron51 also there are some gotchas to using lein in production, and quite a few advantages to running an uberjar (created with lein) via java
Anyone have any experience running existing Java JUnit tests via lein? https://github.com/technomancy/leiningen/blob/master/doc/MIXED_PROJECTS.md was helpful in incorporating java sources into my project.clj
but the one plugin I've found that seems to address this issue doesn't seem to work and is quite old.