kuberay icon indicating copy to clipboard operation
kuberay copied to clipboard

[Bug] goimports reports issues on generate file

Open Jeffwan opened this issue 3 years ago • 1 comments

Search before asking

  • [X] I searched the issues and found no similar issues.

KubeRay Component

ci

What happened + What you expected to happen

image

Link: https://github.com/ray-project/kuberay/runs/5211421675?check_suite_focus=true

I can not reproduce this on my personal laptop even with same goimports version. Looks like it reports import issue in file ray-operator/api/raycluster/v1alpha1/zz_generated.deepcopy.go? This is definitely unexpected..

/cc @wilsonwang371

Reproduction script

$(go env GOPATH)/bin/goimports -l apiserver/ ray-operator/ cli/ | tee goimports.out
cat goimports.out

or

goimports -w . 

Anything else

No response

Are you willing to submit a PR?

  • [ ] Yes I am willing to submit a PR!

Jeffwan avatar Feb 16 '22 05:02 Jeffwan

I check the PR and below line was removed due to newer go version. From the above screenshot, we can see this is the only line changed.. However, goimports reports the error on this line.

//go:build !ignore_autogenerated

I manually revert this change (no effect) as a workaround but really like to know who goimports reports error on the change.

Jeffwan avatar Feb 16 '22 10:02 Jeffwan

@Jeffwan is this still valid? shall we close this?

wilsonwang371 avatar Dec 14 '22 05:12 wilsonwang371