Skip to content

Extract bundled gems for Ruby 3.1#4530

Merged
hsbt merged 11 commits intoruby:masterfrom
hsbt:extract-bundled-gems
May 27, 2021
Merged

Extract bundled gems for Ruby 3.1#4530
hsbt merged 11 commits intoruby:masterfrom
hsbt:extract-bundled-gems

Conversation

@hsbt
Copy link
Member

@hsbt hsbt commented May 26, 2021

No description provided.

@ioquatix
Copy link
Member

This is great.

@hsbt hsbt merged commit d2664b9 into ruby:master May 27, 2021
@hsbt hsbt deleted the extract-bundled-gems branch May 27, 2021 05:42
casperisfine pushed a commit to Shopify/mail that referenced this pull request May 28, 2021
casperisfine pushed a commit to Shopify/capybara that referenced this pull request May 28, 2021
yahonda added a commit to yahonda/rails that referenced this pull request Jun 6, 2021
Ruby 3.1 extracts some gems to bundled one, which requires to add these gems to Gemfile explicitly.
`net/smtp` is one of them, which affected Action Mailbox bug report templates.

* Steps to reproduce

Install `ruby 3.1.0dev`

```
git clone https://github.com/rails/rails.git
cd rails/guides
ruby bug_report_templates/action_mailbox_gem.rb
ruby bug_report_templates/action_mailbox_main.rb
```

* This commit addresses the following error `cannot load such file -- net/smtp (LoadError)`

```
$ ruby bug_report_templates/action_mailbox_gem.rb
... snip ...
Using rails 6.1.0
/home/yahonda/.rbenv/versions/3.1.0-dev/lib/ruby/gems/3.1.0/gems/activesupport-6.1.0/lib/active_support/dependencies.rb:332:in `require': cannot load such file -- net/smtp (LoadError)
	from /home/yahonda/.rbenv/versions/3.1.0-dev/lib/ruby/gems/3.1.0/gems/activesupport-6.1.0/lib/active_support/dependencies.rb:332:in `block in require'
	from /home/yahonda/.rbenv/versions/3.1.0-dev/lib/ruby/gems/3.1.0/gems/activesupport-6.1.0/lib/active_support/dependencies.rb:299:in `load_dependency'
	from /home/yahonda/.rbenv/versions/3.1.0-dev/lib/ruby/gems/3.1.0/gems/activesupport-6.1.0/lib/active_support/dependencies.rb:332:in `require'
	from /home/yahonda/.rbenv/versions/3.1.0-dev/lib/ruby/gems/3.1.0/gems/mail-2.7.1/lib/mail.rb:9:in `<module:Mail>'
	from /home/yahonda/.rbenv/versions/3.1.0-dev/lib/ruby/gems/3.1.0/gems/mail-2.7.1/lib/mail.rb:3:in `<top (required)>'
	from /home/yahonda/.rbenv/versions/3.1.0-dev/lib/ruby/gems/3.1.0/gems/activesupport-6.1.0/lib/active_support/dependencies.rb:332:in `require'
	from /home/yahonda/.rbenv/versions/3.1.0-dev/lib/ruby/gems/3.1.0/gems/activesupport-6.1.0/lib/active_support/dependencies.rb:332:in `block in require'
	from /home/yahonda/.rbenv/versions/3.1.0-dev/lib/ruby/gems/3.1.0/gems/activesupport-6.1.0/lib/active_support/dependencies.rb:299:in `load_dependency'
	from /home/yahonda/.rbenv/versions/3.1.0-dev/lib/ruby/gems/3.1.0/gems/activesupport-6.1.0/lib/active_support/dependencies.rb:332:in `require'
	from /home/yahonda/.rbenv/versions/3.1.0-dev/lib/ruby/gems/3.1.0/gems/actionmailbox-6.1.0/lib/action_mailbox/mail_ext.rb:3:in `<top (required)>'
	from /home/yahonda/.rbenv/versions/3.1.0-dev/lib/ruby/gems/3.1.0/gems/activesupport-6.1.0/lib/active_support/dependencies.rb:332:in `require'
	from /home/yahonda/.rbenv/versions/3.1.0-dev/lib/ruby/gems/3.1.0/gems/activesupport-6.1.0/lib/active_support/dependencies.rb:332:in `block in require'
	from /home/yahonda/.rbenv/versions/3.1.0-dev/lib/ruby/gems/3.1.0/gems/activesupport-6.1.0/lib/active_support/dependencies.rb:299:in `load_dependency'
	from /home/yahonda/.rbenv/versions/3.1.0-dev/lib/ruby/gems/3.1.0/gems/activesupport-6.1.0/lib/active_support/dependencies.rb:332:in `require'
	from /home/yahonda/.rbenv/versions/3.1.0-dev/lib/ruby/gems/3.1.0/gems/actionmailbox-6.1.0/lib/action_mailbox.rb:3:in `<top (required)>'
	from /home/yahonda/.rbenv/versions/3.1.0-dev/lib/ruby/gems/3.1.0/gems/activesupport-6.1.0/lib/active_support/dependencies.rb:332:in `require'
	from /home/yahonda/.rbenv/versions/3.1.0-dev/lib/ruby/gems/3.1.0/gems/activesupport-6.1.0/lib/active_support/dependencies.rb:332:in `block in require'
	from /home/yahonda/.rbenv/versions/3.1.0-dev/lib/ruby/gems/3.1.0/gems/activesupport-6.1.0/lib/active_support/dependencies.rb:299:in `load_dependency'
	from /home/yahonda/.rbenv/versions/3.1.0-dev/lib/ruby/gems/3.1.0/gems/activesupport-6.1.0/lib/active_support/dependencies.rb:332:in `require'
	from /home/yahonda/.rbenv/versions/3.1.0-dev/lib/ruby/gems/3.1.0/gems/actionmailbox-6.1.0/lib/action_mailbox/engine.rb:9:in `<top (required)>'
	from /home/yahonda/.rbenv/versions/3.1.0-dev/lib/ruby/gems/3.1.0/gems/activesupport-6.1.0/lib/active_support/dependencies.rb:332:in `require'
	from /home/yahonda/.rbenv/versions/3.1.0-dev/lib/ruby/gems/3.1.0/gems/activesupport-6.1.0/lib/active_support/dependencies.rb:332:in `block in require'
	from /home/yahonda/.rbenv/versions/3.1.0-dev/lib/ruby/gems/3.1.0/gems/activesupport-6.1.0/lib/active_support/dependencies.rb:299:in `load_dependency'
	from /home/yahonda/.rbenv/versions/3.1.0-dev/lib/ruby/gems/3.1.0/gems/activesupport-6.1.0/lib/active_support/dependencies.rb:332:in `require'
	from bug_report_templates/action_mailbox_gem.rb:17:in `<main>'
```

