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

Correct test input code to support older go versions #490

Merged
merged 4 commits into from Nov 18, 2023

Conversation

perrito666
Copy link
Contributor

@perrito666 perrito666 commented Nov 18, 2023

Samples used for testing need to have build tags for new and old style:

//go:build tag
// +build tag

The particular problem here, seems to be that 1.16 was actually importing the package referred in the TestGoModules test (import "golang.org/x/text/unicode/norm") which, in the CI system's version lacks an old style go tag comment. Hence go complaining of a //go:build without a // +build. I made all files bi-tagged for consistency.

Samples used for testing need to have build tags for new and old style:

//go:build tag
// +build tag
Copy link
Member

@natefinch natefinch left a comment

Choose a reason for hiding this comment

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

Thank you! Nothing should be imported outside the stdlib anyway. I don't want this tool to require outside imports when you build it.

@perrito666 perrito666 merged commit 2385abb into magefile:master Nov 18, 2023
17 checks passed
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.

None yet

2 participants