juxt

p-himik 2019-02-21T05:47:55.051500Z

Some new input - requiring manifold.stream causes parents to return nil.

p-himik 2019-02-21T05:50:23.051800Z

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=> 

p-himik 2019-02-21T05:59:48.053Z

It's reproducible with java -jar project.jar -r but not with clj --repl.

p-himik 2019-02-21T06:01:13.053800Z

How on Earth does this even work then? clojure.core cannot be *not* required before since e.g. composite-keyword uses stuff from it.

dominicm 2019-02-21T06:07:39.054200Z

That's very interesting

p-himik 2019-02-21T06:12:24.054400Z

How does the -r flag work?

p-himik 2019-02-21T06:21:52.054900Z

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.

p-himik 2019-02-21T06:23:00.055400Z

Is it possible that it has something to do with how onejar works?

dominicm 2019-02-21T06:43:17.055700Z

Definitely it's related to that

p-himik 2019-02-21T06:51:20.056700Z

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)

dominicm 2019-02-21T06:55:52.057900Z

Heads up btw, capsule is far more reliable than onejar in my opinion. It uses an approach a bit like lein trampoline.

dominicm 2019-02-21T06:57:31.060500Z

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.

p-himik 2019-02-21T06:58:38.061500Z

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!

dominicm 2019-02-21T06:59:54.062900Z

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)

dominicm 2019-02-21T07:29:26.063500Z

The easy solution here is to recommend capsule. This is a very unusual bug though.

p-himik 2019-02-21T07:30:58.064700Z

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.

dominicm 2019-02-21T07:38:36.065Z

Skinny jars are the best :)

dominicm 2019-02-21T08:57:51.065500Z

can confirm that capsule works fine.

👍 1
dominicm 2019-02-21T09:07:02.067100Z

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.

2019-02-21T15:45:02.068300Z

@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?

jonpither 2019-02-21T15:49:35.068500Z

No

jonpither 2019-02-21T15:49:41.068800Z

Against policy

2019-02-21T15:52:33.069200Z

ah well, so many plans thwarted 😉

2019-02-21T15:52:40.069500Z

it would have been fun @jonpither

2019-02-21T15:52:54.069800Z

I'll just have to stick with Mastodon and Witan then

2019-02-21T15:53:11.070200Z

(for me it is important that everything also have a backronym)

dominicm 2019-02-21T17:57:10.070300Z

@p-himik I have a patch to onejar that fixes the bug :)

p-himik 2019-02-21T17:58:54.070400Z

Great! I'll check it out when you push it.

dominicm 2019-02-21T18:07:22.070700Z

edge master now works

dominicm 2019-02-21T18:08:41.070900Z

Or did in my test anyway