Skip to content

Correct test input code to support older go versions#490

Merged
perrito666 merged 4 commits into
magefile:masterfrom
perrito666:horacio/fix_ci_tests
Nov 18, 2023
Merged

Correct test input code to support older go versions#490
perrito666 merged 4 commits into
magefile:masterfrom
perrito666:horacio/fix_ci_tests

Conversation

@perrito666

@perrito666 perrito666 commented Nov 18, 2023

Copy link
Copy Markdown
Contributor

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
@perrito666 perrito666 requested a review from natefinch November 18, 2023 15:56

@natefinch natefinch left a comment

Copy link
Copy Markdown
Member

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
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.

2 participants