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

go test broke: can't find foowriter #53

Closed
maddyblue opened this issue Jul 1, 2014 · 14 comments
Closed

go test broke: can't find foowriter #53

maddyblue opened this issue Jul 1, 2014 · 14 comments

Comments

@maddyblue
Copy link
Contributor

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
@clipperhouse
Copy link
Owner

@mjibson Try gen get?

@clipperhouse
Copy link
Owner

Should be right there, though: https://github.com/clipperhouse/gen/tree/master/typewriters/foowriter

@maddyblue
Copy link
Contributor Author

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...

@clipperhouse
Copy link
Owner

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

@maddyblue
Copy link
Contributor Author

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?

@clipperhouse
Copy link
Owner

@mjibson My .gitignore is:

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

@freeeve
Copy link
Contributor

freeeve commented Jul 1, 2014

v4 is busted for me too. Noticed earlier.

@freeeve
Copy link
Contributor

freeeve commented Jul 1, 2014

Sorry, it was master that was busted.

@clipperhouse
Copy link
Owner

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?

@maddyblue
Copy link
Contributor Author

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).

@clipperhouse
Copy link
Owner

OK I got a repro.

@clipperhouse
Copy link
Owner

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

@clipperhouse
Copy link
Owner

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.

@maddyblue
Copy link
Contributor Author

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).

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

3 participants