lostisland / sawyer

Secret User Agent of HTTP
MIT License
247 stars 75 forks source link

allow faraday 2.x? #70

Closed jrochkind closed 2 years ago

jrochkind commented 2 years ago

The latest release as well as master branch of sawyer do not allow Faraday 2.x.

https://github.com/lostisland/sawyer/blob/7d57eda0a7d46b62012cb835394174b3c2099580/sawyer.gemspec#L20

Faraday 2.0 was released on January 04 2022, and is already up to 2.2.0.

Sawyer is deep in my dependency tree -- like 5 or 6 levels down, dependency of a dependency of a etc. And is preventing my app from upgrading to faraday 2.0.

Is there any chance of a sawyer release that allows both faraday 1.x and 2.x? Any backwards breaking changes were relatively minor, it should be possible to allow both 1.x and 2.x -- which I really recommend, updating to support only 2.x will actually be challenging since so many projects have so many indirect faraday dependencies, getting them all to agree is hard.

If there is a maintainer reading this, appreciate hearing from you! Thank you!

tclaus commented 2 years ago

Will #71 solve the problem?

jrochkind commented 2 years ago

@tclaus thanks! It might, once a release is done! #71 allows Faraday 2.x and only Faraday 2.x. (actually 2.2 or greater specifically).

If possible, I think allowing ">=1.0" , "< 3" is superior. But this might work too as you've done it, once you do a release.

What makes this all so hairy is that a typical project can have quite a few indirect dependencies that reference faraday. If some of them allow only faraday 1.x and others allow only faraday 2.x.... then you can't use the new version that allows faraday 2.x until all your dependencies allow faraday 2.x. Which might be fine, you keep using (eg) the old version of sawyer until all your dependencies allow faraday 2.x, at which point you can upgrade to the new (eg) sawyer (and possibly others).

Which is the position #71 would put us in with regard to sawyer. It can be navigated. But if it's possible to support 1.x and 2.x, it can make a very confusing situation slightly less confusing, as both projects that can and can't upgrade yet to faraday 2.x could both use the latest sawyer.

tclaus commented 2 years ago

I've changed to ">=1" by now. Lets see what the project owner thinks.

iMacTia commented 2 years ago

There's now #72 which adds support for all major Faraday versions, waiting to be merged and released 👍

tclaus commented 2 years ago

72 is much more cooler, than my PR. Thanks for the great work.

iMacTia commented 2 years ago

72 has now been merged and released with 0.9.0 🎉

tclaus commented 2 years ago

SuperTux88 did you see this?