Comments (4)
Thanks. I'm in the process of setting up CI. I expect there will be a some
windows errors due to the usual filepath.Seperator
shenanigans.
On Sun, May 3, 2015 at 7:59 AM, Jason Buberel [email protected]
wrote:
Just working through a couple of user scenarios, and trying to get gb
working on a windows workstation.I built gb.exe successfully, and then created the following directory
structure:C:\Users\jason_000\mymysqltestproj> dir /a-d /b /s
C:\Users\jason_000\mymysqltestproj\bin\gb-env.exe
C:\Users\jason_000\mymysqltestproj\bin\gb-vendor.exe
C:\Users\jason_000\mymysqltestproj\bin\gb.exe
C:\Users\jason_000\mymysqltestproj\pkg\windows_amd64\github.com\constabulary\gb.a
C:\Users\jason_000\mymysqltestproj\pkg\windows_amd64\github.com\constabulary\gb\cmd.a
C:\Users\jason_000\mymysqltestproj\src\mytestproj\main.goThe only GO-named environment variable set is GOPATH:
C:\Users\jason_000\mymysqltestproj> set GO
GOPATH="C:\Users\jason_000\mymysqltestproj"I can run the program using go run as follows:
C:\Users\jason_000\mymysqltestproj> go run src\mytestproj\main.go
Hello, world.But trying to build the application using gb fails:
C:\Users\jason_000\mymysqltestproj> bin\gb.exe build -v all
2015/05/02 14:54:14 INFO project root "C:\Users\jason_000\mymysqltestproj"
2015/05/02 14:54:14 DEBUG matchPackages: [C:\Users\jason_000\mymysqltestproj\src] all
2015/05/02 14:54:14 DEBUG args: [mytestproj]
2015/05/02 14:54:14 DEBUG loadPackage: mytestproj
2015/05/02 14:54:14 INFO build duration: 0 map[]
2015/05/02 14:54:14 command "build" failed: failed to resolve package "mytestproj": cannot find package "mytestproj" in any of:
c:\go\src\mytestproj (from $GOROOT)
C:\Users\jason_000\mymysqltestproj:C:\Users\jason_000\mymysqltestproj\vendor\src\mytestproj (from $GOPATH)I believe the problem is due o gb not appending src to the project root
when it looks for matching package/path names. In the last line of output,
notice that the search path is:C:\Users\jason_000\mymysqltestproj:C:\Users\jason_000\mymysqltestproj\vendor\src\mytestproj
Instead of:
C:\Users\jason_000\mymysqltestproj\src:C:\Users\jason_000\mymysqltestproj\vendor\src\mytestproj
—
Reply to this email directly or view it on GitHub
#27.
from gb.
Confirmed the fix locally. Thanks.
$ gb build -v all
DEBUG project root "c:\\Users\\jason_000\\gbtest"
DEBUG matchPackages: [c:\Users\jason_000\gbtest\src] all
DEBUG args: [github.com/constabulary/gb github.com/constabulary/gb/cmd github.com/constabulary/gb/cmd/gb github.com/constabulary/gb/cmd/gb-env mysqltest]
DEBUG loadPackage: github.com/constabulary/gb true (c:\Users\jason_000\gbtest\src\github.com\constabulary\gb)
DEBUG loadPackage: github.com/constabulary/gb/cmd true (c:\Users\jason_000\gbtest\src\github.com\constabulary\gb\cmd)
DEBUG loadPackage: github.com/constabulary/gb/cmd/gb true (c:\Users\jason_000\gbtest\src\github.com\constabulary\gb\cmd\gb)
DEBUG loadPackage: github.com/constabulary/gb/cmd/gb-env true (c:\Users\jason_000\gbtest\src\github.com\constabulary\gb\cmd\gb-env)
DEBUG loadPackage: mysqltest true (c:\Users\jason_000\gbtest\src\mysqltest)
DEBUG buildPackage: github.com/constabulary/gb
DEBUG buildPackage: github.com/constabulary/gb/cmd
DEBUG buildPackage: github.com/constabulary/gb/cmd/gb
DEBUG {main github.com/constabulary/gb/cmd/gb c:\Users\jason_000\gbtest\src\github.com\constabulary\gb\cmd\gb} is a main package, not installing
DEBUG buildPackage: github.com/constabulary/gb/cmd/gb-env
DEBUG {main github.com/constabulary/gb/cmd/gb-env c:\Users\jason_000\gbtest\src\github.com\constabulary\gb\cmd\gb-env} is a main package, not installing
DEBUG buildPackage: mysqltest
DEBUG {main mysqltest c:\Users\jason_000\gbtest\src\mysqltest} is a main package, not installing
INFO github.com/constabulary/gb
DEBUG gc:gc github.com/constabulary/gb c:\Users\jason_000\gbtest\src\github.com\constabulary\gb C:\Users\JASON_~1\AppData\Local\Temp\gb214506947\github.com\constabulary\gb.a [build.go context.go gb.go gc.go gotest.go install.go log.go package.go project.go stdlib.go target.go test.go toolchain.go]
DEBUG cd c:\Users\jason_000\gbtest\src\github.com\constabulary\gb; [C:\Go\pkg\tool\windows_amd64\6g -p github.com/constabulary/gb -pack -o C:\Users\JASON_~1\AppData\Local\Temp\gb214506947\github.com\constabulary\gb.a -I C:\Users\JASON_~1\AppData\Local\Temp\gb214506947 -I c:\Users\jason_000\gbtest\pkg\windows\amd64 -complete build.go context.go gb.go gc.go gotest.go install.go log.go package.go project.go stdlib.go target.go test.go toolchain.go]
INFO github.com/constabulary/gb/cmd/gb-env
DEBUG gc:gc github.com/constabulary/gb/cmd/gb-env c:\Users\jason_000\gbtest\src\github.com\constabulary\gb\cmd\gb-env C:\Users\JASON_~1\AppData\Local\Temp\gb214506947\github.com\constabulary\gb\cmd\gb-env\main.a [main.go]
DEBUG cd c:\Users\jason_000\gbtest\src\github.com\constabulary\gb\cmd\gb-env; [C:\Go\pkg\tool\windows_amd64\6g -p github.com/constabulary/gb/cmd/gb-env -pack -o C:\Users\JASON_~1\AppData\Local\Temp\gb214506947\github.com\constabulary\gb\cmd\gb-env\main.a -I C:\Users\JASON_~1\AppData\Local\Temp\gb214506947 -I c:\Users\jason_000\gbtest\pkg\windows\amd64 -complete main.go]
INFO mysqltest
DEBUG gc:gc mysqltest c:\Users\jason_000\gbtest\src\mysqltest C:\Users\JASON_~1\AppData\Local\Temp\gb214506947\mysqltest\main.a [main.go]
DEBUG cd c:\Users\jason_000\gbtest\src\mysqltest; [C:\Go\pkg\tool\windows_amd64\6g -p mysqltest -pack -o C:\Users\JASON_~1\AppData\Local\Temp\gb214506947\mysqltest\main.a -I C:\Users\JASON_~1\AppData\Local\Temp\gb214506947 -I c:\Users\jason_000\gbtest\pkg\windows\amd64 -complete main.go]
DEBUG cd .; [C:\Go\pkg\tool\windows_amd64\6l -o c:\Users\jason_000\gbtest\bin\gb-env -L C:\Users\JASON_~1\AppData\Local\Temp\gb214506947 -L c:\Users\jason_000\gbtest\pkg\windows\amd64 C:\Users\JASON_~1\AppData\Local\Temp\gb214506947\github.com\constabulary\gb\cmd\gb-env\main.a]
DEBUG cd .; [C:\Go\pkg\tool\windows_amd64\6l -o c:\Users\jason_000\gbtest\bin\mysqltest -L C:\Users\JASON_~1\AppData\Local\Temp\gb214506947 -L c:\Users\jason_000\gbtest\pkg\windows\amd64 C:\Users\JASON_~1\AppData\Local\Temp\gb214506947\mysqltest\main.a]
DEBUG copyfile(dst: c:\Users\jason_000\gbtest\pkg\windows\amd64\github.com\constabulary\gb.a, src: C:\Users\JASON_~1\AppData\Local\Temp\gb214506947\github.com\constabulary\gb.a)
INFO github.com/constabulary/gb/cmd
DEBUG gc:gc github.com/constabulary/gb/cmd c:\Users\jason_000\gbtest\src\github.com\constabulary\gb\cmd C:\Users\JASON_~1\AppData\Local\Temp\gb214506947\github.com\constabulary\gb\cmd.a [env.go import.go path.go]
DEBUG cd c:\Users\jason_000\gbtest\src\github.com\constabulary\gb\cmd; [C:\Go\pkg\tool\windows_amd64\6g -p github.com/constabulary/gb/cmd -pack -o C:\Users\JASON_~1\AppData\Local\Temp\gb214506947\github.com\constabulary\gb\cmd.a -I C:\Users\JASON_~1\AppData\Local\Temp\gb214506947 -I c:\Users\jason_000\gbtest\pkg\windows\amd64 -complete env.go import.go path.go]
DEBUG copyfile(dst: c:\Users\jason_000\gbtest\pkg\windows\amd64\github.com\constabulary\gb\cmd.a, src: C:\Users\JASON_~1\AppData\Local\Temp\gb214506947\github.com\constabulary\gb\cmd.a)
INFO github.com/constabulary/gb/cmd/gb
DEBUG gc:gc github.com/constabulary/gb/cmd/gb c:\Users\jason_000\gbtest\src\github.com\constabulary\gb\cmd\gb C:\Users\JASON_~1\AppData\Local\Temp\gb214506947\github.com\constabulary\gb\cmd\gb\main.a [build.go main.go plugin.go test.go]
DEBUG cd c:\Users\jason_000\gbtest\src\github.com\constabulary\gb\cmd\gb; [C:\Go\pkg\tool\windows_amd64\6g -p github.com/constabulary/gb/cmd/gb -pack -o C:\Users\JASON_~1\AppData\Local\Temp\gb214506947\github.com\constabulary\gb\cmd\gb\main.a -I C:\Users\JASON_~1\AppData\Local\Temp\gb214506947 -I c:\Users\jason_000\gbtest\pkg\windows\amd64 -complete build.go main.go plugin.go test.go]
DEBUG cd .; [C:\Go\pkg\tool\windows_amd64\6l -o c:\Users\jason_000\gbtest\bin\gb -L C:\Users\JASON_~1\AppData\Local\Temp\gb214506947 -L c:\Users\jason_000\gbtest\pkg\windows\amd64 C:\Users\JASON_~1\AppData\Local\Temp\gb214506947\github.com\constabulary\gb\cmd\gb\main.a]
DEBUG removing work directory: C:\Users\JASON_~1\AppData\Local\Temp\gb214506947
DEBUG build duration: 809.4249ms map[compile:257.0565ms link:574.115ms]
from gb.
Thanks for confirming, how do you like the new default logging (no -v) ?
On Mon, May 11, 2015 at 10:17 AM, Jason Buberel [email protected]
wrote:
Confirmed the fix locally. Thanks.
$ gb build -v all
DEBUG project root "c:\Users\jason_000\gbtest"
DEBUG matchPackages: [c:\Users\jason_000\gbtest\src] all
DEBUG args: [github.com/constabulary/gb github.com/constabulary/gb/cmd github.com/constabulary/gb/cmd/gb github.com/constabulary/gb/cmd/gb-env mysqltest]
DEBUG loadPackage: github.com/constabulary/gb true (c:\Users\jason_000\gbtest\src\github.com\constabulary\gb)
DEBUG loadPackage: github.com/constabulary/gb/cmd true (c:\Users\jason_000\gbtest\src\github.com\constabulary\gb\cmd)
DEBUG loadPackage: github.com/constabulary/gb/cmd/gb true (c:\Users\jason_000\gbtest\src\github.com\constabulary\gb\cmd\gb)
DEBUG loadPackage: github.com/constabulary/gb/cmd/gb-env true (c:\Users\jason_000\gbtest\src\github.com\constabulary\gb\cmd\gb-env)
DEBUG loadPackage: mysqltest true (c:\Users\jason_000\gbtest\src\mysqltest)
DEBUG buildPackage: github.com/constabulary/gb
DEBUG buildPackage: github.com/constabulary/gb/cmd
DEBUG buildPackage: github.com/constabulary/gb/cmd/gb
DEBUG {main github.com/constabulary/gb/cmd/gb c:\Users\jason_000\gbtest\src\github.com\constabulary\gb\cmd\gb} is a main package, not installing
DEBUG buildPackage: github.com/constabulary/gb/cmd/gb-env
DEBUG {main github.com/constabulary/gb/cmd/gb-env c:\Users\jason_000\gbtest\src\github.com\constabulary\gb\cmd\gb-env} is a main package, not installing
DEBUG buildPackage: mysqltest
DEBUG {main mysqltest c:\Users\jason_000\gbtest\src\mysqltest} is a main package, not installing
INFO github.com/constabulary/gb
DEBUG gc:gc github.com/constabulary/gb c:\Users\jason_000\gbtest\src\github.com\constabulary\gb C:\Users\JASON_~1\AppData\Local\Temp\gb214506947\github.com\constabulary\gb.a [build.go context.go gb.go gc.go gotest.go install.go log.go package.go project.go stdlib.go target.go test.go toolchain.go]
DEBUG cd c:\Users\jason_000\gbtest\src\github.com\constabulary\gb; [C:\Go\pkg\tool\windows_amd64\6g -p github.com/constabulary/gb -pack -o C:\Users\JASON_~1\AppData\Local\Temp\gb214506947\github.com\constabulary\gb.a -I C:\Users\JASON_~1\AppData\Local\Temp\gb214506947 -I c:\Users\jason_000\gbtest\pkg\windows\amd64 -complete build.go context.go gb.go gc.go gotest.go install.go log.go package.go project.go stdlib.go target.go test.go toolchain.go]
INFO github.com/constabulary/gb/cmd/gb-env
DEBUG gc:gc github.com/constabulary/gb/cmd/gb-env c:\Users\jason_000\gbtest\src\github.com\constabulary\gb\cmd\gb-env C:\Users\JASON_~1\AppData\Local\Temp\gb214506947\github.com\constabulary\gb\cmd\gb-env\main.a [main.go]
DEBUG cd c:\Users\jason_000\gbtest\src\github.com\constabulary\gb\cmd\gb-env; [C:\Go\pkg\tool\windows_amd64\6g -p github.com/constabulary/gb/cmd/gb-env -pack -o C:\Users\JASON_~1\AppData\Local\Temp\gb214506947\github.com\constabulary\gb\cmd\gb-env\main.a -I C:\Users\JASON_~1\AppData\Local\Temp\gb214506947 -I c:\Users\jason_000\gbtest\pkg\windows\amd64 -complete main.go]
INFO mysqltest
DEBUG gc:gc mysqltest c:\Users\jason_000\gbtest\src\mysqltest C:\Users\JASON_~1\AppData\Local\Temp\gb214506947\mysqltest\main.a [main.go]
DEBUG cd c:\Users\jason_000\gbtest\src\mysqltest; [C:\Go\pkg\tool\windows_amd64\6g -p mysqltest -pack -o C:\Users\JASON_~1\AppData\Local\Temp\gb214506947\mysqltest\main.a -I C:\Users\JASON_~1\AppData\Local\Temp\gb214506947 -I c:\Users\jason_000\gbtest\pkg\windows\amd64 -complete main.go]
DEBUG cd .; [C:\Go\pkg\tool\windows_amd64\6l -o c:\Users\jason_000\gbtest\bin\gb-env -L C:\Users\JASON_~1\AppData\Local\Temp\gb214506947 -L c:\Users\jason_000\gbtest\pkg\windows\amd64 C:\Users\JASON_~1\AppData\Local\Temp\gb214506947\github.com\constabulary\gb\cmd\gb-env\main.a]
DEBUG cd .; [C:\Go\pkg\tool\windows_amd64\6l -o c:\Users\jason_000\gbtest\bin\mysqltest -L C:\Users\JASON_~1\AppData\Local\Temp\gb214506947 -L c:\Users\jason_000\gbtest\pkg\windows\amd64 C:\Users\JASON_~1\AppData\Local\Temp\gb214506947\mysqltest\main.a]
DEBUG copyfile(dst: c:\Users\jason_000\gbtest\pkg\windows\amd64\github.com\constabulary\gb.a, src: C:\Users\JASON_~1\AppData\Local\Temp\gb214506947\github.com\constabulary\gb.a)
INFO github.com/constabulary/gb/cmd
DEBUG gc:gc github.com/constabulary/gb/cmd c:\Users\jason_000\gbtest\src\github.com\constabulary\gb\cmd C:\Users\JASON_~1\AppData\Local\Temp\gb214506947\github.com\constabulary\gb\cmd.a [env.go import.go path.go]
DEBUG cd c:\Users\jason_000\gbtest\src\github.com\constabulary\gb\cmd; [C:\Go\pkg\tool\windows_amd64\6g -p github.com/constabulary/gb/cmd -pack -o C:\Users\JASON_~1\AppData\Local\Temp\gb214506947\github.com\constabulary\gb\cmd.a -I C:\Users\JASON_~1\AppData\Local\Temp\gb214506947 -I c:\Users\jason_000\gbtest\pkg\windows\amd64 -complete env.go import.go path.go]
DEBUG copyfile(dst: c:\Users\jason_000\gbtest\pkg\windows\amd64\github.com\constabulary\gb\cmd.a, src: C:\Users\JASON_~1\AppData\Local\Temp\gb214506947\github.com\constabulary\gb\cmd.a)
INFO github.com/constabulary/gb/cmd/gb
DEBUG gc:gc github.com/constabulary/gb/cmd/gb c:\Users\jason_000\gbtest\src\github.com\constabulary\gb\cmd\gb C:\Users\JASON_~1\AppData\Local\Temp\gb214506947\github.com\constabulary\gb\cmd\gb\main.a [build.go main.go plugin.go test.go]
DEBUG cd c:\Users\jason_000\gbtest\src\github.com\constabulary\gb\cmd\gb; [C:\Go\pkg\tool\windows_amd64\6g -p github.com/constabulary/gb/cmd/gb -pack -o C:\Users\JASON_~1\AppData\Local\Temp\gb214506947\github.com\constabulary\gb\cmd\gb\main.a -I C:\Users\JASON_~1\AppData\Local\Temp\gb214506947 -I c:\Users\jason_000\gbtest\pkg\windows\amd64 -complete build.go main.go plugin.go test.go]
DEBUG cd .; [C:\Go\pkg\tool\windows_amd64\6l -o c:\Users\jason_000\gbtest\bin\gb -L C:\Users\JASON_~1\AppData\Local\Temp\gb214506947 -L c:\Users\jason_000\gbtest\pkg\windows\amd64 C:\Users\JASON_~1\AppData\Local\Temp\gb214506947\github.com\constabulary\gb\cmd\gb\main.a]
DEBUG removing work directory: C:\Users\JASON_~1\AppData\Local\Temp\gb214506947
DEBUG build duration: 809.4249ms map[compile:257.0565ms link:574.115ms]—
Reply to this email directly or view it on GitHub
#27 (comment).
from gb.
Very nice. Using that on the beego package:
jason_000@velocity-micro /c/Users/jason_000/gbtest
$ git clone https://github.com/astaxie/beego src/github.com/astaxie/beego
Cloning into 'src/github.com/astaxie/beego'...
remote: Counting objects: 7183, done.
remote: Compressing objects: 100% (3/3), done.
remote: Total 7183 (delta 0), reused 0 (delta 0), pack-reused 7180
Receiving objects: 100% (7183/7183), 5.32 MiB | 2.48 MiB/s, done.
Resolving deltas: 100% (3965/3965), done.
Checking connectivity... done.
jason_000@velocity-micro /c/Users/jason_000/gbtest
$ gb build github.com/astaxie/beego
github.com/astaxie/beego/config
github.com/astaxie/beego/utils
github.com/astaxie/beego/logs
github.com/astaxie/beego/toolbox
github.com/astaxie/beego/session
github.com/astaxie/beego/context
github.com/astaxie/beego
from gb.
Related Issues (20)
- gb should fail early with unknown/unsupported GOOS or GOARCH value
- Error vendoring gb with gb-vendor HOT 2
- gb build does not create bin folder and binary in bin folder HOT 24
- Website needs list of projects using GB
- Gogland (perhaps also others) configuration example HOT 1
- why vendor/src? HOT 1
- gb build fails on centos7 with linking error HOT 6
- have any command copy a package from $GOPATH
- Can't build project in Docker HOT 2
- gb build do not work correctly on windows (can work correctly on linux)
- Build of Go's runtime package fails when cross-compiling with go1.9.4 HOT 6
- horizon HOT 4
- using gb to make a library HOT 2
- Is the gb project dead? HOT 15
- / HOT 1
- gb vendor doesn't work with fish shell HOT 1
- [SOLVED] How to migrate to go modules? HOT 6
- gb + IDE ? HOT 1
- Cross build not working on OSX: cgo_export_static main only allowed in cgo-generated code
- module github.com/constabulary/gb@latest found (v0.4.4), but does not contain package github.com/constabulary/gb/internal/vendor HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gb.