Failing to build goanalyzer

84 views
Skip to first unread message

Siddhesh Divekar

unread,
Aug 29, 2020, 8:09:01 PM8/29/20
to golang-nuts
Hi,

Has anyone tried building goanalyzer recently?
Am I missing something very basic here.

goanalyzer/cmd/goanalyzer$ ls
annotations.go doc.go goroutines.go main.go pprof.go trace_test.go
annotations_test.go goanalyzer.iml internal mmu.go trace.go trace_unix_test.go

goanalyzer/cmd/goanalyzer$ go build
annotations.go:10:2: use of internal package github.com/robaho/goanalyzer/cmd/goanalyzer/internal/trace not allowed

--
-Siddhesh.

Robert Engels

unread,
Aug 29, 2020, 8:44:34 PM8/29/20
to Siddhesh Divekar, golang-nuts
I have not tried building it in a while. I assume some internals have changed. I’ll look into it. 
--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/CAMjfk%2Bi%3DL%3Dg8t5%3DWayYuShN0mHQ-0DRhWh6G-wEDp%3D_pbJE8jA%40mail.gmail.com.

robert engels

unread,
Aug 30, 2020, 7:58:00 PM8/30/20
to Siddhesh Divekar, golang-nuts
Tonight, I rebuilt and ran using Go 1.15 and it was fine (I cleared the entire build cache using -a). Maybe you have modules enabled?

Here is the output:

GOROOT=/usr/local/Cellar/go/1.15/libexec #gosetup
GOPATH=/Users/robertengels/go #gosetup
/usr/local/Cellar/go/1.15/libexec/bin/go build -a -o /private/var/folders/bb/dk8qf0zx6zg7kw3m6dgmj40h0000gn/T/___go_build_github_com_robaho_goanalyzer_cmd_goanalyzer_user . #gosetup
/private/var/folders/bb/dk8qf0zx6zg7kw3m6dgmj40h0000gn/T/___go_build_github_com_robaho_goanalyzer_cmd_goanalyzer_user /Users/robertengels/go/src/github.com/robaho/goanalyzer/user_task_span_1_11_good #gosetup
2020/08/30 18:54:19 Parsing trace...
2020/08/30 18:54:19 Splitting trace...
2020/08/30 18:54:19 Opening browser. Trace viewer is listening on http://127.0.0.1:57135


Siddhesh Divekar

unread,
Aug 31, 2020, 12:36:07 AM8/31/20
to robert engels, golang-nuts
That's right, I had modules enabled.
After moving the repo under go path src directory it worked fine.

echo $GOPATH
/Users/sidhesh/Development/gocode
~/Development/gocode/src/github.com/robaho/goanalyzer/cmd/goanalyzer$ go build
~/Development/gocode/src/github.com/robaho/goanalyzer/cmd/goanalyzer$
--
-Siddhesh.

Siddhesh Divekar

unread,
Aug 31, 2020, 12:36:28 AM8/31/20
to robert engels, golang-nuts
Thanks !
--
-Siddhesh.
Reply all
Reply to author
Forward
0 new messages