x/tools/cmd/gomvpkg: incorrect handling of cgo packages #24532
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
What version of Go are you using (
go version
)?go version devel +438a757d73 Wed Feb 21 18:10:00 2018 +0000 linux/amd64
Does this issue reproduce with the latest release?
Yes, on the latest version of
gomvpkg
(rev golang/tools@77106db).What operating system and processor architecture are you using (
go env
)?What did you do?
Tried to move a package containing cgo code. In this example, we try to move package
a
tob
.Source code of package
a
. Files:a.go
Output source code of package
b
. Files:a.go:
C:
What did you expect to see?
I expected to see the package moved from
$GOPATH/src/a
to$GOPATH/src/b
, without affecting cgo code. That is the output should beb/b.go
:What did you see instead?
A mysterious
C
file and a rewrite of the code using cgo.Note, the output (i.e. package
b
) does not compile, while the input did.The text was updated successfully, but these errors were encountered: