Closed vfaronov closed 3 years ago
Hi,
In your last command, the argument github.com/vfaronov/gunison
looks misleading to me, as it could be either a relative directory name or a module name. Gobco always interprets it as a directory name, so it may help to just cd /home/vasiliy/tmp/gunison/gopath/src/
before running Gobco. Please try this and tell me whether it worked.
I know that gobco does not support modules. This is just because I never needed support for modules myself. Could you perhaps have a look how to implement them, your advantage is that you have a good test case at hand, which I don't.
I don't expect it to be any difficult. Have a look at the method gobco.rel
in main.go
, which generates the error you got. The idea of the methods gobco.rel
and gobco.prepareTmp
is to copy all code that will be instrumented into a temporary directory. If everything goes well, this is the only code you need to touch.
Roland
I got it to work by setting up an actual GOPATH with GO111MODULE=off
and all my dependencies (via go get -t github.com/vfaronov/gunison
). Now gobco works if I run it inside gunison
or give it the path to that directory.
Could you perhaps have a look how to implement them
Not at the moment, sorry.
Thank you for help and for developing this tool.
Trying to run gobco 0.9.4 on a module I’m developing (outside of $GOPATH), I get:
If I set up a $GOPATH specially for gobco, it still doesn’t work: