[go-nuts] packages.Load() for packages with genrule to generate code

2023-07-16 Thread 'Sarita Singh' via golang-nuts
I am getting errors in packages.Load() when passes a packgae whose BUILD.bazel file has genrule to autogenerate code in some other location. The genrule is like: genrule( name = "copy_files", srcs = [ "@someplace//:files", ], outs = [ "x.json", "y.json",

[go-nuts] Loading packages which import "C"

2023-07-16 Thread 'Sarita Singh' via golang-nuts
I am trying to build static call graph of go project using cha package. However when there is a go file which imports "C", the packages.Load(cfg, args...) function returns error as it is not able to load such packages. The config struct is: cfg := &packages.Config{ Mode: packages.LoadSynta