-
Notifications
You must be signed in to change notification settings - Fork 18k
x/tools/go/packages: cgo error in one package causes entire Load to fail #31462
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
Comments
After discussion with @dominikh on IRC, we've worked out the source of the bug: cgo preprocessing always happens, and the tool doesn't expect there to be build output/failures unless the function This bug will therefore only trigger if Relevant code: EDIT: Easy workaround for now it set |
Adds some hacks to work around go list bugs causing golang/go#31462 and golang/go#32755. In addition, appends error messages generated in this manner to stdout instead of discarding stdout entirely, and ensures that this does not cause a conflicting package error by adding an internal field to packageJson.
Change https://golang.org/cl/185077 mentions this issue: |
Adds some hacks to work around go list bugs causing golang/go#31462 and golang/go#32755. In addition, appends error messages generated in this manner to stdout instead of discarding stdout entirely, and ensures that this does not cause a conflicting package error by adding an internal field to packageJson.
Adds some hacks to work around go list bugs causing golang/go#31462 and golang/go#32755. In addition, appends error messages generated in this manner to stdout instead of discarding stdout entirely, and ensures that this does not cause a conflicting package error by adding an internal field to packageJson.
Adds some hacks to work around go list bugs causing golang/go#31462 and golang/go#32755. In addition, appends error messages generated in this manner to stdout instead of discarding stdout entirely, and ensures that this does not cause a conflicting package error by adding an internal field to packageJson.
Adds some hacks to work around go list bugs causing golang/go#31462 and golang/go#32755. In addition, appends error messages generated in this manner to stdout instead of discarding stdout entirely, and ensures that this does not cause a conflicting package error by adding an internal field to packageJson.
Adds some hacks to work around go list bugs causing golang/go#31462 and golang/go#32755. In addition, appends error messages generated in this manner to stdout instead of discarding stdout entirely, and ensures that this does not cause a conflicting package error by adding an internal field to packageJson.
Adds some hacks to work around go list bugs causing golang/go#31462 and golang/go#32755. In addition, appends error messages generated in this manner to stdout instead of discarding stdout entirely, and ensures that this does not cause a conflicting package error by adding an internal field to packageJson.
This is fixed by golang.org/cl/192330. |
This is fixed by golang.org/cl/192330 |
What version of Go are you using (
go version
)?Trying to load multiple packages with packages.Load fails if any of the packages have cgo errors:
I expected packages.Load to return no error, to get two packages for sandbox/foo and sandbox/bar, and sandbox/bar to have a non-empty Errors.
/cc @ianthehat @matloob
The text was updated successfully, but these errors were encountered: