Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade guide says adapters will be in Faraday's dependecies in 2.0, but they are not #1364

Closed
jrochkind opened this issue Jan 5, 2022 · 1 comment

Comments

@jrochkind
Copy link
Contributor

Upgrade guide for 2.0 says:

All adapters have already been moved out and released as separate gems. They've then been re-added into Faraday's dependencies so that you wouldn't notice.

https://github.com/lostisland/faraday/blob/565f463fdc324a8a726a099fe85d291b3ebe5fc1/UPGRADING.md

I read this as saying the adapters would be expressed as dependencies of the faraday gem, so they didn't have to be manually added to downstream consumers to keep using them -- "so that you wouldn't notice". Am I misreading/misunderstanding it?

But this does not seem to have been done? They are not dependencies in faraday 2.0?

https://rubygems.org/gems/faraday/versions/2.0.0

I'm not sure if you changed your mind after you wrote the Upgrade guide but didn't update it? Or if you made a mistake? One way or another the upgrade guide should match actual behavior.

The actual situation, where they are not dependencies, means that intermediate gems have to add any adapters they are using into their own dependencies, which in some cases can limit what versions of faraday they can support. If an adapter gem has a gemspec that allows a narrower range of faraday than the intermediate gem previously did, then the intermedia gem adding a dependency to the adapter gem results in reducing the allowable faraday versions supported by the intermediate gem.

If faraday 2.x included the adapter dependencies itself as the Upgrade guide said, this wouldn't be an issue. I liked the plan in the upgrade guide! :)

@iMacTia
Copy link
Member

iMacTia commented Jan 5, 2022

Hi @jrochkind, I'm sorry if the wording is not clear on the UPGRADING.md doc 😞.
What we meant there was that adapters have been re-added as dependencies in Faraday v1.0, but you'll need to manually add them in Faraday v2.0 (as exaplained in the following section).

I'm open to suggestions on how to make that points more clear.
Thanks also for pointing to this ticket from rsolr/rsolr#229, that gives me visibility on an exact use-case for supporting both major versions of Faraday.
I'll have a look as soon as possible and come up with instructions on how to achieve that.
If that will require changes to Faraday 2.0 or the adapters gem, then we'll also do that

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants