Cannot build cgo_library with "/" or "." in the package name
Created by: linzhp
When a cgo_library resides in a package with "/" or "." in its name, e.g., github.com/shirou/gopsutil/cpu
, Buck will crash. An example package can be found here.
buck test cpuUsage/cgo_lib:all_tests
2018-03-03 06:56:24,178 [WARNING][buck_tool.py:402] Not using buckd because watchman isn't installed.
/root/go/src/buck_go_examples/buck-out/gen/cpuUsage/cgo_lib/cgo_lib#cgo-gen-import/gen/_cgo_import.go:1:17: syntax error: unexpected /, expecting ;
Build failed: Command failed with exit code 2.
stderr:
When running <go compile>.
When building rule //cpuUsage/cgo_lib:all_tests#linux_amd64,test-library.
Parsing buck files: finished in 1.4 sec (100%)
Creating action graph: finished in 0.7 sec (100%)
Building: finished in 3.9 sec (100%) 21/24 jobs, 11 updated, 45.8% cache miss
Total time: 6.2 sec
cc @monty-uber @vit