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

*: remove old-style build directives #111156

Closed
wants to merge 1 commit into from

Conversation

RaduBerinde
Copy link
Member

The newer go:build directives have been supported since go 1.17, and the old ones have been deprecated in go 1.18. This commit removes all old-style directives.

Epic: none
Release note: None

@RaduBerinde RaduBerinde requested a review from a team September 22, 2023 23:46
@RaduBerinde RaduBerinde requested a review from a team as a code owner September 22, 2023 23:46
@RaduBerinde RaduBerinde requested a review from a team September 22, 2023 23:46
@RaduBerinde RaduBerinde requested review from a team as code owners September 22, 2023 23:46
@RaduBerinde RaduBerinde requested a review from a team September 22, 2023 23:46
@RaduBerinde RaduBerinde requested review from a team as code owners September 22, 2023 23:46
@RaduBerinde RaduBerinde requested review from srosenberg, smg260, dhartunian, michae2 and bananabrick and removed request for a team September 22, 2023 23:46
@cockroach-teamcity
Copy link
Member

This change is Reviewable

@@ -12,12 +12,14 @@ go_library(
"nulls.go",
"testutils.go",
"vec.go",
"vec_tmpl.go",
Copy link
Member Author

Choose a reason for hiding this comment

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

@yuzefovich any idea why this file wasn't her and/or why dev gen bazel suddenly decided to add it now?

Copy link
Member Author

Choose a reason for hiding this comment

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

I reverted the changes to the coldata/colexec stuff for now.

"//conditions:default": [],
}),
"@org_golang_x_sys//unix",
],
Copy link
Member Author

Choose a reason for hiding this comment

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

@rickystewart any idea why gazelle made this change?

Copy link
Member Author

Choose a reason for hiding this comment

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

Ah, it feels like the old-style tag was preventing it from understanding that we don't build that file on all these platforms.

Copy link
Member Author

Choose a reason for hiding this comment

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

Ah, or it's the other way, it used to be able to exclude the dependency depending on the tag :/

Copy link
Member Author

Choose a reason for hiding this comment

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

I'm guessing our gazelle version predates this change bazelbuild/bazel-gazelle#1243

The newer `go:build` directives have been supported since go 1.17, and
the old ones have been deprecated in go 1.18. This commit removes all
old-style directives.

Epic: none
Release note: None
@RaduBerinde
Copy link
Member Author

I tried to update Gazelle, and (after working through a couple of issues) got stuck at this error:

ERROR: /Users/radu/go/src/github.com/cockroachdb/cockroach/pkg/roachpb/BUILD.bazel:107:14: no such package 'google/api': BUILD file not found in any of the following directories. Add a BUILD file to a directory to mark it as a package.

Will close this PR for now and reopen when gazelle supports the go:build variant.

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