forked from burrowers/garble
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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 burrowers#555.
- Loading branch information
Showing
3 changed files
with
63 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters