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

Fix example server #34

Closed
tegk opened this issue Apr 2, 2019 · 7 comments
Closed

Fix example server #34

tegk opened this issue Apr 2, 2019 · 7 comments

Comments

@tegk
Copy link

tegk commented Apr 2, 2019

.\sm.go:17:34: undefined: smtp.ConnectionState
.\sm.go:17:84: undefined: smtp.Session
.\sm.go:25:43: undefined: smtp.ConnectionState
.\sm.go:25:66: undefined: smtp.Session
.\sm.go:38:26: undefined: from
.\sm.go:64:3: s.ReadTimeout undefined (type *smtp.Server has no field or method ReadTimeout)
.\sm.go:65:3: s.WriteTimeout undefined (type *smtp.Server has no field or method WriteTimeout)

@foxcpp
Copy link
Collaborator

foxcpp commented Apr 2, 2019

The master branch of go-smtp includes one breaking change (#31) and a new feature (#33) since the latest release. I guess you tried to run the example from the master branch on go-smtp 0.10 (or even 0.9, these ConnectionState errors are suspicious).

There is however one real compilation issue caused by a typo (addressed in #35).

@emersion, I think we should push code for next release to a separate branch in the future (like, dev branch) to prevent confusion.

@emersion
Copy link
Owner

emersion commented Apr 3, 2019

There was a small amount of time during which the README hadn't yet been updated...

I think we should push code for next release to a separate branch in the future (like, dev branch) to prevent confusion.

That's not how Go modules are supposed to work. People using Go modules will use the latest release, not the latest commit. So we should be fine pushing breaking changes to master as long as we release a new major semver next.

@foxcpp
Copy link
Collaborator

foxcpp commented Apr 3, 2019 via email

Repository owner deleted a comment from foxcpp Apr 3, 2019
@emersion
Copy link
Owner

emersion commented Apr 3, 2019

(Edited your comment to fix the quote)

Hmm. I wonder how other projects handle this? Really not a fan of having two branches.

@foxcpp
Copy link
Collaborator

foxcpp commented Apr 3, 2019

Hmm. I wonder how other projects handle this? Really not a fan of having two branches.

Well, big projects (I checked IFPS and Hugo) seem to use two branches. Smaller ones just ignore these issues.

Also, not pushing unstable code to master is better for developers who use GOPATH instead of modules. And yes, there are still valid reasons to not use them (tooling support is immature).
But this is not relevant to us anyway since we are at 0.X.

@xeoncross
Copy link

Just got bit by this. I was using GOPATH then I realized I probably needed to pull master. 🤦‍♂

@emersion
Copy link
Owner

Since 0.11 has been released, the example should work again

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

No branches or pull requests

4 participants