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

x/tools: TestCgoNoSyntax doesn't seem to be passing -compiled when NeedTypes is set #52435

matloob opened this issue Apr 19, 2022 · 0 comments
NeedsInvestigation Tools


Copy link

@matloob matloob commented Apr 19, 2022


Getting types for cgo requires CompiledGoFiles because we need to run cgo preprocessing on the Go files before running the typechecker on them. We don't request compiled files by default when doing typechecking because for non-cgo files we can check types without .go files, but TestCgoNoSyntax relies on CompiledGoFiles being present on the output of the go command to properly check types.

It seems like either the test should need to explicitly request compiled files, or specify that it uses cgo (there's currently a non-exported bit for this), or maybe there should be some way for go/packages to upgrade to requesting compiled go files in certain circumstances where cgo is present?

cc: @bcmills

@gopherbot gopherbot added the Tools label Apr 19, 2022
@gopherbot gopherbot added this to the Unreleased milestone Apr 19, 2022
@thanm thanm added the NeedsInvestigation label Apr 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
NeedsInvestigation Tools
None yet

No branches or pull requests

3 participants