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

Tolerate "errornous" packages in go list #204

Closed
siretart opened this issue Mar 21, 2024 · 0 comments · Fixed by #205
Closed

Tolerate "errornous" packages in go list #204

siretart opened this issue Mar 21, 2024 · 0 comments · Fixed by #205
Milestone

Comments

@siretart
Copy link

When trying to package https://github.com/crc-org/crc, i ended up with this error:

2024/03/21 10:32:29 WARNING: In findMains: ["go" "list" "-f" "{{.ImportPath}} {{.Name}}" "github.com/crc-org/crc/..."]: exit status 1

When executing that command manually, I noticed these errors:

$ go list -f "{{.ImportPath}} {{.Name}}" "github.com/crc-org/crc/..."
package github.com/crc-org/crc/v2/cmd/crc-embedder
	imports github.com/crc-org/crc/v2/cmd/crc-embedder/cmd
	imports github.com/crc-org/crc/v2/pkg/crc/machine/vfkit: build constraints exclude all Go files in /home/siretart/packages/crc/pkg/crc/machine/vfkit
github.com/crc-org/crc/v2/cmd/crc main
github.com/crc-org/crc/v2/cmd/crc-embedder main

It seems to me that the tool could work better if it passed the argument -e to go list. In that case, the error is surpressed and the list is produced successfully.

Relevant part in the code:

cmd := exec.Command("go", "list", "-f", "{{.ImportPath}} {{.Name}}", repo+"/...")

siretart pushed a commit to siretart/dh-make-golang that referenced this issue Mar 21, 2024
@anthonyfok anthonyfok added this to the v0.7.0 milestone Mar 22, 2024
anthonyfok pushed a commit that referenced this issue Mar 22, 2024
anthonyfok pushed a commit that referenced this issue Mar 22, 2024
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 a pull request may close this issue.

2 participants