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

Pop/Soda doesn't build with vgo #110

Closed
markbates opened this issue May 24, 2018 · 3 comments · Fixed by #111
Closed

Pop/Soda doesn't build with vgo #110

markbates opened this issue May 24, 2018 · 3 comments · Fixed by #111
Labels
bug Something isn't working

Comments

@markbates
Copy link
Member

$ pwd
$GOPATH/src/github.com/gobuffalo/pop/soda

$ cat go.mod
module "github.com/gobuffalo/pop/soda"

$ vgo build -v
vgo: resolving import "github.com/gobuffalo/pop"
vgo: finding github.com/gobuffalo/pop (latest)
vgo: adding github.com/gobuffalo/pop v0.0.0-20180521154020-9985012f32f5
vgo: resolving import "github.com/gobuffalo/makr"
vgo: finding github.com/gobuffalo/makr (latest)
vgo: adding github.com/gobuffalo/makr v1.1.0
vgo: resolving import "github.com/markbates/going/defaults"
vgo: finding github.com/markbates/going (latest)
vgo: adding github.com/markbates/going v0.0.0-20170113214412-0576708c56ce
vgo: resolving import "github.com/markbates/inflect"
vgo: finding github.com/markbates/inflect (latest)
vgo: adding github.com/markbates/inflect v0.0.0-20180514174915-dd7de90c06bc
vgo: resolving import "github.com/pkg/errors"
vgo: finding github.com/pkg/errors (latest)
vgo: adding github.com/pkg/errors v0.8.0
vgo: resolving import "github.com/spf13/cobra"
vgo: finding github.com/spf13/cobra (latest)
vgo: adding github.com/spf13/cobra v0.0.3
vgo: resolving import "github.com/spf13/pflag"
vgo: finding github.com/spf13/pflag (latest)
vgo: adding github.com/spf13/pflag v1.0.1
vgo: downloading github.com/cockroachdb/cockroach-go v0.0.0-20180212155653-59c0560478b7
vgo: downloading github.com/lib/pq v0.0.0-20180201184707-88edab080323
vgo: downloading github.com/fatih/color v1.6.0
vgo: downloading github.com/mattn/go-colorable v0.0.9
vgo: downloading github.com/mattn/go-isatty v0.0.3
vgo: downloading github.com/go-sql-driver/mysql v0.0.0-20161201115036-a0583e0143b1
vgo: downloading github.com/gobuffalo/envy v1.4.1
vgo: downloading github.com/mitchellh/go-homedir v0.0.0-20161203194507-b8bc1bf76747
vgo: downloading github.com/gobuffalo/makr v1.1.0
vgo: downloading github.com/gobuffalo/packr v1.10.4
vgo: downloading github.com/gobuffalo/uuid v0.0.0-20180207211247-3a9fb6c5c481
vgo: downloading github.com/mattn/anko v0.0.0-20180212145248-d5441ca3f0c7
vgo: import "github.com/gobuffalo/pop/soda" ->
	import "github.com/gobuffalo/pop/soda/cmd" ->
	import "github.com/gobuffalo/pop" ->
	import "github.com/gobuffalo/pop/fizz" ->
	import "github.com/mattn/anko/core" [/Users/markbates/Dropbox/development/gocode/src/v/github.com/mattn/anko@v0.0.0-20180212145248-d5441ca3f0c7/core]: open /Users/markbates/Dropbox/development/gocode/src/v/github.com/mattn/anko@v0.0.0-20180212145248-d5441ca3f0c7/core: no such file or directory
