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

zb build doesn't report about missing dependencies errors #14

Open
robert-zaremba opened this issue Aug 29, 2017 · 6 comments
Open

zb build doesn't report about missing dependencies errors #14

robert-zaremba opened this issue Aug 29, 2017 · 6 comments

Comments

@robert-zaremba
Copy link

robert-zaremba commented Aug 29, 2017

How to replicate:

  • create a new empty environment (GOPATH), eg:

    mkdir ~/tmp-go
    export GOPATH=~/tmp-go
    
  • clone repository (without using go get) with some dependencies, eg:

    git clone https://github.com/robert-zaremba/log15.git ~/tmp-go/src/github.com/robert-zaremba/log15
    
  • run zb build there.

It will return quietly without reporting error about missing dependencies. If you run go build (eg inside the log15/example package) it will return with errors.

@joshuarubin
Copy link
Owner

Hmm... when I tried that I get this:

% zb build
ERROR cannot find package "github.com/davecgh/go-spew/spew" in any of:
ERROR   /Users/jrubin/.gvm/gos/go1.9/src/github.com/davecgh/go-spew/spew (from $GOROOT)
ERROR   /Users/jrubin/tmp-go/src/github.com/davecgh/go-spew/spew (from $GOPATH)

I thought it might be something in my environment, but it doesn't seem so:

% env -i GOPATH="${GOPATH}" PATH="${PATH}" zb build
level=ERROR msg="cannot find package \"github.com/davecgh/go-spew/spew\" in any of:"
level=ERROR msg="\t/Users/jrubin/.gvm/gos/go1.8.3/src/github.com/davecgh/go-spew/spew (from $GOROOT)"
level=ERROR msg="\t/Users/jrubin/tmp-go/src/github.com/davecgh/go-spew/spew (from $GOPATH)"

@robert-zaremba
Copy link
Author

robert-zaremba commented Aug 29, 2017

This is my output:

% cd ~
~ % mkdir ~/tmp-go

~ % export GOPATH=~/tmp-go

~ % git clone https://github.com/robert-zaremba/log15.git ~/tmp-go/src/github.com/robert-zaremba/log15
Cloning into '/home/robert/tmp-go/src/github.com/robert-zaremba/log15'...
remote: Counting objects: 624, done.
remote: Compressing objects: 100% (18/18), done.
remote: Total 624 (delta 0), reused 12 (delta 0), pack-reused 604
Receiving objects: 100% (624/624), 195.49 KiB | 0 bytes/s, done.
Resolving deltas: 100% (343/343), done.

robert@rz-thinkpad ~ % cd ~/tmp-go/src/github.com/robert-zaremba/log15

...github.com/robert-zaremba/log15 (git master)% zb build

...github.com/robert-zaremba/log15 (git master)% ls
bench_test.go  caller_test.go  doc.go   ext        format-terminal.go       handler.go       handler_go14.go  LICENSE        logger.go  reg.go   root.go    term
caller.go      CONTRIBUTORS    example  format.go  format-terminal_test.go  handler_go13.go  init_test.go     log15_test.go  README.md  rollbar  syslog.go  writer.go

...github.com/robert-zaremba/log15 (git master)% cd example 

...robert-zaremba/log15/example (git master)% go build
../format-terminal.go:9:2: cannot find package "github.com/davecgh/go-spew/spew" in any of:
        /usr/lib/golang/src/github.com/davecgh/go-spew/spew (from $GOROOT)
        /home/robert/tmp-go/src/github.com/davecgh/go-spew/spew (from $GOPATH)
example.go:7:2: cannot find package "github.com/facebookgo/stack" in any of:
        /usr/lib/golang/src/github.com/facebookgo/stack (from $GOROOT)
        /home/robert/tmp-go/src/github.com/facebookgo/stack (from $GOPATH)
../caller.go:7:2: cannot find package "github.com/go-stack/stack" in any of:
        /usr/lib/golang/src/github.com/go-stack/stack (from $GOROOT)
        /home/robert/tmp-go/src/github.com/go-stack/stack (from $GOPATH)
../root.go:6:2: cannot find package "github.com/mattn/go-colorable" in any of:
        /usr/lib/golang/src/github.com/mattn/go-colorable (from $GOROOT)
        /home/robert/tmp-go/src/github.com/mattn/go-colorable (from $GOPATH)
example.go:8:2: cannot find package "github.com/robert-zaremba/errstack" in any of:
        /usr/lib/golang/src/github.com/robert-zaremba/errstack (from $GOROOT)
        /home/robert/tmp-go/src/github.com/robert-zaremba/errstack (from $GOPATH)
../format-terminal.go:11:2: cannot find package "github.com/robert-zaremba/go-tty" in any of:
        /usr/lib/golang/src/github.com/robert-zaremba/go-tty (from $GOROOT)
        /home/robert/tmp-go/src/github.com/robert-zaremba/go-tty (from $GOPATH)

I tested it on Fedora 26 and Ubuntu 16.04

@joshuarubin
Copy link
Owner

I've been testing on Mac, it might be a Linux specific issue. What do you get when you run:
LOG_LEVEL=debug zb build?

@robert-zaremba
Copy link
Author

Also nothing.
I've tried zb -l DEBUG build as well.

@robert-zaremba
Copy link
Author

Are you sure you export GOPATH=~/tmp-go? I've tested it with a friend on Mac and he has the same issue.

@joshuarubin
Copy link
Owner

Yes, my $GOPATH is set just as yours is. I still can't reproduce. You are running the current zb from the master branch? What version of Go?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants