x/tools/go/packages: could not import C (no metadata for C) #36441
Labels
FrozenDueToAge
NeedsFix
The path to resolution is known, but the work has not been done.
Tools
This label describes issues relating to any tools in the x/tools repository.
Milestone
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
I tried to load a cgo package with
golang.org/x/tools/go/packages.Load
using the modeNeedName | NeedTypes | NeedImports | NeedDeps
. See the testscript below.What did you expect to see?
(no errors reported)
What did you see instead?
This works when I add
packages.NeedSyntax
to the mode. For the tool I'm writing, I just need the types of exported definitions. I don't need to access the AST.cc @matloob
The text was updated successfully, but these errors were encountered: