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

Cannot install a package at a certain tag #80

Open
grimm26 opened this issue Jul 9, 2020 · 9 comments
Open

Cannot install a package at a certain tag #80

grimm26 opened this issue Jul 9, 2020 · 9 comments
Labels
Waiting on Contributor Awaiting on the person who raised this to update

Comments

@grimm26
Copy link

grimm26 commented Jul 9, 2020

πŸ‘» Brief Description

when I specify a package @ a tag, it complains " go: cannot use path@version syntax in GOPATH mode"

πŸ₯ž Cookbook version

v3.0.1

πŸ‘©β€πŸ³ Chef-Infra Version

13.10.0

🎩 Platform details

ubuntu 18.04

Steps To Reproduce

Steps to reproduce the behavior:

  1. put something like 'github.com/etsy/hound/cmds/...@v3.0.0' into node.default['golang']['packages']
  2. run the cookbook.

πŸš“ Expected behavior

get, build, install the binary

βž• Additional context

Add any other context about the problem here. e.g. related issues or existing pull requests.

@ramereth
Copy link
Contributor

ramereth commented Jul 9, 2020

@jeffbyrnes is working on a cleanup with the resource these attributes use in #78. Can you see if this problem still exists using that branch?

@grimm26
Copy link
Author

grimm26 commented Jul 10, 2020

@ramereth Since there is no setting of GO111MODULE to 'on' I would tend to doubt it. I'll give it a shot when I have a moment.

@jeffbyrnes
Copy link
Contributor

@grimm26 we can certainly work out a way to include that. I have plans to refactor the cookbook further, and provide for Go modules (since they are how the Go community appears to have decided to move forward).

I’d certainly welcome a PR, too!

@MarkGibbons
Copy link
Member

MarkGibbons commented Jul 19, 2020

@grimm26 What problem are you trying to solve? Could you add some detail about what result you expect from
something like export GO111MODULE=on go get gitHub.com/vendor/package@v1.2.3? I get really weird results from trying to install a package at a specific tag that way. Do you have a set of commands that would do what you expect?

Thanks,
Mark

@grimm26
Copy link
Author

grimm26 commented Jul 20, 2020

@MarkGibbons The problem I am trying to solve is installing github.com/itpp-labs/hound/cmds/...@v3.0.0' go package. I created a fork of this cookbook and added an additional option to the package custom resource that adds GO111MODULE set to on to the environment for the go get bash command. That makes it work.


09:10:49 ❯ go version
go version go1.14.5 darwin/amd64

09:12:16 ❯ go get 'github.com/itpp-labs/hound/cmds/...@v3.0.0'
go: cannot use path@version syntax in GOPATH mode

09:12:24 ❯ GO111MODULE=on go get 'github.com/itpp-labs/hound/cmds/...@v3.0.0'
go: downloading github.com/itpp-labs/hound v3.0.0+incompatible
go: found github.com/itpp-labs/hound/cmds/... in github.com/itpp-labs/hound v3.0.0+incompatible

@MarkGibbons
Copy link
Member

Thanks.

So in that case it looks like you expect to see the source code loaded in go/pkg/mod/github.com/itpp-labs/hound@v3.0.0+incompatible. Seems doable. Making the resource idempotent is a bit of an issue.

Have you considered submitting your code as a PR?

@grimm26
Copy link
Author

grimm26 commented Jul 20, 2020

I can submit a PR, but the work I have done in my fork refactored your custom resource, too.

@jeffbyrnes
Copy link
Contributor

We can get Mark’s work in #82 merged in, then build on that, and release both as v4.1.0 (since it should be non-breaking, with the attributes preserved).

@ramereth
Copy link
Contributor

ramereth commented Oct 3, 2020

@grimm26 now that #82 has been merged, do you think you could make a PR that fixes this issue?

@ramereth ramereth added the Waiting on Contributor Awaiting on the person who raised this to update label Oct 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Waiting on Contributor Awaiting on the person who raised this to update
Projects
None yet
Development

No branches or pull requests

4 participants