In this case I'm also running into
https://github.com/openshift/origin/issues/17588 but perhaps it's all
related.

[origin] $ git describe
v3.9.0-alpha.0-11-ga5c80373e4
[origin] $ go version
go version go1.8.5 linux/amd64
[origin] $ echo $GOPATH
/home/lmeyer/go
[origin] $ time /home/lmeyer/go/bin/guru -scope
github.com/openshift/origin/cmd/oc whicherrs /home/lmeyer/go/src/
github.com/openshift/origin/pkg/oc/admin/diagnostics/diagnostics.go:#7624

/home/lmeyer/go/src/
github.com/openshift/origin/vendor/github.com/mtrmac/gpgme/data.go:4:11:
fatal error: gpgme.h: No such file or directory
 // #include <gpgme.h>
           ^~~~~~~~~
compilation terminated.
cgo failed: [go tool cgo -objdir
/tmp/github.com_openshift_origin_vendor_github.com_mtrmac_gpgme_C519117980
-- -D_FILE_OFFSET_BITS=64 -I
/tmp/github.com_openshift_origin_vendor_github.com_mtrmac_gpgme_C519117980
data.go gpgme.go]: exit status 1
/home/lmeyer/go/src/
github.com/openshift/origin/vendor/github.com/containers/image/signature/mechanism_gpgme.go:16:16:
Context not declared by package gpgme
/home/lmeyer/go/src/
github.com/openshift/origin/vendor/github.com/containers/image/signature/mechanism_gpgme.go:66:44:
Context not declared by package gpgme
/home/lmeyer/go/src/
github.com/openshift/origin/vendor/github.com/containers/image/signature/mechanism_gpgme.go:97:20:
NewDataBytes not declared by package gpgme
/home/lmeyer/go/src/
github.com/openshift/origin/vendor/github.com/containers/image/signature/mechanism_gpgme.go:101:14:
invalid operation: m.ctx (variable of type *invalid type) has no field or
method Import
/home/lmeyer/go/src/
github.com/openshift/origin/vendor/github.com/containers/image/signature/mechanism_gpgme.go:106:20:
cannot range over res.Imports (invalid operand)
/home/lmeyer/go/src/
github.com/openshift/origin/vendor/github.com/containers/image/signature/mechanism_gpgme.go:122:14:
invalid operation: m.ctx (variable of type *invalid type) has no field or
method GetKey
/home/lmeyer/go/src/
github.com/openshift/origin/vendor/github.com/containers/image/signature/mechanism_gpgme.go:126:20:
NewDataBytes not declared by package gpgme
/home/lmeyer/go/src/
github.com/openshift/origin/vendor/github.com/containers/image/signature/mechanism_gpgme.go:131:18:
NewDataWriter not declared by package gpgme
/home/lmeyer/go/src/
github.com/openshift/origin/vendor/github.com/containers/image/signature/mechanism_gpgme.go:135:11:
invalid operation: m.ctx (variable of type *invalid type) has no field or
method Sign
/home/lmeyer/go/src/
github.com/openshift/origin/vendor/github.com/containers/image/signature/mechanism_gpgme.go:135:25:
Key not declared by package gpgme
/home/lmeyer/go/src/
github.com/openshift/origin/vendor/github.com/containers/image/signature/mechanism_gpgme.go:135:61:
SigModeNormal not declared by package gpgme
/home/lmeyer/go/src/
github.com/openshift/origin/vendor/github.com/containers/image/signature/mechanism_gpgme.go:144:21:
NewDataWriter not declared by package gpgme
/home/lmeyer/go/src/
github.com/openshift/origin/vendor/github.com/containers/image/signature/mechanism_gpgme.go:148:34:
NewDataBytes not declared by package gpgme
/home/lmeyer/go/src/
github.com/openshift/origin/vendor/github.com/containers/image/signature/mechanism_gpgme.go:152:18:
invalid operation: m.ctx (variable of type *invalid type) has no field or
method Verify
/home/lmeyer/go/src/
github.com/openshift/origin/vendor/github.com/containers/image/signature/mechanism_gpgme.go:161:42:
ValidityNever not declared by package gpgme
/home/lmeyer/go/src/
github.com/openshift/origin/vendor/github.com/containers/image/signature/mechanism_gpgme.go:67:14:
New not declared by package gpgme
/home/lmeyer/go/src/
github.com/openshift/origin/vendor/github.com/containers/image/signature/mechanism_gpgme.go:71:27:
ProtocolOpenPGP not declared by package gpgme
/home/lmeyer/go/src/
github.com/openshift/origin/vendor/github.com/containers/image/signature/mechanism_gpgme.go:75:28:
ProtocolOpenPGP not declared by package gpgme
guru: couldn't load packages due to errors:
github.com/openshift/origin/vendor/github.com/containers/image/signature,
github.com/openshift/origin/vendor/github.com/mtrmac/gpgme

real 0m10.041s
user 1m0.303s
sys 0m7.648s



On Tue, Dec 5, 2017 at 9:36 AM, Dan Mace <dm...@redhat.com> wrote:

>
>
> On Tue, Dec 5, 2017 at 9:31 AM, Luke Meyer <lme...@redhat.com> wrote:
>
>> I must be doing something wrong. Whenever go guru is fired off against
>> the origin codebase (for example, with godef or callstack or whicherrs) it
>> takes several seconds (or more) to do anything, sucking up GB of RAM and
>> all CPUs. I imagine it must be compiling the world, which is rather large.
>> Perhaps I am using the wrong scope. For instance, when working with oc, I
>> set scope to github.com/openshift/origin/cmd/oc. Should it be something
>> else? The guru docs are not as clear as they could be on exactly what
>> impact this has.
>>
>> How do you configure your development environment to do code analysis
>> efficiently against origin? The defaults don't seem to work too well, so if
>> there are any tips, it would be nice to have them in our dev readme(s).
>>
>
>
> ​Can you post a specific command/arguments to reproduce your problem?
> Scope can have a pretty big impact depending on the command.
>
_______________________________________________
dev mailing list
dev@lists.openshift.redhat.com
http://lists.openshift.redhat.com/openshiftmm/listinfo/dev

Reply via email to