clipperhouse/gen

go test broke: can't find foowriter

maddyblue opened this issue · 14 comments

With a fresh checkout:

% go test
_gen_test.go:4:4: could not import github.com/clipperhouse/gen/typewriters/foowriter (can't find import: github.com/clipperhouse/gen/typewriters/foowriter)
exit status 1
--- FAIL: TestList (1.01 seconds)
    list_test.go:60: exit status 1
    list_test.go:65: standard list should output 4 lines, got 0
  Writing dummy_gen_test.go
_gen_test.go:4:4: could not import github.com/clipperhouse/gen/typewriters/foowriter (can't find import: github.com/clipperhouse/gen/typewriters/foowriter)
exit status 1
--- FAIL: TestRun (0.97 seconds)
    run_test.go:63: exit status 1
    run_test.go:68: open dummy_foo_test.go: no such file or directory
FAIL
exit status 1
FAIL    github.com/clipperhouse/gen 2.144s

@mjibson Try gen get?

I can import github.com/clipperhouse/gen/typewriters/foowriter in any of my go files just fine. Maybe the environment in which _gen_test.go is compiled doesn't have my $GOPATH? Looking...

It does create a temp directory, within the calling directory, which I assume (but don't know) is in the GOPATH.

Got the same behavior on both linux and mac, go 1.3. Does your working dir have something in it? Maybe something from your .gitignore?

@mjibson My .gitignore is:

install.sh
watch.sh
coverage.out
*_bar.go
*_bar_test.go
*_foo.go
*_foo_test.go

v4 is busted for me too. Noticed earlier.

Sorry, it was master that was busted.

Where are you cloning it to? So strange.

And only if cloning with git? Not a problem if you just go get github.com/clipperhouse/gen?

I cloned it with go get, not git.

On Mon, Jun 30, 2014 at 11:37 PM, Matt Sherman notifications@github.com
wrote:

Where are you cloning it to? So strange.

And only if cloning with git? Not a problem if you just go get
github.com/clipperhouse/gen?


Reply to this email directly or view it on GitHub
#53 (comment).

OK I got a repro.

Repro is by deleting the .a files in pkg directory.

This issue was that no go get is run on foowriter, so it's not installed as a .a file in GOPATH/pkg.

I've added an actual get() to get_test.go. Assuming that test fires first, should fix the issue. Let me know if otherwise.

Test passed for me now.

On Tue, Jul 1, 2014 at 12:22 AM, Matt Sherman notifications@github.com
wrote:

Closed #53 #53.


Reply to this email directly or view it on GitHub
#53 (comment).