Skip to content

Update thin version - #530

Merged
sj26 merged 1 commit into
sj26:mainfrom
mockdeep:patch-1
Jan 29, 2023
Merged

Update thin version#530
sj26 merged 1 commit into
sj26:mainfrom
mockdeep:patch-1

Conversation

@mockdeep

@mockdeep mockdeep commented Jan 4, 2023

Copy link
Copy Markdown
Contributor

Version 1.5.x no longer works on Ruby 3.2:

/home/fletch/.asdf/installs/ruby/3.2.0/lib/ruby/gems/3.2.0/gems/thin-1.5.1/lib/thin/server.rb:104:in `block in initialize': uninitialized constant Thin::Server::Fixnum (NameError)
17:11:39 mail.1            | 
17:11:39 mail.1            |         when Fixnum, /^\d+$/ then port    = arg.to_i
17:11:39 mail.1            |              ^^^^^^
17:11:39 mail.1            | 	from /home/fletch/.asdf/installs/ruby/3.2.0/lib/ruby/gems/3.2.0/gems/thin-1.5.1/lib/thin/server.rb:102:in `each'
17:11:39 mail.1            | 	from /home/fletch/.asdf/installs/ruby/3.2.0/lib/ruby/gems/3.2.0/gems/thin-1.5.1/lib/thin/server.rb:102:in `initialize'
17:11:39 mail.1            | 	from /home/fletch/.asdf/installs/ruby/3.2.0/lib/ruby/gems/3.2.0/gems/thin-1.5.1/lib/thin/server.rb:145:in `new'
17:11:39 mail.1            | 	from /home/fletch/.asdf/installs/ruby/3.2.0/lib/ruby/gems/3.2.0/gems/thin-1.5.1/lib/thin/server.rb:145:in `start'
17:11:39 mail.1            | 	from /home/fletch/.asdf/installs/ruby/3.2.0/lib/ruby/gems/3.2.0/gems/mailcatcher-0.8.2/lib/mail_catcher.rb:190:in `block (2 levels) in run!'
17:11:39 mail.1            | 	from /home/fletch/.asdf/installs/ruby/3.2.0/lib/ruby/gems/3.2.0/gems/mailcatcher-0.8.2/lib/mail_catcher.rb:233:in `rescue_port'
17:11:39 mail.1            | 	from /home/fletch/.asdf/installs/ruby/3.2.0/lib/ruby/gems/3.2.0/gems/mailcatcher-0.8.2/lib/mail_catcher.rb:189:in `block in run!'
17:11:39 mail.1            | 	from /home/fletch/.asdf/installs/ruby/3.2.0/lib/ruby/gems/3.2.0/gems/eventmachine-1.0.9.1/lib/eventmachine.rb:193:in `run_machine'
17:11:39 mail.1            | 	from /home/fletch/.asdf/installs/ruby/3.2.0/lib/ruby/gems/3.2.0/gems/eventmachine-1.0.9.1/lib/eventmachine.rb:193:in `run'
17:11:39 mail.1            | 	from /home/fletch/.asdf/installs/ruby/3.2.0/lib/ruby/gems/3.2.0/gems/mailcatcher-0.8.2/lib/mail_catcher.rb:180:in `run!'
17:11:39 mail.1            | 	from /home/fletch/.asdf/installs/ruby/3.2.0/lib/ruby/gems/3.2.0/gems/mailcatcher-0.8.2/bin/mailcatcher:6:in `<top (required)>'
17:11:39 mail.1            | 	from /home/fletch/.asdf/installs/ruby/3.2.0/bin/mailcatcher:25:in `load'
17:11:39 mail.1            | 	from /home/fletch/.asdf/installs/ruby/3.2.0/bin/mailcatcher:25:in `<main>'
17:11:39 mail.1            | 	from /home/fletch/.asdf/installs/ruby/3.2.0/bin/ruby_executable_hooks:22:in `eval'
17:11:39 mail.1            | 	from /home/fletch/.asdf/installs/ruby/3.2.0/bin/ruby_executable_hooks:22:in `<main>'

Version 1.5.x no longer works on Ruby 3.2:

```
/home/fletch/.asdf/installs/ruby/3.2.0/lib/ruby/gems/3.2.0/gems/thin-1.5.1/lib/thin/server.rb:104:in `block in initialize': uninitialized constant Thin::Server::Fixnum (NameError)
17:11:39 mail.1            | 
17:11:39 mail.1            |         when Fixnum, /^\d+$/ then port    = arg.to_i
17:11:39 mail.1            |              ^^^^^^
17:11:39 mail.1            | 	from /home/fletch/.asdf/installs/ruby/3.2.0/lib/ruby/gems/3.2.0/gems/thin-1.5.1/lib/thin/server.rb:102:in `each'
17:11:39 mail.1            | 	from /home/fletch/.asdf/installs/ruby/3.2.0/lib/ruby/gems/3.2.0/gems/thin-1.5.1/lib/thin/server.rb:102:in `initialize'
17:11:39 mail.1            | 	from /home/fletch/.asdf/installs/ruby/3.2.0/lib/ruby/gems/3.2.0/gems/thin-1.5.1/lib/thin/server.rb:145:in `new'
17:11:39 mail.1            | 	from /home/fletch/.asdf/installs/ruby/3.2.0/lib/ruby/gems/3.2.0/gems/thin-1.5.1/lib/thin/server.rb:145:in `start'
17:11:39 mail.1            | 	from /home/fletch/.asdf/installs/ruby/3.2.0/lib/ruby/gems/3.2.0/gems/mailcatcher-0.8.2/lib/mail_catcher.rb:190:in `block (2 levels) in run!'
17:11:39 mail.1            | 	from /home/fletch/.asdf/installs/ruby/3.2.0/lib/ruby/gems/3.2.0/gems/mailcatcher-0.8.2/lib/mail_catcher.rb:233:in `rescue_port'
17:11:39 mail.1            | 	from /home/fletch/.asdf/installs/ruby/3.2.0/lib/ruby/gems/3.2.0/gems/mailcatcher-0.8.2/lib/mail_catcher.rb:189:in `block in run!'
17:11:39 mail.1            | 	from /home/fletch/.asdf/installs/ruby/3.2.0/lib/ruby/gems/3.2.0/gems/eventmachine-1.0.9.1/lib/eventmachine.rb:193:in `run_machine'
17:11:39 mail.1            | 	from /home/fletch/.asdf/installs/ruby/3.2.0/lib/ruby/gems/3.2.0/gems/eventmachine-1.0.9.1/lib/eventmachine.rb:193:in `run'
17:11:39 mail.1            | 	from /home/fletch/.asdf/installs/ruby/3.2.0/lib/ruby/gems/3.2.0/gems/mailcatcher-0.8.2/lib/mail_catcher.rb:180:in `run!'
17:11:39 mail.1            | 	from /home/fletch/.asdf/installs/ruby/3.2.0/lib/ruby/gems/3.2.0/gems/mailcatcher-0.8.2/bin/mailcatcher:6:in `<top (required)>'
17:11:39 mail.1            | 	from /home/fletch/.asdf/installs/ruby/3.2.0/bin/mailcatcher:25:in `load'
17:11:39 mail.1            | 	from /home/fletch/.asdf/installs/ruby/3.2.0/bin/mailcatcher:25:in `<main>'
17:11:39 mail.1            | 	from /home/fletch/.asdf/installs/ruby/3.2.0/bin/ruby_executable_hooks:22:in `eval'
17:11:39 mail.1            | 	from /home/fletch/.asdf/installs/ruby/3.2.0/bin/ruby_executable_hooks:22:in `<main>'
```
Comment thread mailcatcher.gemspec
s.add_dependency "sinatra", "~> 1.2"
s.add_dependency "sqlite3", "~> 1.3"
s.add_dependency "thin", "~> 1.5.0"
s.add_dependency "thin", "~> 1.8"

@tagliala tagliala Jan 23, 2023

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would just relax the dependency on the minor version number to preserve legacy installations (in case someone can't update thin but wants to update mailcatcher)

Suggested change
s.add_dependency "thin", "~> 1.8"
s.add_dependency "thin", "~> 1.5"

It also important to mention that this has been done on purpose in 4d7429c, so probably 1.6.0 should be excluded and newer thin releases should be tested

@sj26

sj26 commented Jan 25, 2023

Copy link
Copy Markdown
Owner

Please see #496 (comment)

Has anybody tried the beta?

@dirkdk

dirkdk commented Jan 25, 2023

Copy link
Copy Markdown

Please see #496 (comment)

Has anybody tried the beta?

yes i tried, via gem install --pre mailcatcher. It still has a requirement on thin-1.5.1, which still causes problems with ruby 3.2 (see OP error)

@sj26

sj26 commented Jan 25, 2023

Copy link
Copy Markdown
Owner

Yeah the new version doesn't update thin, but it updates the dependency that was blocking the update of thin. The websocket implementation has been swapped out. I need to make sure that receiving mail, realtime updates, and shutdown are all functioning correctly. Then I can release 0.9.0 more widely. If it doesn't receive issues, then I'll do a 0.10.0 with thin bumped.

@overture8

Copy link
Copy Markdown

Tried gem install --pre mailcatcher and still seeing the issue in Ruby 3.2.

@sj26

sj26 commented Jan 29, 2023

Copy link
Copy Markdown
Owner

@overture8 did you try the mailcatcher preview on ruby < 3.2?

@sj26

sj26 commented Jan 29, 2023

Copy link
Copy Markdown
Owner

I have pushed another pre-release, v0.9.0.beta2, which relaxes the thin requirement and should support ruby 3.2. Please try it:

gem install mailcatcher --pre

@sj26
sj26 merged commit 69e4f87 into sj26:main Jan 29, 2023
@overture8

Copy link
Copy Markdown

I have pushed another pre-release, v0.9.0.beta2, which relaxes the thin requirement and should support ruby 3.2. Please try it:

gem install mailcatcher --pre

Perfect - it seems to be working for me after updating to 0.9.0.beta2 👌

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.

5 participants