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

Setup of gin with Google App Engine #65

Closed
al3xandru opened this issue Jul 12, 2014 · 7 comments
Closed

Setup of gin with Google App Engine #65

al3xandru opened this issue Jul 12, 2014 · 7 comments

Comments

@al3xandru
Copy link

I don't seem to be able to setup gin with GAE. I understand that the trunk is Go1.3, but checking out the app_engine branch and running go install results in an error too:

go install
deprecated.go:4:2: cannot find package "github.com/gin-gonic/gin/binding" in any of:
    /usr/local/Cellar/go/1.2.2/libexec/src/pkg/github.com/gin-gonic/gin/binding (from $GOROOT)
    /Users/apopescu/Dropbox/workspace/golang/sportscal/src/github.com/gin-gonic/gin/binding (from $GOPATH)
    /Users/apopescu/.golang/src/github.com/gin-gonic/gin/binding
go env
GOARCH="amd64"
GOBIN=""
GOCHAR="6"
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/apopescu/Dropbox/workspace/golang/sportscal:/Users/apopescu/.golang"
GORACE=""
GOROOT="/usr/local/Cellar/go/1.2.2/libexec"
GOTOOLDIR="/usr/local/Cellar/go/1.2.2/libexec/pkg/tool/darwin_amd64"
TERM="dumb"
CC="clang"
GOGCCFLAGS="-g -O2 -fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fno-common"
CXX="clang++"
CGO_ENABLED="1"
@manucorporat
Copy link
Contributor

sounds like "github.com/gin-gonic/gin/binding" doesn't exist in your local repo?
I just tried to compile the app_engine branch and it works for me.

Can you do this:

go get -u github.com/gin-gonic/gin/binding

and then: inside the repo:

git checkout app_engine

@al3xandru
Copy link
Author

That seemed to work, but now I see another 4 errors:

2014/07/13 01:31:57 go-app-builder: Failed parsing input (4 errors)
2014/07/13 01:31:57 /Users/apopescu/Dropbox/workspace/golang/sportscal/src/github.com/gin-gonic/gin/gin.go:93:15: composite struct literal encoding/xml.Name with unkeyed fields
2014/07/13 01:31:57 /Users/apopescu/Dropbox/workspace/golang/sportscal/src/github.com/gin-gonic/gin/gin.go:98:11: composite struct literal encoding/xml.StartElement with unkeyed fields
2014/07/13 01:31:57 /Users/apopescu/Dropbox/workspace/golang/sportscal/src/github.com/gin-gonic/gin/gin.go:99:4: composite struct literal encoding/xml.Name with unkeyed fields
2014/07/13 01:31:57 /Users/apopescu/Dropbox/workspace/golang/sportscal/src/github.com/gin-gonic/gin/gin.go:106:26: composite struct literal encoding/xml.EndElement with unkeyed fields

@manucorporat
Copy link
Contributor

http://grokbase.com/t/gg/golang-nuts/143ysnmgaz/go-nuts-unkeyed-fields

It's not new. App Engine has been rejecting app code using unkeyed
composite struct literals since early 2012. The issue is that App
Engine wants to accept correct Go code at time T, but then still be
able to recompile it at time T+n, even if the language or standard
libraries have evolved in a backward-compatible way between those two
points in time. For that reason, it is in general strongly recommended
to use keyed composite struct literals in Go code that references
types in other packages, and we enforce that recommendation on App
Engine.

Sounds like the app-engine compiler is different?

@manucorporat
Copy link
Contributor

Ok! sorry. try now,I think I fixed it:
d33dc38

@al3xandru
Copy link
Author

Fixed. Thanks.

@manucorporat
Copy link
Contributor

ok, I am still testing it and other big changes, like the new flexible render.
I will merge it in master very soon!

@al3xandru
Copy link
Author

Master is 1.3 and I'll have to wait for GAE to support it before being able to give it a try.

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

2 participants