-
Notifications
You must be signed in to change notification settings - Fork 17
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
Golang 1.17 upgrade #15
Changes from 3 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,3 +9,4 @@ msgp/cover.out | |
*~ | ||
*.coverprofile | ||
.idea/ | ||
cover.out |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,13 @@ | ||
module github.com/algorand/msgp | ||
|
||
go 1.16 | ||
go 1.17 | ||
|
||
require ( | ||
github.com/ttacon/chalk v0.0.0-20160626202418-22c06c80ed31 | ||
golang.org/x/tools v0.0.0-20200423205358-59e73619c742 | ||
) | ||
|
||
require ( | ||
golang.org/x/mod v0.2.0 // indirect | ||
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 // indirect | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why is this in a separate require block? did go mod tidy create it this way? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, it was from running tidy. I left it that way since I liked the fact that direct deps were being separated from indirect. Not aware of whether this is a convention or something we don't do in other repos. |
||
) |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package printer | ||
|
||
import ( | ||
"bytes" | ||
"testing" | ||
) | ||
|
||
func TestWriteBuildHeader(t *testing.T) { | ||
testBuf := bytes.NewBuffer(make([]byte, 0, 4096)) | ||
buildHeaders := []string{"foobar"} | ||
expectedBuf := bytes.NewBuffer(make([]byte, 0, 4096)) | ||
expectedBuf.WriteString("//go:build foobar\n\n") | ||
|
||
writeBuildHeader(testBuf, buildHeaders) | ||
|
||
if testBuf.String() != expectedBuf.String() { | ||
t.Errorf("testBuf:\n%s not equal to expectedBuf:\n%s", testBuf, expectedBuf) | ||
} | ||
} |
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.
What was the failure that made it so this needed to be removed?
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.
I assume there will be a lot of them. The code these tests use was ripped out. For example, https://github.com/algorand/msgp/blob/master/_generated/convert_test.go#L13
uses https://github.com/tinylib/msgp/blob/43b487371e0cdd1a3fe1be9a7802d8bce917a1af/msgp/write.go#L118 from the original repository which was removed from our fork in this commit 546fb5f