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

fix test build breakage with go1.11 #712

Merged
merged 1 commit into from
Jun 29, 2018
Merged

fix test build breakage with go1.11 #712

merged 1 commit into from
Jun 29, 2018

Conversation

hyangah
Copy link
Contributor

@hyangah hyangah commented Jun 28, 2018

As discussed in golang/go#26109, vet typecheck is enabled
in go1.11 and the command_test.go can't be compiled any
more with go1.11 due to the unread variables in the
command_test.go.

Instead of removing the unused variables, this CL reads the
variables and compares the values against the current
behavior so when the related issue is fixed, this test can
be updated accordingly.

As discussed in golang/go#26109, vet typecheck is enabled
in go1.11 and the command_test.go can't be compiled any
more with go1.11 due to the unread variables in the
command_test.go.

Instead of removing the unused variables, this CL reads the
variables and compares the values against the current
behavior so when the related issue is fixed, this test can
be updated accordingly.
@CLAassistant
Copy link

CLAassistant commented Jun 28, 2018

CLA assistant check
All committers have signed the CLA.

@eparis
Copy link
Collaborator

eparis commented Jun 29, 2018

How does that cause a 1.11 breakage?

@hyangah
Copy link
Contributor Author

hyangah commented Jun 29, 2018

the variables were not read, which gc considers 'unused' vars.
From go1.11, that is a typecheck error and the test will not build.
More precisely speaking, the title is cobra test breaks when compiled with go1.11.

@eparis
Copy link
Collaborator

eparis commented Jun 29, 2018

got it. thx!

@eparis eparis merged commit a114f31 into spf13:master Jun 29, 2018
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.

3 participants