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

Add missing sql.Scanner/driver.Value interfaces to uuid.UUID #610

Merged
merged 12 commits into from
Jul 29, 2016

Conversation

aslakknutsen
Copy link
Contributor

Copy implementation from satori/go.uuid/uuid.UUID

fixes #609

A bit crude fix, but works.. Better suggestion?

@raphael
Copy link
Member

raphael commented Jul 12, 2016

Thank you! I think we need to revisit how we approach the problem. Including all that code doesn't feel very satisfactory :). The basic problem @skritchz is trying to fix is to remove the use of uuid.UUID when the client code is written in gopherJS because the package uses constructs that don't work there. On the server side we should be able to just use the uuid package. So my recommendation would be to change the code generators to use the satori package directly on the server side.

@aslakknutsen
Copy link
Contributor Author

Yea, the Goa uuid.UUID was introduced to remove the usage of the satori package.

Any tips on how to use the satori package and still make goperJS happy?

@raphael
Copy link
Member

raphael commented Jul 12, 2016

What I'm suggesting above is to use the satori package server side (app package) and only use the goa uuid package client side. GopherJS is only interested in client side and the postgress stuff is only relevant to server side. So the change would be to update the genapp generator to import the satori package instead of the goa UUID package. This should make what you need work and shouldn't affect GopherJS.

aslakknutsen added a commit to aslakknutsen/goa that referenced this pull request Jul 13, 2016
@@ -269,7 +269,7 @@ func (g *Generator) generateClientResources(pkgDir, clientPkg string, funcs temp
codegen.SimpleImport("io"),
codegen.SimpleImport("net/http"),
codegen.SimpleImport("time"),
codegen.NewImport("uuid", "github.com/goadesign/goa/uuid"),
codegen.NewImport("uuid", "github.com/satori/go.uuid"),

This comment was marked as off-topic.

aslakknutsen added a commit to aslakknutsen/goa that referenced this pull request Jul 15, 2016
@aslakknutsen
Copy link
Contributor Author

Reverted change of using satori/go.uuid in Client code.

aslakknutsen added a commit to aslakknutsen/gorma that referenced this pull request Jul 15, 2016
aslakknutsen added a commit to aslakknutsen/goa that referenced this pull request Jul 19, 2016
aslakknutsen added a commit to aslakknutsen/goa that referenced this pull request Jul 20, 2016
@aslakknutsen aslakknutsen force-pushed the uuid branch 2 times, most recently from 17be595 to b78f3e9 Compare July 21, 2016 20:48
var t interface{}
err := json.Unmarshal([]byte(val), t)
if err != nil {
panic(err)

This comment was marked as off-topic.

This comment was marked as off-topic.

This comment was marked as off-topic.

@raphael
Copy link
Member

raphael commented Jul 29, 2016

Awesome PR, thank you!

@raphael raphael merged commit 753f0ea into goadesign:master Jul 29, 2016
@aslakknutsen
Copy link
Contributor Author

You're welcome! :)

@aslakknutsen aslakknutsen deleted the uuid branch August 1, 2016 07:18
aslakknutsen added a commit to aslakknutsen/gorma that referenced this pull request Aug 8, 2016
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

Successfully merging this pull request may close these issues.

Goa uuid.UUID fail combined with Gorma, missing sql.Scanner and driver.Value interface
2 participants