Skip to content
This repository has been archived by the owner on Sep 9, 2020. It is now read-only.

gps: skip hidden directories when looking for packages #1251

Closed

Conversation

vincentbernat
Copy link

Stuff in hidden directories should stay hidden. In my case, I am using a special GOPATH and I don't want dep to look into it.

@sdboyer
Copy link
Member

sdboyer commented Oct 10, 2017

sorry, this can't be how this works. it is valid, even if inadvisable, to import packages under dot dirs, and ListPackages has to model all possibly-valid importable locations when creating its virtual representation of the filesystem.

@sdboyer sdboyer closed this Oct 10, 2017
@vincentbernat
Copy link
Author

go list also skips hidden directories. Moreover, by the same logic, VCS directories and Godeps shouldn't be skipped. Please, reconsider.

@sdboyer
Copy link
Member

sdboyer commented Oct 10, 2017 via email

@vincentbernat
Copy link
Author

In fact, the additional analysis doesn't bother me much but starting from 242e387 and 19c7f60, pkgtree will recurse into dep itself and choke on invalid tests and I get this kind of error:

ensure ListPackage for project: import path hellogopher/.gopath~/src/github.com/golang/dep/internal/gps/_testdata/src/canon_confl had conflicting import comments: "vanity1", "vanity2"

@vincentbernat
Copy link
Author

For context, I am doing stuff like that to get a local GOPATH: https://github.com/vincentbernat/hellogopher/blob/master/Makefile#L26.

This is not something totally alien as some popular developers advertise this way of doing things (well, at least one): https://github.com/cloudflare/hellogopher/blob/master/Makefile.

@sdboyer
Copy link
Member

sdboyer commented Oct 11, 2017

uuuugghh.

yeah, we keep ping-ponging around on these individual package-level errors, as well as what we should be looking at at all (within the root project). this whole model needs improving.

#1253 will be where this can live on, as @darkowlzz is gonna take on making the necessary deeper improvements.

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

Successfully merging this pull request may close these issues.

3 participants