ninenines / gun

HTTP/1.1, HTTP/2, Websocket client (and more) for Erlang/OTP.
ISC License
891 stars 232 forks source link

Please stop relying on "master" in rebar.config #214

Closed distortedsignal closed 4 years ago

distortedsignal commented 4 years ago

Recently, I received a project at work that requires proxying various protocols - initially it's SPDY and HTTP/1.1, eventually it will probably be HTTP/2.0 as well, but that's tomorrow's problem. I initially tried to accomplish this with httpc, but that proved impossible, because httpc is an HTTP/1.1 client only. My next thought was the cowboy stack - I've been wanting to try this stack out for a while, and this seems like a great time.

However, as soon as I attempted to find an old release to get started, I ran into trouble. It seems that you're relying on master across all projects to be in a consistent state. Beyond that, if I go back and try to use an old version of gun, I end up pulling the latest cowlib since this relies on master in its rebar.config file. I would appreciate if either 1. the entire project released at once or 2. there was a consistent and simple way to get a snapshot of all utils at a given point in time.

I think this project is super neat, but I'm frustrated that I'm struggling so hard to consume it.

distortedsignal commented 4 years ago

If it would help, I'm willing to contribute server time to help with releases and release testing.

essen commented 4 years ago

All releases/tags have fixed dependencies, excluding a few pre-releases (0.x versions or x-pre.y versions). So just use proper versions I guess? I change dependencies to master only when it's necessary during development, and I don't intend most people to use development versions. If you do, you ought to deal with it. For Gun the most recent stable version is 1.3.1 and it depends on Cowlib 2.6.0: https://github.com/ninenines/gun/commit/069040a93bb88477dcae197fa14280a10cce72d8 https://github.com/ninenines/gun/blob/069040a93bb88477dcae197fa14280a10cce72d8/rebar.config

I don't know what you mean by old release though because the first Gun version was depending on Cowlib 2.4.0: https://github.com/ninenines/gun/blob/1.0.0/rebar.config

Cowboy/Gun depend on Cowlib but there hasn't been an issue with that in a long time (not since they both depend on Cowlib 2.x), just use the Cowlib dependency that's the most recent out of the two and it'll work for both.

distortedsignal commented 4 years ago

That's fair - I assumed the pre-releases were supported. SPDY support was removed in 1.0.0-pre.4 I think, so that's what I'm working off.

Sorry about that.

essen commented 4 years ago

They kind of are but not on the same level as proper releases. I strongly recommend 2.0.0-pre.1 right now even though it's a pre-release and here again the dependency isn't fixed (but it will be in pre.2).

The best course of action in your case is probably to move the old SPDY code to Gun 2.0, it shouldn't be too difficult. That's going to be necessary for when you need both SPDY and HTTP/2. Note that the SPDY code never went very far either so you're likely to run into issues.

distortedsignal commented 4 years ago

Would you be willing to accept PRs if I get SPDY closer to working?

essen commented 4 years ago

I don't really know, I suppose we can discuss when the time comes and see how far you're willing to go. Good luck!