vgo: downloading github.com/jmoiron/sqlx v0.0.0-20180228184624-cf35089a1979
vgo: downloading github.com/gobuffalo/validate v0.0.0-20180210182920-42d8db6e06e6
vgo: downloading github.com/markbates/going v0.0.0-20170113214412-0576708c56ce
vgo: downloading golang.org/x/sync v0.0.0-20171101214715-fd80eb99c8f6
vgo: downloading golang.org/x/net v0.0.0-20180301190904-22ae77b79946
vgo: downloading gopkg.in/yaml.v2 v2.1.1
vgo: downloading github.com/spf13/cobra v0.0.3
vgo: downloading github.com/spf13/pflag v1.0.1
$ vgo get -u
vgo: resolving import "github.com/gobuffalo/pop"
vgo: finding github.com/gobuffalo/pop (latest)
vgo: adding github.com/gobuffalo/pop v0.0.0-20180521154020-9985012f32f5
vgo: resolving import "github.com/gobuffalo/makr"
vgo: finding github.com/gobuffalo/makr (latest)
vgo: adding github.com/gobuffalo/makr v1.1.0
vgo: resolving import "github.com/markbates/going/defaults"
vgo: finding github.com/markbates/going (latest)
vgo: adding github.com/markbates/going v0.0.0-20170113214412-0576708c56ce
vgo: resolving import "github.com/markbates/inflect"
vgo: finding github.com/markbates/inflect (latest)
vgo: adding github.com/markbates/inflect v0.0.0-20180514174915-dd7de90c06bc
vgo: resolving import "github.com/pkg/errors"
vgo: finding github.com/pkg/errors (latest)
vgo: adding github.com/pkg/errors v0.8.0
vgo: resolving import "github.com/spf13/cobra"
vgo: finding github.com/spf13/cobra (latest)
vgo: adding github.com/spf13/cobra v0.0.3
vgo: resolving import "github.com/spf13/pflag"
vgo: finding github.com/spf13/pflag (latest)
vgo: adding github.com/spf13/pflag v1.0.1
vgo: finding github.com/gobuffalo/pop latest
vgo: finding github.com/gobuffalo/makr latest
vgo: finding github.com/markbates/going latest
vgo: finding github.com/markbates/inflect latest
vgo: finding github.com/pkg/errors latest
vgo: finding github.com/spf13/cobra latest
vgo: finding github.com/spf13/pflag latest
vgo: finding github.com/cockroachdb/cockroach-go latest
vgo: finding github.com/davecgh/go-spew latest
vgo: finding github.com/daviddengcn/go-colortext latest
vgo: finding github.com/fatih/color latest
vgo: finding github.com/go-sql-driver/mysql latest
vgo: finding github.com/gobuffalo/envy latest
vgo: finding github.com/gobuffalo/makr latest
vgo: finding github.com/gobuffalo/packr latest
vgo: finding github.com/gobuffalo/uuid latest
vgo: finding github.com/gobuffalo/validate latest
vgo: finding github.com/inconshreveable/mousetrap latest
vgo: finding github.com/jmoiron/sqlx latest
vgo: finding github.com/joho/godotenv latest
vgo: finding github.com/lib/pq latest
vgo: finding github.com/markbates/going latest
vgo: finding github.com/markbates/grift latest
vgo: finding github.com/markbates/inflect latest
vgo: finding github.com/mattn/anko latest
vgo: finding github.com/mattn/go-colorable latest
vgo: finding github.com/mattn/go-isatty latest
vgo: finding github.com/mattn/go-sqlite3 latest
vgo: finding github.com/mitchellh/go-homedir latest
vgo: finding github.com/pkg/errors latest
vgo: finding github.com/pmezard/go-difflib latest
vgo: finding github.com/serenize/snaker latest
vgo: finding github.com/spf13/cobra latest
vgo: finding github.com/spf13/pflag latest
vgo: finding github.com/stretchr/testify latest
vgo: finding golang.org/x/net latest
vgo: finding golang.org/x/sync latest
vgo: finding golang.org/x/sys latest
vgo: finding gopkg.in/yaml.v2 latest
vgo: finding github.com/mattn/go-colorable latest
vgo: finding github.com/mattn/go-isatty latest
vgo: finding golang.org/x/sys latest
vgo: finding github.com/davecgh/go-spew latest
vgo: finding github.com/pmezard/go-difflib latest
vgo: finding github.com/stretchr/objx latest
vgo: finding gopkg.in/check.v1 latest
vgo: finding github.com/davecgh/go-spew latest
vgo: finding github.com/pmezard/go-difflib latest
vgo: finding github.com/stretchr/testify latest
vgo: downloading github.com/lib/pq v0.0.0-20180523175426-90697d60dd84
vgo: downloading github.com/fatih/color v1.7.0
vgo: downloading github.com/go-sql-driver/mysql v1.3.0
vgo: downloading github.com/gobuffalo/packr v1.11.0
vgo: downloading github.com/mattn/anko v0.0.4
vgo: downloading github.com/jmoiron/sqlx v0.0.0-20180406164412-2aeb6a910c2b
vgo: downloading github.com/gobuffalo/validate v1.0.0
vgo: downloading golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f
vgo: downloading golang.org/x/net v0.0.0-20180522190444-9ef9f5bb98a1
vgo: downloading gopkg.in/yaml.v2 v2.2.1

$ cat go.mod
module github.com/gobuffalo/pop/soda

