Closed xlab closed 5 years ago
Does anything change if you do go install -v github.com/vulkan-go/vulkan
, and then unconvert -v github.com/vulkan-go/vulkan
?
@shurcooL I tried, it doesn't help.
$ go install -v github.com/vulkan-go/vulkan
github.com/vulkan-go/vulkan
$ unconvert -v github.com/vulkan-go/vulkan
2017/07/07 18:07:56 open /Users/xlab/Documents/dev/go/src/github.com/vulkan-go/vulkan/C: no such file or directory
It looks like some loader mistakenly attempts to import "C"
.
@cznic @shurcooL I actually tried to create a minimal reproducible example, but it works fine in handmade cases..
Minimal repro case:
package p
// unsigned int myfunc();
import "C"
func f() interface{} {
return C.myfunc
}
The "C" file is actually the _cgo_gotypes.go file generated by cgo. The "C" name is synthesized by go/loader.
Looks like this is working now to me: unconvert -v github.com/vulkan-go/vulkan
prints a bunch of unnecessary conversions.