Created by: linzhp
Issues and solutions:
#1714 (closed): the cgo_deps
parameter of a go_library
rule was not copied to the go_test
rules targeting at the go_library
rule. So when the go_test
rules were built, the cgo_library
rules needed by the go_library
were not built.
Solution: Copy cgo_deps
from go_library
to go_test
#1791 (closed): When Buck was calling cgo to generate the import file, it sets the package name to be the full package name with paths. As a result, the package
statement in the resulting Go file has the full package name with /
and .
in it, causing syntax error when the Go file is compiled.
Solution: Only use the last part of the package name in the cgo-generated go source