require (
	github.com/cockroachdb/cockroach-go v0.0.0-20180212155653-59c0560478b7
	github.com/davecgh/go-spew v1.1.0
	github.com/daviddengcn/go-colortext v0.0.0-20180409174941-186a3d44e920
	github.com/fatih/color v1.7.0
	github.com/go-sql-driver/mysql v1.3.0
	github.com/gobuffalo/envy v1.6.2
	github.com/gobuffalo/makr v1.1.0
	github.com/gobuffalo/packr v1.11.0
	github.com/gobuffalo/pop v0.0.0-20180521154020-9985012f32f5
	github.com/gobuffalo/uuid v1.2.0
	github.com/gobuffalo/validate v1.0.0
	github.com/inconshreveable/mousetrap v0.0.0-20141017200713-76626ae9c91c
	github.com/jmoiron/sqlx v0.0.0-20180406164412-2aeb6a910c2b
	github.com/joho/godotenv v1.2.0
	github.com/lib/pq v0.0.0-20180523175426-90697d60dd84
	github.com/markbates/going v0.0.0-20170113214412-0576708c56ce
	github.com/markbates/grift v0.0.0-20180319170132-76f93617a788
	github.com/markbates/inflect v0.0.0-20180514174915-dd7de90c06bc
	github.com/mattn/anko v0.0.4
	github.com/mattn/go-colorable v0.0.9
	github.com/mattn/go-isatty v0.0.3
	github.com/mattn/go-sqlite3 v1.7.0
	github.com/mitchellh/go-homedir v0.0.0-20180523094522-3864e76763d9
	github.com/pkg/errors v0.8.0
	github.com/pmezard/go-difflib v1.0.0
	github.com/serenize/snaker v0.0.0-20171204205717-a683aaf2d516
	github.com/spf13/cobra v0.0.3
	github.com/spf13/pflag v1.0.1
	github.com/stretchr/objx v0.0.0-20180426105006-a5cfa15c000a
	github.com/stretchr/testify v1.2.1
	golang.org/x/net v0.0.0-20180522190444-9ef9f5bb98a1
	golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f
	golang.org/x/sys v0.0.0-20180524135853-04b83988a018
	gopkg.in/check.v1 v1.0.0-20161208181325-20d25e280405
	gopkg.in/yaml.v2 v2.2.1
)

$ vgo build -v
github.com/gobuffalo/pop/associations
# github.com/gobuffalo/pop/associations
../../../../v/github.com/gobuffalo/pop@v0.0.0-20180521154020-9985012f32f5/associations/many_to_many_association.go:135:10: assignment mismatch: 2 variables but 1 values

$ rm -rf $GOPATH/src/v

