x/tools: TestCgoNoSyntax doesn't seem to be passing -compiled when NeedTypes is set #52435
Labels
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Tools
This label describes issues relating to any tools in the x/tools repository.
Milestone
Context: https://go-review.googlesource.com/c/tools/+/393017/comments/b58b52f4_30beeb0f
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
The text was updated successfully, but these errors were encountered: