This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-02-21
Channels
- # announcements (6)
- # bangalore-clj (1)
- # beginners (46)
- # cider (21)
- # cljs-dev (30)
- # cljsjs (3)
- # clojure (131)
- # clojure-dev (20)
- # clojure-europe (2)
- # clojure-italy (12)
- # clojure-nl (11)
- # clojure-russia (4)
- # clojure-spec (55)
- # clojure-uk (57)
- # clojurebridge (1)
- # clojured (1)
- # clojurescript (55)
- # cursive (11)
- # data-science (1)
- # datomic (23)
- # duct (1)
- # emacs (1)
- # events (1)
- # figwheel-main (2)
- # fulcro (219)
- # graphql (16)
- # immutant (1)
- # jackdaw (3)
- # java (6)
- # juxt (30)
- # kaocha (8)
- # mount (3)
- # nyc (1)
- # off-topic (16)
- # pathom (48)
- # pedestal (1)
- # re-frame (71)
- # reagent (17)
- # ring-swagger (3)
- # shadow-cljs (96)
- # spacemacs (21)
- # specter (8)
- # speculative (20)
- # sql (21)
- # test-check (2)
- # tools-deps (12)
- # vim (6)
Well this is disappointing:
$ java -jar project.jar -r
Clojure 1.10.0
user=> (require '[integrant.core :refer [composite-keyword]])
nil
user=> (def k (composite-keyword [:a/a :b/b]))
#'user/k
user=> (parents k)
#{:a/a :b/b}
user=> (require 'clojure.core)
nil
user=> (parents k)
nil
user=>
How on Earth does this even work then? clojure.core
cannot be *not* required before since e.g. composite-keyword
uses stuff from it.
I mean when there's project.jar
. I can't reproduce the issue with just java -cp /usr/local/lib/clojure/libexec/clojure-tools-1.10.0.411.jar clojure.main -r
.
I'm just interested at this point - why use onejar at all? In what aspects was it better for you than uberjar? (note that I've never used any of them, but am probably about to)
Heads up btw, capsule is far more reliable than onejar in my opinion. It uses an approach a bit like lein trampoline.
Uberjars have two major issues for me: 1. They discard licenses, this is a violation of Apache v2 2. You have to do stupid things like merging xml & edn files with the same name. I didn't want to do that.
Huh, interesting. On the second point - if the files have the same path? How does onejar and capsule handle that? I'll check capsule out, thanks!
They can either return the first one they find (what io/resource does) or they can return all of them (this is how data_readers.clj works)
For me the initial solution will be to use nothing at all. 🙂 Currently I use Heroku with automatic deployment from GitHub - I don't think having a single jar has any noticeable advantages here. But I'll definitely keep capsule in mind, thanks.
The onejar thing is still a bit weird, the class loader is exactly as I'd expect. I'm going to have to dig into the internals of clojure and figure why this isn't working.
@malcolmsparks @jonpither if I join juxt can I make libraries and apps with long names as long as they are Anglo-Saxon or Medieval Icelandic words?
it would have been fun @jonpither