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

Net::SMTPError types interface changed in a patch release 0.2.2 #48

Closed
jrafanie opened this issue Dec 5, 2022 · 2 comments
Closed

Net::SMTPError types interface changed in a patch release 0.2.2 #48

jrafanie opened this issue Dec 5, 2022 · 2 comments

Comments

@jrafanie
Copy link

jrafanie commented Dec 5, 2022

Hello!

I wanted to share that pull request #26 changed the interface of all Net::SMTPError error types in a patch release. I'm unsure if this was intentional or not.

The interface changed from:

  • accepting an optional message argument like nearly all ruby exceptions

To:

  • requiring a response object and an optional message kwarg

This makes it impossible to raise Net::SMTPError or to mock it in tests without adding a response or fake response object. A ruby developer would likely not expect this interface change.

This released in 0.2.2 and is not listed as an incompatibility in the news:
https://github.com/ruby/net-smtp/blob/master/NEWS.md#version-022-2021-10-09

I can open a PR to add an incompatibility line but wanted to make you aware of this as it doesn't follow semantic versioning.

I see another issue ran into this:
rails/rails#44105

We noticed this in our tests when the mail gem was upgraded to 2.8.0 and began requiring the standalone net-smtp gem:
ManageIQ/manageiq#22268

@hsbt
Copy link
Member

hsbt commented Dec 6, 2022

Basically, We didn't follow semver policy.

@hsbt
Copy link
Member

hsbt commented Jan 9, 2024

@jrafanie Unfortunately, there is no action for this. I'll close this.

@hsbt hsbt closed this as not planned Won't fix, can't repro, duplicate, stale Jan 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants