Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gollvm: go tool: no such tool "cover" #41480

Open
advancedwebdeveloper opened this issue Sep 18, 2020 · 11 comments
Open

gollvm: go tool: no such tool "cover" #41480

advancedwebdeveloper opened this issue Sep 18, 2020 · 11 comments
Labels
NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone

Comments

@advancedwebdeveloper
Copy link

Hello again.
I am experience problems similar to cmd/cover: Not registered as a tool .

What version of Go are you using (go version)?

$ go version

go version go1.15rc2 gollvm LLVM 12.0.0git linux/amd64

Does this issue reproduce with the latest release?

Maybe.

What operating system and processor architecture are you using (go env)?

go env GO111MODULE="" GOARCH="amd64" GOBIN="" GOCACHE="/home/oceanfish81/.cache/go-build" GOENV="/home/oceanfish81/.config/go/env" GOEXE="" GOFLAGS="" GOHOSTARCH="amd64" GOHOSTOS="linux" GOINSECURE="" GOMODCACHE="/home/oceanfish81/go/pkg/mod" GONOPROXY="" GONOSUMDB="" GOOS="linux" GOPATH="/home/oceanfish81/go" GOPRIVATE="" GOPROXY="https://proxy.golang.org,direct" GOROOT="/usr/local" GOSUMDB="sum.golang.org" GOTMPDIR="" GOTOOLDIR="/usr/local/tools" GCCGO="/usr/local/bin/llvm-goc" AR="ar" CC="/usr/bin/clang" CXX="/usr/bin/clang++" CGO_ENABLED="1" GOMOD="/home/oceanfish81/faas-provider/go.mod" CGO_CFLAGS="-g -O2" CGO_CPPFLAGS="" CGO_CXXFLAGS="-g -O2" CGO_FFLAGS="-g -O2" CGO_LDFLAGS="-g -O2" PKG_CONFIG="pkg-config" GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build709537862=/tmp/go-build -gno-record-gcc-switches -funwind-tables"
$ go env

What did you do?

Tried to build faasd .

$ make test

go test -cover ./... go tool: no such tool "cover"

make: *** [Makefile:6: test] Error 2

Ivan

@ianlancetaylor ianlancetaylor changed the title [gollvm] go tool: no such tool "cover" gollvm: go tool: no such tool "cover" Sep 18, 2020
@ianlancetaylor ianlancetaylor added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Sep 18, 2020
@ianlancetaylor ianlancetaylor added this to the gollvm milestone Sep 18, 2020
@ianlancetaylor
Copy link
Contributor

Historically gccgo and GoLLVM haven't bother to provide "go tool cover" because they already support -gccgoflags=-pg to get coverage reports.

@advancedwebdeveloper
Copy link
Author

Historically gccgo and GoLLVM haven't bother to provide "go tool cover" because they already support -gccgoflags=-pg to get coverage reports.

I wouldn't be so sure about that

go test -gccgoflags='-pg' ./...
github.com/openfaas/faas-provider/auth [github.com/openfaas/faas-provider/auth.test]
/usr/local/bin/llvm-goc: error: unrecognized command line option '-pg'

@ianlancetaylor
Copy link
Contributor

My apologies, I withdraw my statement about GoLLVM.

@advancedwebdeveloper
Copy link
Author

CC @thanm @cherrymui

@thanm
Copy link
Contributor

thanm commented Sep 18, 2020

As Ian mentioned, "go tool cover" is specific to the GC toolchain.

Correct, gollvm doesn't implement "-pg" at the moment. I would imagine it's doable, I think nobody has bothered to look into it yet.

@advancedwebdeveloper
Copy link
Author

As Ian mentioned, "go tool cover" is specific to the GC toolchain.

Correct, gollvm doesn't implement "-pg" at the moment. I would imagine it's doable, I think nobody has bothered to look into it yet.

@thanm , could you open a PR issue?

@thanm
Copy link
Contributor

thanm commented Sep 18, 2020

could you open a PR issue?

There are many features not supported by Gollvm; I am not sure what good it would do to create a laundry list of issues enumerating all the things that could be done but are not. Doing this simple clutters up the Go issue tracker as I see it (more productive I think to have these sorts of discussions (we should implement feature ABC instead of XYZ) on a mailing list like go-dev.

It also goes without saying that the main obstacle here is contributor bandwidth. I myself have a very limited amount of time to spend working on Gollvm-- there are many other higher-priority tasks for me at the moment. If we want to add new features, someone has to be willing to devote time to implementing them.

@ianlancetaylor
Copy link
Contributor

ianlancetaylor commented Sep 18, 2020

Anyhow we don't need to open another issue, we already have this one.

In general I agree with @thanm: we don't need a list of things to improve in GoLLVM or gccgo. We know lots of things we can do. What we need is not things to do, but people willing to work on them.

@robpike
Copy link
Contributor

robpike commented Sep 18, 2020

Although the gcc and llvm tool chains have support for coverage, the Go cover tool should be completely portable. It should be very easy to get it working for other compilers since it requires no compiler support.

@advancedwebdeveloper
Copy link
Author

@robpike , would you are interested to contribute into this?

@advancedwebdeveloper
Copy link
Author

could you open a PR issue?

There are many features not supported by Gollvm; I am not sure what good it would do to create a laundry list of issues enumerating all the things that could be done but are not. Doing this simple clutters up the Go issue tracker as I see it (more productive I think to have these sorts of discussions (we should implement feature ABC instead of XYZ) on a mailing list like go-dev.

It also goes without saying that the main obstacle here is contributor bandwidth. I myself have a very limited amount of time to spend working on Gollvm-- there are many other higher-priority tasks for me at the moment. If we want to add new features, someone has to be willing to devote time to implementing them.

@thanm , I guess we could try to share things via Gophers Slack. I might spend some time on chatting.
Mailing list sounds like a good idea - but we would still require a list of non-yet-supported features, for gollvm.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Projects
None yet
Development

No branches or pull requests

4 participants