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

Could not import code (no metadata) #150

Closed
kixelated opened this issue Aug 7, 2018 · 3 comments
Closed

Could not import code (no metadata) #150

kixelated opened this issue Aug 7, 2018 · 3 comments

Comments

@kixelated
Copy link

Hey guys, my deploy script that runs go get -u github.com/kisielk/errcheck just broke. Heh of course there was a merge to master just 30 minutes ago.

I'm running go 1.10. This is an internal repository so I can't provide much additional information:

error: failed to check packages: errors while loading package brood/internal/cache_test [brood/internal/cache.test]: [brood/internal/cache/expires_test.go:10:2: could not import brood/internal/cache (no metadata for brood/internal/cache)]

My _test.go files declare package cache_test while the rest are package cache. I do this for blackbox testing and I haven't heard anything about modules deprecating them.

Test files that declare a package with the suffix "_test" will be compiled as a
separate package, and then linked and run with the main test binary
@dominikh
Copy link
Collaborator

dominikh commented Aug 7, 2018

#148 shouldn't have been merged like that. go/packages only fully works with the upcoming Go 1.11 and Go 1.10.4 – for earlier versions of Go, including the current 1.10.3, it uses a fallback. And that fallback doesn't fully support package tests.

@nbyarnell
Copy link

Normally I wouldn't verbally +1 this but this is a small project - I'm running Go 1.10.3 and I'm also experiencing failures with master.

@dominikh
Copy link
Collaborator

dominikh commented Aug 7, 2018

I have undone the merge to fix everyone's builds. I'll let @kisielk sort out the rest.

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

4 participants