jacobobryant / biff

A Clojure web framework for solo developers.
https://biffweb.com
MIT License
877 stars 41 forks source link

Resolve dependency conflict with cognitect-labs/aws-api #134

Closed jacobobryant closed 9 months ago

jacobobryant commented 2 years ago

Biff uses https://github.com/sunng87/ring-jetty9-adapter because it comes with a websocket adapter. Unfortunately Jetty v10 (which, despite the name, ring-jetty9-adapter uses) is incompatible with aws-api which is on Jetty v9. We can use ring-jetty9-adapter v0.14.3 to go back to Jetty v9 (and I've confirmed that fixes the dependency conflict with aws-api), but the websocket interface is different so will require more work than just changing the dependency. I wonder how hard it would be to just use the standard ring-jetty-adapter and use websockets directly without an adapter (or maybe have biff supply its own adapter). Being on ring-jetty-adapter would probably minimize the chance of future dependency conflicts.

jacobobryant commented 2 years ago

If anyone happens to run into this and wants to use aws-api, if you're not using websockets then you can add info.sunng/ring-jetty9-adapter {:mvn/version "0.14.3"} to your dependencies and it'll just work. If you are using websockets already then you'll need to look at the ring-jetty9-adapter docs/code to see the correct way to set up websockets--the method shown in biff's example project won't work.

sunng87 commented 2 years ago

ring-jetty9-adapter maintainer here. If there a lot of cases for using aws-api and websocket together, I can back port the new websocket APIs to 0.14.x. Please report in this thread so I can judge if it worthies the effort.

jacobobryant commented 2 years ago

Oh, hi! Thanks for popping in.

I wouldn't prioritize this honestly. No one else has brought this up to me. I just ran into it myself because I was setting up SES in one of my applications. And even in that case, I'm not using websockets, so switching to 0.14.3 didn't require any extra effort. (Not to mention I ended up going with a different email provider than SES anyway, so it's all a moot point).

Even on my end I consider this a low priority issue--partially I just wanted to document it in case a Biff user does try to use aws-api. I probably won't do anything with this myself until I get a report from someone who does that and is using websockets already, which may or may not ever happen.