$ vgo build -v
vgo: finding gopkg.in/yaml.v2 v2.2.1
vgo: finding gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405
vgo: finding gopkg.in/check.v1 v1.0.0-20161208181325-20d25e280405
vgo: finding golang.org/x/sys v0.0.0-20180524135853-04b83988a018
vgo: finding golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f
vgo: finding golang.org/x/net v0.0.0-20180522190444-9ef9f5bb98a1
vgo: finding github.com/stretchr/objx v0.0.0-20180426105006-a5cfa15c000a
vgo: finding github.com/stretchr/testify v1.2.1
vgo: finding github.com/stretchr/objx v0.0.0-20180106011353-facf9a85c22f
vgo: finding github.com/stretchr/testify v1.2.0
vgo: finding github.com/stretchr/objx v0.0.0-20140526180921-cbeaeb16a013
vgo: finding github.com/pmezard/go-difflib v0.0.0-20151028094244-d8ed2627bdf0
vgo: finding github.com/pmezard/go-difflib v1.0.0
vgo: finding github.com/davecgh/go-spew v1.1.0
vgo: finding github.com/spf13/pflag v1.0.1
vgo: finding github.com/spf13/cobra v0.0.3
vgo: finding github.com/mitchellh/go-homedir v0.0.0-20180523094522-3864e76763d9
vgo: finding github.com/mattn/go-sqlite3 v1.7.0
vgo: finding github.com/mattn/anko v0.0.4
vgo: finding github.com/markbates/inflect v0.0.0-20180514174915-dd7de90c06bc
vgo: finding github.com/markbates/grift v0.0.0-20180319170132-76f93617a788
vgo: finding github.com/lib/pq v0.0.0-20180523175426-90697d60dd84
vgo: finding github.com/jmoiron/sqlx v0.0.0-20180406164412-2aeb6a910c2b
vgo: finding github.com/gobuffalo/validate v1.0.0
vgo: finding github.com/gobuffalo/uuid v1.2.0
vgo: finding github.com/gobuffalo/pop v0.0.0-20180521154020-9985012f32f5
vgo: finding gopkg.in/yaml.v2 v2.1.1
vgo: finding golang.org/x/sys v0.0.0-20180302081741-dd2ff4accc09
vgo: finding golang.org/x/sync v0.0.0-20171101214715-fd80eb99c8f6
vgo: finding golang.org/x/net v0.0.0-20180301190904-22ae77b79946
vgo: finding github.com/spf13/pflag v1.0.0
vgo: finding github.com/spf13/cobra v0.0.1
vgo: finding github.com/serenize/snaker v0.0.0-20171204205717-a683aaf2d516
vgo: finding github.com/pkg/errors v0.8.0
vgo: finding github.com/mitchellh/go-homedir v0.0.0-20161203194507-b8bc1bf76747
vgo: finding github.com/mattn/go-sqlite3 v1.6.0
vgo: finding github.com/mattn/go-isatty v0.0.3
vgo: finding github.com/mattn/go-colorable v0.0.9
vgo: finding github.com/mattn/anko v0.0.0-20180212145248-d5441ca3f0c7
vgo: finding github.com/markbates/inflect v0.0.0-20180226203100-3e32b42850a9
vgo: finding github.com/markbates/grift v0.0.0-20180108173051-5499956ce4d9
vgo: finding github.com/markbates/going v0.0.0-20170113214412-0576708c56ce
vgo: finding github.com/lib/pq v0.0.0-20180201184707-88edab080323
vgo: finding github.com/joho/godotenv v1.2.0
vgo: finding github.com/jmoiron/sqlx v0.0.0-20180228184624-cf35089a1979
vgo: finding github.com/inconshreveable/mousetrap v0.0.0-20141017200713-76626ae9c91c
vgo: finding github.com/gobuffalo/validate v0.0.0-20180210182920-42d8db6e06e6
vgo: finding github.com/gobuffalo/uuid v0.0.0-20180207211247-3a9fb6c5c481
vgo: finding github.com/gobuffalo/packr v1.10.4
vgo: finding github.com/gobuffalo/makr v1.1.0
vgo: finding github.com/gobuffalo/envy v1.4.1
vgo: finding github.com/go-sql-driver/mysql v0.0.0-20161201115036-a0583e0143b1
vgo: finding github.com/fatih/color v1.6.0
vgo: finding golang.org/x/sys v0.0.0-20180202135801-37707fdb30a5
vgo: finding github.com/daviddengcn/go-colortext v0.0.0-20171126034257-17e75f6184bc
vgo: finding github.com/cockroachdb/cockroach-go v0.0.0-20180212155653-59c0560478b7
vgo: finding github.com/gobuffalo/packr v1.11.0
vgo: finding github.com/gobuffalo/envy v1.6.2
vgo: finding github.com/go-sql-driver/mysql v1.3.0
vgo: finding github.com/fatih/color v1.7.0
vgo: finding github.com/daviddengcn/go-colortext v0.0.0-20180409174941-186a3d44e920
vgo: downloading github.com/gobuffalo/pop v0.0.0-20180521154020-9985012f32f5
vgo: downloading github.com/cockroachdb/cockroach-go v0.0.0-20180212155653-59c0560478b7
vgo: downloading github.com/lib/pq v0.0.0-20180523175426-90697d60dd84
vgo: downloading github.com/fatih/color v1.7.0
vgo: downloading github.com/mattn/go-colorable v0.0.9
vgo: downloading github.com/mattn/go-isatty v0.0.3
vgo: downloading github.com/go-sql-driver/mysql v1.3.0
vgo: downloading github.com/gobuffalo/envy v1.6.2
vgo: downloading github.com/joho/godotenv v1.2.0
vgo: downloading github.com/gobuffalo/makr v1.1.0
vgo: downloading github.com/markbates/inflect v0.0.0-20180514174915-dd7de90c06bc
vgo: downloading github.com/pkg/errors v0.8.0
vgo: downloading github.com/gobuffalo/packr v1.11.0
vgo: downloading github.com/gobuffalo/uuid v1.2.0
vgo: downloading github.com/mattn/anko v0.0.4
vgo: downloading github.com/jmoiron/sqlx v0.0.0-20180406164412-2aeb6a910c2b
vgo: downloading github.com/gobuffalo/validate v1.0.0
vgo: downloading github.com/markbates/going v0.0.0-20170113214412-0576708c56ce
vgo: downloading golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f
vgo: downloading golang.org/x/net v0.0.0-20180522190444-9ef9f5bb98a1
vgo: downloading gopkg.in/yaml.v2 v2.2.1
vgo: downloading github.com/spf13/cobra v0.0.3
vgo: downloading github.com/spf13/pflag v1.0.1
github.com/gobuffalo/pop/associations
# github.com/gobuffalo/pop/associations
../../../../v/github.com/gobuffalo/pop@v0.0.0-20180521154020-9985012f32f5/associations/many_to_many_association.go:135:10: assignment mismatch: 2 variables but 1 values

