-
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
Upgrade the Go version to v1.18, and x/tools to v0.1.11. Support generics better. #325
base: master
Are you sure you want to change the base?
Conversation
Address the differences related to the new SSA format. Remove errors/warnings on generics types, and add unit tests.
Address the differences related to the new SSA format. Remove errors/warnings on generics types, and add unit tests.
Address the differences related to the new SSA format. Remove errors/warnings on generics types, and add unit tests.
Have no idea why the linter "addlicense" fails since it succeeds locally. |
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 think we should signal to the user somewhere that generic support is not enabled. That could be in the README inclusive-or as a message when these skip blocks are hit. But it seems like a gap in coverage that a user might be expecting otherwise.
go.mod
Outdated
sigs.k8s.io/yaml v1.2.0 | ||
) | ||
|
||
// TODO: clean up indirect imports. |
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.
Is this actionable? I thought // indirect
imports were the result of a direct import not building with a go.mod
that details explicit dependencies, so the consumer has to choose explicit versions. But other than removing our direct dependencies, I don't think we get to clean up the indirect ones, do we?
I think having them grouped separately is cleaned up enough.
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.
These indirect imports are actually produced automatically by go mod tidy
, and I don't have a better way to handle them now.
Agreed. However warning each generics usage will be too much, and it is better to specify it somewhere else, e.g. in a README file. |
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'm sorry to have let this get so stale.
I saw Tim's #327 and have started a thread there, but to summarize: it would be nice to fold this and that PR into each other. I can go either way on either requiring 1.18+ vs Tim's init()
approach to set the expectation between interface{}
vs any
, but like this PR's addition of tests (which I suppose require 1.18).
Looks like most of this landed via #327. Are there still generics-support gaps? |
Address the differences related to the new SSA format.
Remove errors/warnings on generics types, and add unit tests.
Fixes #323