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

Ignore examples directory #19

Open
leehambley opened this issue Jul 22, 2014 · 2 comments
Open

Ignore examples directory #19

leehambley opened this issue Jul 22, 2014 · 2 comments

Comments

@leehambley
Copy link

The project go-restful imports broken packages in it's examples/ directory, for example:

https://github.com/emicklei/go-restful/blob/master/examples/google_app_engine/restful-appstats-integration.go

This makes using go-restful impossible with goop.

This common inclusion of an examples/ directory should probably be counted as a place not to look for imports, if you have that within your power.

Error log from a Goopfile containing nothing but github.com/emicklei/go-restful:

$ GOPATH=$(pwd) goop install
=> Fetching github.com/emicklei/go-restful...
Cloning into '/api/.vendor/tmp/src/github.com/emicklei/go-restful'...
remote: Reusing existing pack: 1862, done.
remote: Counting objects: 5, done.
remote: Compressing objects: 100% (5/5), done.
remote: Total 1867 (delta 0), reused 0 (delta 0)
Receiving objects: 100% (1867/1867), 4.80 MiB | 932 KiB/s, done.
Resolving deltas: 100% (959/959), done.
Checking out "c12ca7685cf7b6e123f90cd30556d1065e37a5e6"
=> Fetching dependencies for github.com/emicklei/go-restful...
github.com/gorilla/schema (download)
import "appengine": import path doesn't contain a slash
package github.com/gorilla/schema
    imports appengine: unrecognized import path "appengine"
import "appengine/memcache": import path doesn't contain a hostname
package github.com/gorilla/schema
    imports appengine/memcache: unrecognized import path "appengine/memcache"
github.com/mjibson/appstats (download)
import "appengine/user": import path doesn't contain a hostname
package github.com/gorilla/schema
    imports github.com/mjibson/appstats
    imports appengine/user: unrecognized import path "appengine/user"
import "appengine_internal": import path doesn't contain a slash
package github.com/gorilla/schema
    imports github.com/mjibson/appstats
    imports appengine_internal: unrecognized import path "appengine_internal"
code.google.com/p/goprotobuf (download)
import "appengine/datastore": import path doesn't contain a hostname
package github.com/gorilla/schema
    imports github.com/mjibson/appstats
    imports code.google.com/p/goprotobuf/proto
    imports appengine/datastore: unrecognized import path "appengine/datastore"
goop: Command failed with exit status 1

I will work around this by forging the import path, and working from a clone of the repository in my own name with the examples directory removed.

@mattes
Copy link

mattes commented Dec 4, 2014

Running into the same issue. I think a solution would be to just ignore import paths starting with appengine/*.

@RobbieMcKinstry
Copy link

I've got a similar problem, when trying to use Viper with Goop.

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