Related to:
#109
gobuffalo/buffalo#1074

/cc @rsc

@stanislas-m stanislas-m added the bug Something isn't working label May 24, 2018
@rsc
Copy link
Contributor

rsc commented May 24, 2018

The bad Gopkg.lock from #109 is causing this too, so this is basically a dup of #109.

$ cd $GOPATH/src/github.com/gobuffalo    
$ git clone https://github.com/gobuffalo/pop
Cloning into 'pop'...
remote: Counting objects: 5508, done.
remote: Compressing objects: 100% (20/20), done.
remote: Total 5508 (delta 11), reused 18 (delta 7), pack-reused 5481
Receiving objects: 100% (5508/5508), 4.47 MiB | 13.47 MiB/s, done.
Resolving deltas: 100% (3134/3134), done.
$ cd pop
$ dep ensure   # fix Gopkg.lock
$ cd soda
$ vgo build
$ 

rsc added a commit to rsc/pop that referenced this issue May 24, 2018
The Gopkg.lock is broken if you use it with dep without an automatic update:

```
$ git clone https://github.com/gobuffalo/pop
Cloning into 'pop'...
remote: Counting objects: 5500, done.
remote: Compressing objects: 100% (14/14), done.
remote: Total 5500 (delta 6), reused 12 (delta 5), pack-reused 5481
Receiving objects: 100% (5500/5500), 4.47 MiB | 13.12 MiB/s, done.
Resolving deltas: 100% (3129/3129), done.
$ cd pop
$ dep ensure -vendor-only
$ go build
fizz/bubbler.go:31:30: cannot use "github.com/gobuffalo/pop/vendor/github.com/mattn/anko/vm".NewEnv() (type *"github.com/gobuffalo/pop/vendor/github.com/mattn/anko/vm".Env) as type *"github.com/mattn/anko/vm".Env in argument to core.Import
$
```

This CL fixes the Gopkg.lock:

```
$ dep ensure
$ go build
$
```

Fixes gobuffalo#109.
Fixes gobuffalo#110.
Probably also gobuffalo/buffalo#1075.
markbates pushed a commit that referenced this issue May 24, 2018
The Gopkg.lock is broken if you use it with dep without an automatic update:

```
$ git clone https://github.com/gobuffalo/pop
Cloning into 'pop'...
remote: Counting objects: 5500, done.
remote: Compressing objects: 100% (14/14), done.
remote: Total 5500 (delta 6), reused 12 (delta 5), pack-reused 5481
Receiving objects: 100% (5500/5500), 4.47 MiB | 13.12 MiB/s, done.
Resolving deltas: 100% (3129/3129), done.
$ cd pop
$ dep ensure -vendor-only
$ go build
fizz/bubbler.go:31:30: cannot use "github.com/gobuffalo/pop/vendor/github.com/mattn/anko/vm".NewEnv() (type *"github.com/gobuffalo/pop/vendor/github.com/mattn/anko/vm".Env) as type *"github.com/mattn/anko/vm".Env in argument to core.Import
$
```

This CL fixes the Gopkg.lock:

```
$ dep ensure
$ go build
$
```

Fixes #109.
Fixes #110.
Probably also gobuffalo/buffalo#1075.
@markbates markbates reopened this May 24, 2018
@rsc
Copy link
Contributor

rsc commented May 24, 2018

When you close #109, should be able to close this too.

@markbates
Copy link
Member Author

@rsc @spf13 here is a simple, reproducible demo of Go modules refusing to use any version of Pop greater than 4.5.9. Thoughts? https://github.com/gobuffalo/pop-vgo

@markbates markbates changed the title Soda doesn't build with vgo Pop/Soda doesn't build with vgo Aug 10, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants