protolambda / gocyto

Callgraph analysis and visualization for Go
MIT License
157 stars 21 forks source link

Pointer analysis failed no main/test packages to analyze #7

Open ableocardo opened 3 years ago

ableocardo commented 3 years ago

Hello,

I can run gocyto on the latest version of the postgres-operator package but when I am trying to run gocyto on an older version of a package it throws -> panic: pointer analysis failed no main/test packages to analyze (check $GOROOT/$GOPATH)

The command, I am trying to run is :

gocyto --out output_graph_postgres35.json --query-dir /home/XXXX/go/pkg/mod/github.com/crunchydata/postgres-operator@v3.5.5-rc1+incompatible github.com/crunchydata/postgres-operator@v3.5.5-rc1+incompatible/...

NickLarsenNZ commented 2 years ago

What happens if you try from within the package?

Eg:

git clone https://github.com/crunchydata/postgres-operator /tmp/postgres-operator
pushd /tmp/postgres-operator

git checkout v3.5.5-rc1+incompatible # the ref seems to be gone, so maybe try an updated one
gocyto --out output_graph_postgres35.json github.com/crunchydata/postgres-operator/...

popd