* Added comment when this dependency can be removed based on https://bugs.ruby-lang.org/issues/17873

Refer
ruby/ruby#4530
rails#42308

Co-authored-by: Jean Boussier <jean.boussier@gmail.com>
casperisfine pushed a commit to Shopify/mail that referenced this pull request Nov 11, 2021
deivid-rodriguez pushed a commit to deivid-rodriguez/mail that referenced this pull request Feb 16, 2022
deivid-rodriguez pushed a commit to deivid-rodriguez/mail that referenced this pull request Feb 16, 2022
deivid-rodriguez pushed a commit to deivid-rodriguez/mail that referenced this pull request Feb 16, 2022
deivid-rodriguez pushed a commit to deivid-rodriguez/mail that referenced this pull request Feb 16, 2022
deivid-rodriguez pushed a commit to deivid-rodriguez/mail that referenced this pull request Feb 16, 2022
deivid-rodriguez pushed a commit to deivid-rodriguez/mail that referenced this pull request Feb 16, 2022
deivid-rodriguez pushed a commit to deivid-rodriguez/mail that referenced this pull request Feb 17, 2022
deivid-rodriguez pushed a commit to deivid-rodriguez/mail that referenced this pull request Feb 17, 2022
Add net-smtp as a dependency for Ruby 3.1 compatibility

It was recently removed from the default gems:

  - https://bugs.ruby-lang.org/issues/17873
  - ruby/ruby#4530

Also add net-imap and net-pop to the gemspec

