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 gem dependency to silence net-protocol warnings #278

Conversation

onurkucukkece
Copy link

@onurkucukkece onurkucukkece commented Nov 17, 2022

Issue #279

After the gem update to v1.12.0, we started to get below warnings on net-protocol gem.

This PR adds net-http to gem dependencies for earlier versions of Ruby v3 to silence these warnings as suggested in ruby/net-imap#16

.rbenv/versions/2.7.5/lib/ruby/gems/2.7.0/gems/net-protocol-0.1.3/lib/net/protocol.rb:68: warning: already initialized constant Net::ProtocRetryError
.rbenv/versions/2.7.5/lib/ruby/2.7.0/net/protocol.rb:66: warning: previous definition of ProtocRetryError was here
.rbenv/versions/2.7.5/lib/ruby/gems/2.7.0/gems/net-protocol-0.1.3/lib/net/protocol.rb:208: warning: already initialized constant Net::BufferedIO::BUFSIZE
.rbenv/versions/2.7.5/lib/ruby/2.7.0/net/protocol.rb:206: warning: previous definition of BUFSIZE was here
.rbenv/versions/2.7.5/lib/ruby/gems/2.7.0/gems/net-protocol-0.1.3/lib/net/protocol.rb:504: warning: already initialized constant Net::NetPrivate::Socket
.rbenv/versions/2.7.5/lib/ruby/2.7.0/net/protocol.rb:503: warning: previous definition of Socket was here

@fphilipe
Copy link
Owner

fphilipe commented Dec 6, 2022

Conditional dependencies in gemspecs don't really work as expected. See also 5b2aa73#commitcomment-90641731.

I'll have to dig a bit deeper to understand what's going on here.

Closing this PR as it's not the proper fix. Thanks nonetheless for your effort 😍

@fphilipe fphilipe closed this Dec 6, 2022
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.

2 participants