Fork me on GitHub
#unrepl
<
2018-03-21
>
dominicm11:03:36

https://github.com/redbadger/shade/ I found this btw, probably works for jars too

dominicm11:03:52

I'm guessing java deps are desirable to support

dominicm11:03:00

I have no idea if it is better than Mr. Anderson ofc.

cgrand11:03:50

Java deps are not supported yet but ideally they should. MrAnderson uses JarJar for that.

cgrand12:03:37

classes can have circular deps

dominicm12:03:12

@cgrand so, this shading, I could really use something for part of the pack pipeline (either in pack, or separate from shell), if it's particularly agnostic 😛. I may want to rip it into it's own library at some point.

bozhidar12:03:12

Seems everyone these days has their own idea about shading and how its supposed to be done.

bozhidar12:03:47

I’ll keep dreaming of the one true approach/library for this… 😉

cgrand12:03:44

Ah I didn’t know that shading was such a hot topic

bozhidar12:03:06

Hot topics always require a bit of shade. 😄

dominicm12:03:36

Pack uses classloaders for one kind of usage, and a lambda zip for another, which works for all my use-cases. It would be interesting to explore shading a little, as it would assist me in targetting some weird environments.

cgrand13:03:18

I think the only selling point of content-defined shading is to remove naming.

cgrand13:03:41

Then you have two approaches: coarse and fine.

dominicm13:03:49

content-aware shading?

cgrand13:03:33

I meant content-defined

cgrand13:03:08

• coarse: compute a hash of the whole “bundle” and use that hash has a the namespace prefix (so allows to reuse MrAnderson and friends) • fine: shade each unit (ns, java class) independently, but then the hash must be a suffix (so as not to break package-visibility across classes). It’s more complex but allows some code sharing

dominicm13:03:03

is the performance bad enough that sharing is useful? If performance is bad, wouldn't you just aot?

cgrand13:03:37

sharing was rather meant to avoid having multiple identical copies in memory (indirecty memory consumption affects perf); AOT doesn’t solve duplication.

dominicm13:03:58

coarse doesn't solve that either though right?

dominicm13:03:11

I suppose it does if you load vimpire 5 times.

cgrand13:03:33

right, only fine does that

cgrand13:03:32

@dominicm why, for pack, is this kind of shading better than typical shading?

dominicm13:03:29

Oh, I just don't have a convenient thing that's totally decoupled from lein yet 😁. Although, having said that, this would be much closer to npm-style deps than Mr. Anderson is right now, so would be a public service.