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

affected/package: Go1.19 go fmt breaks package's code generation #54349

Closed
zzjin opened this issue Aug 9, 2022 · 1 comment
Closed

affected/package: Go1.19 go fmt breaks package's code generation #54349

zzjin opened this issue Aug 9, 2022 · 1 comment

Comments

@zzjin
Copy link

zzjin commented Aug 9, 2022

What version of Go are you using (go version)?

$ go version go1.19 linux/amd64

Does this issue reproduce with the latest release?

Upgrade to go 1.19 causes this issue.

What operating system and processor architecture are you using (go env)?

I think this affect all support plaforms.

What did you do?

I have one repo inited by kubebuilder, witch is using code generation, all works fine, but upgrade to go1.19 the //+ will be formatted to // + then code generation breaks.

What did you expect to see?

Nothing to change as code file already go fmted.

What did you see instead?

@@ -15,8 +15,8 @@ limitations under the License.
 */
 
 // Package v1 contains API Schema definitions for the app v1 API group
-//+kubebuilder:object:generate=true
-//+groupName=test.com
+// +kubebuilder:object:generate=true
+// +groupName=test.com
-//nolint
+// nolint
 package v1
 
 import (
@zzjin zzjin changed the title affected/package: Go1.19 go fmt breaks packege's code generation affected/package: Go1.19 go fmt breaks package's code generation Aug 9, 2022
@seankhliao
Copy link
Member

This is working as intended, see #37974 (comment) for relevant discussions.

kubebuilder should use the more standard format for its directives.

@seankhliao seankhliao closed this as not planned Won't fix, can't repro, duplicate, stale Aug 9, 2022
@golang golang locked and limited conversation to collaborators Aug 9, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants