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

Define a new compile func for go 1.16 #614

Merged
merged 1 commit into from
Apr 27, 2021

Conversation

gravis
Copy link
Contributor

@gravis gravis commented Mar 9, 2021

go test -i is deprecated in go 1.16, and it makes the output parsing
fail, leading to to no coverage reported.

closes #613

`go test -i` is deprecated in go 1.16, and it makes the output parsing
fail, leading to to no coverage reported.

closes smartystreets#613
@riannucci riannucci merged commit c7f53ec into smartystreets:master Apr 27, 2021
@riannucci
Copy link
Collaborator

Thanks :)

@paupin2
Copy link

paupin2 commented Apr 27, 2021

This apparently works, but it breaks older repos, that use different go versions.
An ideal solution would be to add/remove the flag depending on each repository's go version (from go.mod).

@gravis
Copy link
Contributor Author

gravis commented Apr 27, 2021

@paupin2 Good catch. @riannucci should we revert this change, and take another angle for this? Happy to contribute to another solution.

@paupin2
Copy link

paupin2 commented Apr 27, 2021

TBH I'm not sure if that many people work with multiple repositories with different go versions simultaneously. This might be a good compromise/first iteration solution.

@riannucci
Copy link
Collaborator

So another thought I have; I think that this flag became deprecated around Go 1.10 when build caches were introduced... Should we just not use '-i' at all, on the assumption that folks are using Go >1.10?

@gravis gravis deleted the fix_go_116 branch April 28, 2021 12:28
@gravis
Copy link
Contributor Author

gravis commented Apr 28, 2021

Sounds like a good idea, but I think we need to understand what @paupin2 meant by

it breaks older repos, that use different go versions.

Are you referring to repos using go <= 1.10?

@paupin2
Copy link

paupin2 commented Apr 28, 2021

Yes, I was @gravis. But I realized that doesn't make sense, the only thing that matters is the version of the go binary that's used to run tests, and that doesn't vary between repositories. So either conditional compilation (as it is now) or just assuming go > 1.10 should be perfectly fine.
Sorry for the noise…

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.

Coverage doesn't work with go 1.16
3 participants