-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Introduced Go module support as v4, removed obsolete CloseNotifier() #1269
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
Conversation
@vishr @im-kulikov the branch is ready for review. Cheers! |
6add227
to
33f2dbe
Compare
Codecov Report
@@ Coverage Diff @@
## master #1269 +/- ##
==========================================
+ Coverage 81.63% 81.88% +0.25%
==========================================
Files 26 26
Lines 1938 1932 -6
==========================================
Hits 1582 1582
+ Misses 248 242 -6
Partials 108 108
Continue to review full report at Codecov.
|
Codecov Report
@@ Coverage Diff @@
## master #1269 +/- ##
==========================================
+ Coverage 81.63% 81.88% +0.25%
==========================================
Files 26 26
Lines 1938 1932 -6
==========================================
Hits 1582 1582
+ Misses 248 242 -6
Partials 108 108
Continue to review full report at Codecov.
|
Oh, for some weird reason, go.sum is NOT generated on my end. No clue why :-) So I could not commit that one. Technically it's only recommended to include it, but not required (it does not act as a lock file, the go.mod has all the information needed to determine the versions to be used). I'd be happy to include it if only I could figure out why is not created... :-) |
hm.. go mod tidy And I see go.sum |
557884d
to
905c63a
Compare
Thanks! |
echo.go:766 func (ln tcpKeepAliveListener) Accept() (c net.Conn, err error) {
tc, err := ln.AcceptTCP()
if err != nil {
return
}
tc.SetKeepAlive(true)
tc.SetKeepAlivePeriod(3 * time.Minute)
return tc, nil
}
can return errors, mb replace it with: func (ln tcpKeepAliveListener) Accept() (c net.Conn, err error) {
tc, err := ln.AcceptTCP()
if err != nil {
return
}
if err = tc.SetKeepAlive(true); err != nil {
return
}
if err = tc.SetKeepAlivePeriod(3 * time.Minute); err != nil {
return
}
return tc, nil
} middleware/compress.go:112 errors ignored func (w *gzipResponseWriter) Flush() {
w.Writer.(*gzip.Writer).Flush()
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Thanks @im-kulikov ! @vishr are we good? As for your comment, yes, that change looks good to me! But to keep things clean, please open a separate ticket. Also, FWIW it can be simplified a bit: func (ln tcpKeepAliveListener) Accept() (c net.Conn, err error) {
if c, err = ln.AcceptTCP(); err != nil {
return
}
if err = c.SetKeepAlive(true); err != nil {
return
}
if err = c.SetKeepAlivePeriod(3 * time.Minute); err != nil {
return
}
return
} |
@alexaandru done #1270 |
Thank you :) and sorry, looks like we both missed a critical thing... the version :) I'll update mine to 4.0.0 and force push it, and then you'll need to rebase on top of it and call it 4.0.1 |
…mechanism This reintroduces support for Go modules, as v4. CloseNotifier() is removed as it has been obsoleted, see https://golang.org/doc/go1.11#net/http It was already NOT working (not sending signals) as of 1.11 the functionality was gone, we merely deleted the functions that exposed it. If anyone still relies on it they should migrate to using `c.Request().Context().Done()` instead. Closes #1268, #1255
905c63a
to
6d9e043
Compare
@alexaandru done |
Alright then, I reviewed it one more time, you reviewed it @im-kulikov , CI is happy. I'm merging it :-) |
my PR was based on your.. I fix it - #1271 |
Odd, I know it was based off of that, but the commit did not change (well, after the 4.0.0 change, that is). The merging simply fast forwarded master on top of that commit, but the SHA didn't change. Your PR should've been unaffected. Sorry for the trouble @im-kulikov :( |
don't worry, I quickly corrected it |
Thanks! :) |
You guys rock! |
We're just having fun with our favorite web framework ;-) Cheers! |
@alexaandru On Gitter someone is having problem with v4, can you address that?
|
@vishr @alexaandru /usr/lib/go-1.10 mb problem in that? |
I'm not sure, that suffix would work with less than go1.11 |
@vishr @im-kulikov the Go requirements I took straight from Go wiki: https://github.com/golang/go/wiki/Modules#releasing-modules-v2-or-higher I really think they would be the ones to know best which Go version supports what... If they have a Go 1.10 version below 1.10.3, then yes, it will not work. If however they have at least 1.10.3, then it should work. They should either upgrade their Go OR stick to Echo v3.3.10. Removing support for Go modules should really be our last option (I hope)... Thoughts? |
I agree, the guy is using |
Can we at least get the go version that they're using? |
From the logs it seems Go |
Well, it's that tiny |
Not sure. |
It is ok until someone else complains ;) |
In all fairness, the only ones complaining are the ones that have the least reasons: the ones that do not use any dependency management at all. We did release a MAJOR version. Major versions break things. Everywhere, not just in our project. If someone does not like their project to be broken, they should use a dependency management mechanism. Or read the Release Notes... Just sayin'... |
This reintroduces support for Go modules, as v4
CloseNotifier() is removed as it has been obsoleted, see https://golang.org/doc/go1.11#net/http
It was already NOT working (not sending signals) as of 1.11, the functionality was gone already, we merely deleted the functions that exposed it. If everyone still rely on it they should migrate to using
c.Request().Context().Done()
instead.Closes #1268, #1255