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

bump golang.org/x/tools to v0.6.0 #264

Closed
wants to merge 2 commits into from

Conversation

jackofallops
Copy link

supersedes #259
fixes #255

Removed tests XR007.TestAnalyzerFixes and XR008.TestAnalyzerFixes which only previously passed due to a continue on err bug in golang.org/x/tools when formatting the amended source:

image

image

https://github.com/bflad/tfproviderlint/blob/main/vendor/golang.org/x/tools/go/analysis/analysistest/analysistest.go#L221

Copy link

@manicminer manicminer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@bflad
Copy link
Owner

bflad commented Mar 2, 2023

Hey @jackofallops 👋 Thank you for submitting this. Rather than removing the tests, can you please fix the source code for those tests? We should be validating that the suggested fixes still work.

@bflad
Copy link
Owner

bflad commented Mar 2, 2023

Actually, never mind. I'm not sure there is a decent way to make that pass -- generally removing the Go associated with "avoid" selectors would generate Go syntax errors. Will merge if the tests pass.

@bflad
Copy link
Owner

bflad commented Mar 2, 2023

There may be other code changes required:

Error: /home/runner/work/tfproviderlint/tfproviderlint/passes/AT001/testdata/src/a/vendor/golang.org/x/sys/unix/syscall.go:83:23: Slice not declared by package unsafe
Error: /home/runner/work/tfproviderlint/tfproviderlint/passes/AT001/testdata/src/a/vendor/golang.org/x/sys/unix/syscall_linux.go:[22](https://github.com/bflad/tfproviderlint/actions/runs/4312062115/jobs/7533007795#step:4:23)71:16: Slice not declared by package unsafe
Error: /home/runner/work/tfproviderlint/tfproviderlint/passes/AT001/testdata/src/a/vendor/golang.org/x/sys/unix/syscall_unix.go:118:14: Slice not declared by package unsafe
Error: /home/runner/work/tfproviderlint/tfproviderlint/passes/AT001/testdata/src/a/vendor/golang.org/x/sys/unix/sysvshm_unix.go:33:14: Slice not declared by package unsafe

@jackofallops
Copy link
Author

There may be other code changes required:

Error: /home/runner/work/tfproviderlint/tfproviderlint/passes/AT001/testdata/src/a/vendor/golang.org/x/sys/unix/syscall.go:83:23: Slice not declared by package unsafe
Error: /home/runner/work/tfproviderlint/tfproviderlint/passes/AT001/testdata/src/a/vendor/golang.org/x/sys/unix/syscall_linux.go:[22](https://github.com/bflad/tfproviderlint/actions/runs/4312062115/jobs/7533007795#step:4:23)71:16: Slice not declared by package unsafe
Error: /home/runner/work/tfproviderlint/tfproviderlint/passes/AT001/testdata/src/a/vendor/golang.org/x/sys/unix/syscall_unix.go:118:14: Slice not declared by package unsafe
Error: /home/runner/work/tfproviderlint/tfproviderlint/passes/AT001/testdata/src/a/vendor/golang.org/x/sys/unix/sysvshm_unix.go:33:14: Slice not declared by package unsafe

I'll take another look asap - thanks @bflad

@jackofallops
Copy link
Author

I ran go test ./... on 1.16 and I don't see the failures?

ok  	github.com/bflad/tfproviderlint/passes	1.018s
ok  	github.com/bflad/tfproviderlint/passes/AT001	21.156s
ok  	github.com/bflad/tfproviderlint/passes/AT002	3.624s
ok  	github.com/bflad/tfproviderlint/passes/AT003	4.593s
ok  	github.com/bflad/tfproviderlint/passes/AT004	8.088s
ok  	github.com/bflad/tfproviderlint/passes/AT005	8.539s
ok  	github.com/bflad/tfproviderlint/passes/AT006	7.366s
ok  	github.com/bflad/tfproviderlint/passes/AT007	8.268s
ok  	github.com/bflad/tfproviderlint/passes/AT008	2.489s
ok  	github.com/bflad/tfproviderlint/passes/AT009	5.298s
ok  	github.com/bflad/tfproviderlint/passes/AT010	7.406s
ok  	github.com/bflad/tfproviderlint/passes/AT011	7.518s
ok  	github.com/bflad/tfproviderlint/passes/AT012	4.918s

Will take another look tomorrow....

@bflad
Copy link
Owner

bflad commented Apr 13, 2023

After some rigamarole with needing to upgrade Go (#269) and then x/tools (#270), this should be resolved in the upcoming v0.29.0 release 🔜 . Thanks for submitting this and sorry for the delayed resolution.

@bflad bflad closed this Apr 13, 2023
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

Successfully merging this pull request may close these issues.

internal error: package "context" without types was imported
3 participants