Skip to content

Add net-http dependency to gemspec.#31

Merged
iMacTia merged 1 commit into
lostisland:mainfrom
simi:patch-1
Jan 9, 2024
Merged

Add net-http dependency to gemspec.#31
iMacTia merged 1 commit into
lostisland:mainfrom
simi:patch-1

Conversation

@simi

@simi simi commented Apr 11, 2023

Copy link
Copy Markdown
Contributor

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

iMacTia commented Apr 17, 2023

Copy link
Copy Markdown
Member

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

@simi

simi commented Apr 17, 2023

Copy link
Copy Markdown
Contributor Author

@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

iMacTia commented Apr 17, 2023

Copy link
Copy Markdown
Member

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

iMacTia commented Apr 17, 2023

Copy link
Copy Markdown
Member

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

@simi

simi commented Apr 17, 2023

Copy link
Copy Markdown
Contributor Author

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

@deivid-rodriguez

Copy link
Copy Markdown

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

simi commented Jan 9, 2024

Copy link
Copy Markdown
Contributor Author

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

@iMacTia

iMacTia commented Jan 9, 2024

Copy link
Copy Markdown
Member

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

simi commented Jan 9, 2024

Copy link
Copy Markdown
Contributor Author

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

@iMacTia

iMacTia commented Jan 9, 2024

Copy link
Copy Markdown
Member

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
Copy Markdown

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

iMacTia commented Jan 9, 2024

Copy link
Copy Markdown
Member

@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

stanhu commented Jan 10, 2024

Copy link
Copy Markdown

@deivid-rodriguez I know our environment is a bit weird, but I think this simple dependency addition exposed a possible RubyGems bug: ruby/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