JRuby already has prerelease support for `io-wait` as a gem, and an
almost ready PR to also support `strscan` as a gem, dependencies
introduced by this change. Adding both to the Gemfile gets `bundle
install` to succeed, although specs fail later because Bundler does not
seem to support pointing to a java extension gem through git.
deivid-rodriguez pushed a commit to deivid-rodriguez/mail that referenced this pull request Feb 17, 2022
Add net-smtp as a dependency for Ruby 3.1 compatibility

It was recently removed from the default gems:

  - https://bugs.ruby-lang.org/issues/17873
  - ruby/ruby#4530

Also add net-imap and net-pop to the gemspec

JRuby already has prerelease support for `io-wait` as a gem, and an
almost ready PR to also support `strscan` as a gem, dependencies
introduced by this change. Adding both to the Gemfile gets `bundle
install` to succeed, although specs fail later because Bundler does not
seem to support pointing to a java extension gem through git.
deivid-rodriguez pushed a commit to deivid-rodriguez/mail that referenced this pull request Mar 10, 2022
Add net-smtp as a dependency for Ruby 3.1 compatibility

It was recently removed from the default gems:

  - https://bugs.ruby-lang.org/issues/17873
  - ruby/ruby#4530

Also add net-imap and net-pop to the gemspec

JRuby already has prerelease support for `io-wait` as a gem, and an
almost ready PR to also support `strscan` as a gem, dependencies
introduced by this change. Adding both to the Gemfile gets `bundle
install` to succeed, although specs fail later because Bundler does not
seem to support pointing to a java extension gem through git.
deivid-rodriguez pushed a commit to deivid-rodriguez/mail that referenced this pull request Apr 21, 2022
Add net-smtp as a dependency for Ruby 3.1 compatibility

It was recently removed from the default gems:

  - https://bugs.ruby-lang.org/issues/17873
  - ruby/ruby#4530

Also add net-imap and net-pop to the gemspec

This dependencies introduces `io-wait` and `strscan` as subdependencies,
but JRuby only has prerelease support for those. Make sure those
prereleases are properly picked up by our tests by adding them to the
`Gemfile`.
deivid-rodriguez pushed a commit to deivid-rodriguez/mail that referenced this pull request Apr 21, 2022
Add net-smtp as a dependency for Ruby 3.1 compatibility

It was recently removed from the default gems:

  - https://bugs.ruby-lang.org/issues/17873
  - ruby/ruby#4530

Also add net-imap and net-pop to the gemspec

This dependencies introduces `io-wait` and `strscan` as subdependencies,
but JRuby only has prerelease support for those. Make sure those
prereleases are properly picked up by our tests by adding them to the
`Gemfile`.
deivid-rodriguez pushed a commit to deivid-rodriguez/mail that referenced this pull request Apr 21, 2022
Add net-smtp as a dependency for Ruby 3.1 compatibility

It was recently removed from the default gems:

  - https://bugs.ruby-lang.org/issues/17873
  - ruby/ruby#4530

Also add net-imap and net-pop to the gemspec

This dependencies introduces `io-wait` and `strscan` as subdependencies,
but JRuby only has prerelease support for those. Make sure those
prereleases are properly picked up by our tests by adding them to the
`Gemfile`.
deivid-rodriguez pushed a commit to deivid-rodriguez/mail that referenced this pull request Apr 21, 2022
Add net-smtp as a dependency for Ruby 3.1 compatibility

It was recently removed from the default gems:

  - https://bugs.ruby-lang.org/issues/17873
  - ruby/ruby#4530

Also add net-imap and net-pop to the gemspec

This dependencies introduces `strscan` as a subdependency, but JRuby
only has prerelease support for it. Make sure the prerelease is
properly picked up by our tests by adding it to the `Gemfile`.
deivid-rodriguez pushed a commit to deivid-rodriguez/mail that referenced this pull request Apr 21, 2022
Add net-smtp as a dependency for Ruby 3.1 compatibility

It was recently removed from the default gems:

  - https://bugs.ruby-lang.org/issues/17873
  - ruby/ruby#4530

Also add net-imap and net-pop to the gemspec

This dependencies introduces `strscan` as a subdependency, but JRuby
only has prerelease support for it. Make sure the prerelease is
properly picked up by our tests by adding it to the `Gemfile`.
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