gobuffalo / buffalo

Rapid Web Development w/ Go
http://gobuffalo.io
MIT License
8.08k stars 577 forks source link

buffalo build stopped looking for vendor in the directory above #949

Closed ghaabor closed 5 years ago

ghaabor commented 6 years ago

As of the release of 0.11.0 buffalo stopped looking for our vendor directory. We have the following directory setup:

app
├── server
└── vendor

This is the command we run: cd ./server && buffalo build --tags=distribution -o ../server-bin

When using 0.10.3 this command worked perfectly fine, it was able to locate the packages in vendor. Since 0.11.0 buffalo build is failing with this message:

../../../gobuffalo/pop/sqlite.go:20:2: cannot find package "github.com/mattn/go-sqlite3" in any of:
    /usr/local/go/src/github.com/mattn/go-sqlite3 (from $GOROOT)
    /username/go/src/github.com/mattn/go-sqlite3 (from $GOPATH)
beatscode commented 6 years ago

Ran into this issue but the error stated that it couldn't find packr.Box in vendor

./buffalo_build_main.go:60:47: cannot use "com.c/c/vendor/github.com/gobuffalo/packr".NewBox("./migrations") (type "com.c/c/vendor/github.com/gobuffalo/packr".Box) as type "github.com/gobuffalo/packr".Box in argument to "github.com/markbates/pop".NewMigrationBox
./buffalo_build_main.go:60:47: cannot use models.DB (type *"com.c/c/vendor/github.com/gobuffalo/pop".Connection) as type *"github.com/markbates/pop".Connection in argument to "github.com/markbates/pop”.NewMigrationBox

I noticed a few things not sure which one fixed it though.

  1. Version of buffalo cli was v0.10.3 but the project was v0.11.1 ( I upgraded to v0.11.1 )
  2. Ran dep ensure just incase
  3. I develop with docker locally. While looking at my docker logs I noticed that file changes were causing it to build in the container multiple times. So I stopped the container and tried the build again and it built successfully.
Biboswan commented 5 years ago

I have buffalo version 0.13.3 and project is 0.12.4. I get the message "github.com/ossn/fixme_backend/vendor/github.com/gobuffalo/pop".Connection) as type *"github.com/gobuffalo/pop".Connection in argument to popmw.Transaction I also deleted the vendor but still same error

markbates commented 5 years ago

Dep support is going to be released in the next "major" version of Buffalo, so this issue won't be fixed. Sorry. https://github.com/gobuffalo/buffalo/issues/1545