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

Add net-http dependency to gemspec. #31

Merged
merged 1 commit into from
Jan 9, 2024
Merged

Conversation

simi
Copy link
Contributor

@simi simi commented Apr 11, 2023

As suggested at ruby/net-imap#16 (comment). It prevents double-loads as the one happening at Rails CI.

Regarding #7 (comment), gem is locked to Ruby 2.6+ and net-http gem is locked to Ruby 2.6+ as well.

@iMacTia
Copy link
Member

iMacTia commented Apr 17, 2023

I still disagree with that stance and I've reached out to clarify. Leaving this here until we find an agreement

@simi
Copy link
Contributor Author

simi commented Apr 17, 2023

@iMacTia I can try to help here. Is there any simple reproducer for faraday-net_http case with Ruby 2.6? I tried locally and everything works fine in my simple scripts 🤔.

@iMacTia
Copy link
Member

iMacTia commented Apr 17, 2023

I think this only happens where there's another gem directly pulling in a standard gem as a direct dependency.
You could try using your branch here (with net-http as a Faraday dependency and requiring net-http or net-protocol before faraday.

# on simi:patch-1 branch
require 'net-http' # (or net-protocol?)
require 'faraday-net_http'

I'm not sure though, I haven't experienced this issue directly myself yet

@iMacTia
Copy link
Member

iMacTia commented Apr 17, 2023

If that doesn't work, then mixing faraday-net_http with mail_room seems to cause the issue

@simi
Copy link
Contributor Author

simi commented Apr 17, 2023

OK, thanks for the hints. I'll try to reproduce and report back.

@deivid-rodriguez
Copy link

Just to clarify, I'm 👍 to this PR and I wouldn't expect it to cause issues on any supported rubies if the minimum supported version is 2.6, and net/http was gamified in Ruby 2.5.

@simi
Copy link
Contributor Author

simi commented Jan 9, 2024

Since Ruby 2.6 is EOL now, would it make sense to bump required ruby version and finally fix this?

@iMacTia
Copy link
Member

iMacTia commented Jan 9, 2024

We've recently made Ruby 3.0 the minimum for Faraday (change is in main, to be released).

Since net-http became a default gem in 3.0, I'm now happy to get this merged and released after bumping the minimum ruby version to 3.0. Would that work for you @simi ?

@simi
Copy link
Contributor Author

simi commented Jan 9, 2024

Let's ensure with @deivid-rodriguez this is still good idea. From my side 👍.

@iMacTia
Copy link
Member

iMacTia commented Jan 9, 2024

I'll get things started while we wait for @deivid-rodriguez (merge + CI changes), will hold on cutting a release though 🙂

@iMacTia iMacTia merged commit b978556 into lostisland:main Jan 9, 2024
@deivid-rodriguez
Copy link

Yes, I still think this is a good idea, and also smoother if the version that ships the change won't be installable on older rubies 👍.

@iMacTia
Copy link
Member

iMacTia commented Jan 9, 2024

@deivid-rodriguez @simi thank you both for participating in this discussion and for your patience.
faraday-net_http 3.1 has now been released (thanks to @olleolleolle) as well as Faraday 2.9.0 which allows to use this new release.

If you could give it a try, your feedback would be greatly appreciated 🙏

@stanhu
Copy link

stanhu commented Jan 10, 2024

@deivid-rodriguez I know our environment is a bit weird, but I think this simple dependency addition exposed a possible RubyGems bug: rubygems/rubygems#7374

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

Successfully merging this pull request may close these issues.

4 participants