constabulary / gb

gb, the project based build tool for Go
https://getgb.io/
MIT License
2.15k stars 148 forks source link

gb test is broken on darwin #705

Closed timperrett closed 7 years ago

timperrett commented 7 years ago

Hi there! long time user of gb, its a great tool - thanks for making it! For some reason, new go get on OSX is broken and test command no longer works. Here's the output:

gb test -v
_testmain.go:58: cannot use matchString (type func(string, string) (bool, error)) as type testing.testDeps in argument to testing.MainStart:
        func(string, string) (bool, error) does not implement testing.testDeps (missing MatchString method)
FATAL: command "test" failed: exit status 2
make: *** [test] Error 1

Thanks in advance for any information.

davecheney commented 7 years ago

Thanks for logging this issue. Which version of Go are you using?

On Thu, 13 Apr 2017, 08:35 Timothy Perrett notifications@github.com wrote:

Hi there! long time user of gb, its a great tool - thanks for making it! For some reason, new go get on OSX is broken and test command no longer works. Here's the output:

gb test -v _testmain.go:58: cannot use matchString (type func(string, string) (bool, error)) as type testing.testDeps in argument to testing.MainStart: func(string, string) (bool, error) does not implement testing.testDeps (missing MatchString method) FATAL: command "test" failed: exit status 2 make: *** [test] Error 1

Thanks in advance for any information.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/constabulary/gb/issues/705, or mute the thread https://github.com/notifications/unsubscribe-auth/AAAcAzw8in99yItHmvC2RTrcX4_uNd6lks5rvVGmgaJpZM4M8DU_ .

timperrett commented 7 years ago

Hey @davecheney - so we figured out the issue: under Go 1.8, we get the aforementioned issue. With Go 1.7, its all golden. Moreover, what's weird is that Go 1.8 with Linux works fine, but on darwin it explodes.

Hope this helps - happy to provide any additional information needed.

davecheney commented 7 years ago

It could be a mismatch between the version of go you have installed, and the version of go that compiled gb. The easiest way to fix this is to

  1. make sure you unset GOROOT ( never ever set GOROOT )
  2. run go version, check that it's the version you expect
  3. go get -u github.com/constabulary/gb/...

On Thu, Apr 13, 2017 at 9:41 AM, Timothy Perrett notifications@github.com wrote:

Hey @davecheney - so we figured out the issue: under Go 1.8, we get the aforementioned issue. With Go 1.7, its all golden. Moreover, what's weird is that Go 1.8 with Linux works fine, but on darwin it explodes.

Hope this helps - happy to provide any additional information needed.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

timperrett commented 7 years ago

Thanks @davecheney you were right - should not have been setting the GOROOT. Not doing this, and updating the gb worked. Sorry for the noise, and thanks for the continued efforts on this great tool.