-
Notifications
You must be signed in to change notification settings - Fork 502
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
all: add Go 1.14, deprecate Go 1.12 #2325
Conversation
popd | ||
) | ||
|
||
printf "Running staticcheck...\n" | ||
|
||
ls -d */ \ | ||
| egrep -v '^vendor|^docs' \ | ||
| xargs -I {} staticcheck -tests=false -checks="all,-ST1003,-SA1019,-ST1005,-ST1000,-ST1016" ./{}... | ||
| xargs -I {} staticcheck -tests=false -checks="all,-ST1003,-SA1019,-ST1005,-ST1000,-ST1016,-S1039,-ST1021,-ST1020,-ST1019,-SA4022" ./{}... |
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.
Upgrading staticcheck is required because the version of go/tools that staticcheck depends on had a bug fixed that is required for analyzing code with Go 1.14. These checks I'm adding here were added between the version of staticcheck we had and the one we're upgrading to. We have a ton of failures for most of them. It would be great to circle back and fix them, but it's out-of-scope for this PR.
To see what each of the checks mean, take a look at https://staticcheck.io/docs/checks.
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.
The latest golang:1.14 package hasn't been picked up by CircleCI yet. It'll probably be picked up over night or tomorrow and once that happens I'll rerun the build. |
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.
This is exciting! Thanks for picking up the new Go version so quickly!
@@ -1,4 +1,4 @@ | |||
FROM golang:1.12-stretch | |||
FROM golang:1.14-stretch |
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.
Did we miss 1.13 before somehow?
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.
Yup. There were a few places we were still chugging 1.12. I can't see any particular reason for that. If anyone knows otherwise I'm all ears.
assert.EqualError(t, err, "invalid URL or request: parse https:// there is something wrong here.com/stellar.toml: invalid character \" \" in host name") | ||
|
||
urlErr, ok := errors.Cause(err).(*url.Error) | ||
if !ok { | ||
t.Fatalf("err expected to be a url.Error but was %#v", err) | ||
} | ||
assert.Equal(t, "parse", urlErr.Op) | ||
assert.Equal(t, "https:// there is something wrong here.com/stellar.toml", urlErr.URL) | ||
assert.EqualError(t, urlErr.Err, `invalid character " " in host name`) |
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.
FYI @accordeiro I had to rewrite this spec you added recently to make it pass for both Go 1.13 and 1.14 because it turns out in 1.14 they changed the textual/string representation of URL parsing errors to place quotes ("
) around the invalid URL. For more details see:
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.
Sounds great, thanks for addressing this! :)
### What Update all CHANGELOG.md's mentioning that Go 1.12 support has been dropped. ### Why I dropped Go 1.12 support in #2325 but I overlooked adding a note to the changelogs.
### What Use Go 1.14 for building in docker images. ### Why We recently switched to building with Go 1.13 and 1.14 in #2325 and we should use the latest version for our builds.
PR Checklist
PR Structure
otherwise).
services/friendbot
, orall
ordoc
if the changes are broad or impact manypackages.
Thoroughness
.md
files, etc... affected by this change). Take a look in the
docs
folder for a given service,like this one.
Release planning
needed with deprecations, added features, breaking changes, and DB schema changes.
semver, or if it's mainly a patch change. The PR is targeted at the next
release branch if it's not a patch change.
What
Add Go 1.14, deprecate Go 1.12.
Why
Go 1.14 was released yesterday. We support the last two versions of Go. With the release of 1.14, 1.12 becomes an unsupported version of Go and the Go team will no longer ship security patches to it.
For more information about the 1.14 release see:
https://groups.google.com/d/msg/golang-announce/AYd4cXYG8qk/FPTwU0jPCQAJ
https://golang.org/doc/go1.14
To find out more about the Go release cycle, see:
https://github.com/golang/go/wiki/Go-Release-Cycle
Known limitations
N/A