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

goimports should be installed as a dependency #813

Open
mergenci opened this issue Aug 4, 2023 · 1 comment
Open

goimports should be installed as a dependency #813

mergenci opened this issue Aug 4, 2023 · 1 comment
Labels
bug Something isn't working is:triaged Indicates that an issue has been reviewed.

Comments

@mergenci
Copy link
Collaborator

mergenci commented Aug 4, 2023

What happened?

I've cloned the repo. make succeeded. Then running make reviewable failed with the following error:

[Redacted for brevity]
16:39:16 [ .. ] verify go modules dependencies have expected content
all modules verified
16:39:17 [ OK ] go modules dependencies verified
16:39:18 [ .. ] go generate linux_arm64
panic: cannot run goimports for apis folder: bash: line 1: goimports: command not found
: exit status 127

goroutine 1 [running]:
github.com/upbound/upjet/pkg/pipeline.Run(0x14002bc7d40, {0x14000137540, 0x32})
	/Users/mergenci/go/pkg/mod/github.com/upbound/upjet@v0.9.0-rc.0.0.20230727122232-e4ffeb8a7525/pkg/pipeline/run.go:156 +0xdec
main.main()
	/Users/mergenci/Documents/upbound/dev/provider-aws/cmd/generator/main.go:48 +0x678
exit status 2
apis/generate.go:30: running "go": exit status 1
generate: open /Users/mergenci/Documents/upbound/dev/provider-aws/apis/accessanalyzer/v1beta1/zz_generated.deepcopy.go: no such file or directory
16:39:27 [FAIL]
make[2]: *** [go.generate] Error 1
make[1]: *** [generate] Error 2
make: *** [reviewable] Error 2

I discovered that I didn't have goimports executable on my system. I installed it with go install golang.org/x/tools/cmd/goimports@latest, as instructed in its documentation. make reviewable then succeeded building linux_arm64:

[Redacted for brevity]
16:49:43 [ OK ] go modules dependencies verified
16:49:44 [ .. ] go generate linux_arm64

Generated 899 resources!
16:50:07 [ OK ] go generate linux_arm64
16:50:07 [ .. ] go mod tidy
[Redacted for brevity]

Rest of the build didn't complete, but that's another issue.

How can we reproduce it?

Hopefully, by cloning the repo from fresh and runnning make, and then make reviewable.

What environment did it happen in?

@mergenci mergenci added bug Something isn't working needs:triage labels Aug 4, 2023
@turkenf turkenf added is:triaged Indicates that an issue has been reviewed. and removed needs:triage labels Aug 28, 2023
Copy link

github-actions bot commented Apr 2, 2024

This provider repo does not have enough maintainers to address every issue. Since there has been no activity in the last 90 days it is now marked as stale. It will be closed in 14 days if no further activity occurs. Leaving a comment starting with /fresh will mark this issue as not stale.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working is:triaged Indicates that an issue has been reviewed.
Projects
None yet
Development

No branches or pull requests

3 participants