Is /N
a valid symbol?
According to the EDN spec it is explicitly forbidden. Why go away from the #unrepl/...?
https://github.com/redbadger/shade/ I found this btw, probably works for jars too
I'm guessing java deps are desirable to support
I have no idea if it is better than Mr. Anderson ofc.
Java deps are not supported yet but ideally they should. MrAnderson uses JarJar for that.
yep
classes can have circular deps
@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.
Seems everyone these days has their own idea about shading and how its supposed to be done.
🙂
I’ll keep dreaming of the one true approach/library for this… 😉
Ah I didn’t know that shading was such a hot topic
Hot topics always require a bit of shade. 😄
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.
I think the only selling point of content-defined shading is to remove naming.
Then you have two approaches: coarse and fine.
content-aware shading?
• 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
I meant content-defined
is the performance bad enough that sharing is useful? If performance is bad, wouldn't you just aot?
sharing was rather meant to avoid having multiple identical copies in memory (indirecty memory consumption affects perf); AOT doesn’t solve duplication.
coarse doesn't solve that either though right?
I suppose it does if you load vimpire 5 times.
right, only fine does that
@dominicm why, for pack, is this kind of shading better than typical shading?
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.