gobuffalo / genny

A framework for writing modular generators
MIT License
65 stars 14 forks source link

When installing pop, installation fails on nonexistent genny function #34

Closed tomislavmitic2012 closed 4 years ago

tomislavmitic2012 commented 4 years ago

When running go get -v github.com/gobuffalo/pop/... v4.7.2+incompatible the installation fails on the following lines

# github.com/gobuffalo/gogen/gomods
/go/src/github.com/gobuffalo/gogen/gomods/init.go:61:24: undefined: genny.GoBin
/go/src/github.com/gobuffalo/gogen/gomods/tidy.go:17:24: undefined: genny.GoBin

looking at the above lines of code gomods/init.go (https://github.com/gobuffalo/gogen/blob/v0.1.0/gomods/init.go#L61) and tidy.go (https://github.com/gobuffalo/gogen/blob/v0.1.0/gomods/tidy.go#L17) the are both calling genny.GoBin which is a non existent function.

Is there workaround or fix for this issue. This is causing problems with getting local environments and dev environments up and running for my organization

Kind regards Tom Mitic

markbates commented 4 years ago

If you enable Go modules you can specify the version of genny that works for you.

We don’t support using GOPATH any more.

tomislavmitic2012 commented 4 years ago

@markbates which version of genny contains the method GoBin, you resolution to this issue is quite glib and obtuse.

markbates commented 4 years ago

https://github.com/gobuffalo/genny/issues/36#issuecomment-568756440

chronick commented 4 years ago

@tomislavmitic2012 ran into the same issue - running the following worked for me in a fresh docker container:

GO111MODULE=on go get github.com/gobuffalo/pop/soda
GO111MODULE=on go build -o /bin/soda github.com/gobuffalo/pop/soda

The trick is to remember to turn on go modules beforehand with the GO111MODULE=on flag. Sounds like this will be the default eventually.

tomislavmitic2012 commented 4 years ago

@chronick we decided to fork gobuffalo/pop so as in the future we are not hostage by breaking changes in the main repo