This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-03-12
Channels
- # announcements (65)
- # aws (1)
- # babashka (12)
- # beginners (111)
- # bristol-clojurians (1)
- # cider (32)
- # clj-kondo (55)
- # clojars (3)
- # clojure (71)
- # clojure-europe (17)
- # clojure-france (4)
- # clojure-italy (36)
- # clojure-losangeles (8)
- # clojure-nl (6)
- # clojure-uk (115)
- # clojurescript (2)
- # datomic (99)
- # fulcro (32)
- # graalvm (12)
- # graphql (20)
- # hoplon (203)
- # meander (56)
- # mount (3)
- # off-topic (17)
- # pathom (17)
- # reitit (22)
- # shadow-cljs (32)
- # spacemacs (9)
- # tools-deps (19)
- # vim (25)
- # vscode (3)
I'm wanting to write a small Java file and use it in my Clojure app using deps.edn
and clj
. Is there anything similar to :java-source-paths
or another way I can accomplish the same goal? My other option is to write this and create a JAR for it and deploy it somewhere or keep it as a local resource
You can use javac and have it output to target, and run that shell script before starting clj
Might be easier to rewrite the algorithm to Clojure 🙂
there are some tools.deps add-ons that can compile as well, like badigeon
it's a wrapper for badigeon
also there is a template for application https://github.com/redstarssystems/app-template
@borkdude no, badigeon is not a ready tool. it is low level api for managing project distributed as sources, which need to be adapted.
@dominicm if you are suggesting that libraries should maintain a directory full of compiled classes, I think that is a bad idea and you should not do that
if you want to distribute compiled artifacts, you can already do that by putting them in a jar. we don't typically do that in Clojure because the source is so much more flexible.
I'm not. I'm saying all of the infrastructure around this, code laying around to do the compilation on startup.
@alexmiller if you call (compile 'foo)
twice, will the second be almost a no-op as it sees it's already compiled?
you can try it in that project I posted if you like