support reverse on packages using cgo
The reverse feature relied on `GoFiles` from `go list`, but that list may not be enough to typecheck a package: typecheck error: $WORK/main.go:3:15: undeclared name: longMain `go help list` shows: GoFiles []string // .go source files (excluding CgoFiles, TestGoFiles, XTestGoFiles) CgoFiles []string // .go source files that import "C" CompiledGoFiles []string // .go files presented to compiler (when using -compiled) In other words, to mimic the same list of Go files fed to the compiler, we want CompiledGoFiles. Note that, since the cgo files show up as generated files, we currently do not support reversing their filenames. That is left as a TODO for now. Updates #555.pull/585/head
parent
fc91758b49
commit
e8e06f6ad6
Loading…
Reference in New Issue