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

uuid breaking changes again #1842

Closed
rootpd opened this issue Aug 13, 2018 · 4 comments
Closed

uuid breaking changes again #1842

rootpd opened this issue Aug 13, 2018 · 4 comments

Comments

@rootpd
Copy link

rootpd commented Aug 13, 2018

Hi there.

Back in #1490 there was a fix/change in a way how UUID is generated, due to the change in the satori.uuid library.

The fix was done by wrapping the original uuid.NewV4() into uuid.Must(uuid.NewV4()). I'm trying to build goagen, but I'm getting this error now:

➜  pythia_segments git:(master) ✗ make gen
set -e
cd "vendor/github.com/goadesign/goa/goagen" && go build
# gitlab.com/remp/pythia/cmd/pythia_segments/vendor/github.com/goadesign/goa/design
../design/random.go:64:18: not enough arguments in call to uuid.Must
	have (uuid.UUID)
	want (uuid.UUID, error)

When I revert the change done in the #1491, the build goes through fine. What confuses me is that nothing changed in the library since the fix, so I'm confused whether I'm not overlooking something.

Are you able to build goagen with updated github.com/satori/go.uuid?

@raphael
Copy link
Member

raphael commented Aug 13, 2018

The problem is that Go / the vendoring tool picks up an older version of the uuid package because the author hasn't tagged a new version since the breaking change done in master. You need to force your vendoring tool to use the master branch (e.g. with an override with dep)

@rootpd
Copy link
Author

rootpd commented Aug 14, 2018

Wonderful, thank you! I knew I was missing something :).

@rootpd rootpd closed this as completed Aug 14, 2018
@sachnk
Copy link

sachnk commented Oct 28, 2018

I ran into this problem today. It seems like satori/go.uuid might be deprecated and is instead been ported to https://github.com/gofrs/uuid.

Should goa migrate to the gofrs/uuid implementation as well so that people using vendoring tools, like dep, get a "it just works" experience out-of-the-box? Right now, I'm still trying to figure out how to make dep work properly given this issue...

@sachnk
Copy link

sachnk commented Oct 28, 2018

For those struggling to make dep work, adding the following to your Gopkg.toml worked for me:

# force use of master branch of satori/go.uuid
[[override]]
  name = "github.com/satori/go.uuid"
  branch = "master"

Hopefully can get rid of this soon though!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants