C: no such file or directory
Closed this issue · 6 comments
xlab commented
$ unconvert -v github.com/vulkan-go/vulkan
2017/07/07 16:17:49 open /Users/xlab/Documents/dev/go/src/github.com/vulkan-go/vulkan/C: no such file or directory
go version go1.9beta2 darwin/amd64
dmitshur commented
Does anything change if you do go install -v github.com/vulkan-go/vulkan
, and then unconvert -v github.com/vulkan-go/vulkan
?
xlab commented
@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
cznic commented
It looks like some loader mistakenly attempts to import "C"
.
xlab commented
mdempsky commented
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.
mdempsky commented
Looks like this is working now to me: unconvert -v github.com/vulkan-go/vulkan
prints a bunch of unnecessary conversions.