Fork me on GitHub
#juxt
<
2019-01-09
>
rgm02:01:14

I have an esoteric thing going on with pack/onejar and I’m hoping for some guidance on where to even deal with it… the situation:

rgm02:01:36

- I’m packing up an uberjar with onejar (it’s the one I could get working; no real preference,

rgm02:01:59

- I have a ring handler using (wrap-resource "public")

rgm02:01:26

it seems that my static file delivery blows up because of a missing :onejar method for ring.util.response/resource-data

rgm02:01:10

my java-fu is insufficient to figure out the method implementation. I don’t think this is really a juxt/pack problem, but I’m hoping for some guidance where I might document this or help other people out with getting over the hump

dominicm06:01:07

Make sure you're on master. This might have been broken recently. The readme is out of date. Any clues about what resource-data does? I'm guessing it is looking at the URL in some way. Capsule would avoid the problem if so.

rgm21:01:24

@dominicm resource-data seems to do the work of figuring out content-type, last-modified, content-length headers so Ring can stuff them into the response. Ring provides :file and :jar implementations, but it seems onejar gives back URLs of the form onejar://.... See also https://github.com/ring-clojure/ring/blob/1.7.0/ring-core/src/ring/util/response.clj#L241-L242

rgm21:01:48

pretty sure this isn’t pack’s problem. I’ll give capsule a go

dominicm21:01:41

@rgm I reckon the jar implementation would work for what onejar has given you, based on a cursory look.

rgm21:01:37

maybe so … I bailed out and used depstar to make a deadline but I’ll circle back.