Skip to content
This repository has been archived by the owner on Nov 7, 2022. It is now read-only.

README instructions appear incorrect #445

Closed
DazWilkin opened this issue Feb 28, 2019 · 8 comments
Closed

README instructions appear incorrect #445

DazWilkin opened this issue Feb 28, 2019 · 8 comments
Assignees
Milestone

Comments

@DazWilkin
Copy link

..and for those unfamiliar with Go Modules, it's not obvious how to proceed.

https://github.com/census-instrumentation/opencensus-service#opencensus-agent

For me:

go version
go version go1.12rc1 linux/amd64

The instruction:

GO111MODULE=on go get github.com/census-instrumentation/opencensus-service/cmd/ocagent

Results in no sources being pulled (as expected), pkg containing the module imports (OK) and bin/ocagent being generated.

There are no Makefiles so, while I don't need to make agent, I'm unable to make docker-agent.

I tried dropping the GO111MODULE=on, navigated to the sources but, if I then make agent, I get errors:

go: error loading module requirements
Makefile:55: recipe for target 'agent' failed
make: *** [agent] Error 1

I will git clone the repo and try that!

@songy23
Copy link
Contributor

songy23 commented Feb 28, 2019

Hi @DazWilkin, please note (https://github.com/census-instrumentation/opencensus-service#usage):

The minimum Go version required for this project is Go 1.11.4.

This project doesn't work with Go 1.11.2 or lower versions and it's a known issue because of breaking changes in go.sum between Go 1.11.2- and Go 1.11.3+. We're sorry about that but I believe this is a problem with Golang.

@pjanotti
Copy link

GO111MODULE=on go get github.com/census-instrumentation/opencensus-service/cmd/ocagent

Yes, that is wrong. I think the intention was about go run but then you need to clone repo or go get before that.

There are no Makefiles

There is a Makefile on the root of the repo, it should be there after proper repo clone.

Thanks for reporting! Fixing it...

@DazWilkin
Copy link
Author

DazWilkin commented Feb 28, 2019

I'm using 1.12 rc1.

I wonder whether it's because I have ${GOPATH}?

Will unset that and try again

@DazWilkin
Copy link
Author

@pjanotti Thanks! There are no Makefiles resulting from the GO111MODULE.... command. I know there are Makefiles in the repo but they're not pulled and thus not available to me after the command.

@DazWilkin
Copy link
Author

DazWilkin commented Feb 28, 2019

Neither unsetting ${GOPATH} nor git clone directly into ${GOPATH}/src/github.com/census-instrumentation work.

I'm able to proceed as I have the binary and can build the Docker image but... for the next victim :-)

Assume the Collector is borked too.

@pjanotti
Copy link

@DazWilkin run go get -d github.com/census-instrumentation/opencensus-service to clone the repo, there will be warning message about no go files on the root but after that the repo is cloned.

@pjanotti
Copy link

pjanotti commented Feb 28, 2019

Clarifying GO111MODULE=on go run ... should work, however, GO111MODULE=on go get ... doesn't. Assuming that people that want to run from sources also want the repo I am adding the step to clone the repo before that (although in principle one can run without cloning the repo).

@flands flands added this to the 0.1.4 milestone Feb 28, 2019
@flands
Copy link
Contributor

flands commented Feb 28, 2019

FWIW you can grab latest release from release tab (i.e. no need to build from source).

pjanotti pushed a commit that referenced this issue Mar 1, 2019
* `go run` for ocagent from sources and clone repo blurb

Fix #445

* Small fixes

* PR Comments
@flands flands assigned flands and unassigned pjanotti Mar 13, 2019
fivesheep pushed a commit to fivesheep/opencensus-service that referenced this issue Jun 12, 2019
…mentation#446)

* `go run` for ocagent from sources and clone repo blurb

Fix census-instrumentation#445

* Small fixes

* PR Comments
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants