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

allow dirs that don't contain go files (fix #1306) #1398

Closed
wants to merge 1 commit into from

Conversation

travisjeffery
Copy link

@travisjeffery travisjeffery commented Nov 23, 2017

Any feedback on how this should be behave is welcome. This is to fix #1306. The case I've hit is with repos with directories of just protobufs.

What version of Go (go version) and dep (git describe --tags) are you using??

Go 1.9.2 and dep on master.

What dep command did you run?

❯ dep ensure -add github.com/envoyproxy/data-plane-api

What did you expect to see?

❯ dep ensure -add github.com/envoyproxy/data-plane-api
Fetching sources...

"github.com/envoyproxy/data-plane-api" is not imported by your project, and has been temporarily added to Gopkg.lock and vendor/.
If you run "dep ensure" again before actually importing it, it will disappear from Gopkg.lock and vendor/.

With the repo vendored into vendor/.

What did you see instead?

Fetching sources...

Solving failure: No versions of github.com/envoyproxy/data-plane-api met constraints:
	master: Could not introduce github.com/envoyproxy/data-plane-api@master, as its subpackage github.com/envoyproxy/data-plane-api does not contain usable Go code (*build.NoGoError).. (Package is required by (root).)
	rds-redirect-code: Could not introduce github.com/envoyproxy/data-plane-api@rds-redirect-code, as its subpackage github.com/envoyproxy/data-plane-api does not contain usable Go code (*build.NoGoError).. (Package is required by (root).)
	rds_docs: Could not introduce github.com/envoyproxy/data-plane-api@rds_docs, as its subpackage github.com/envoyproxy/data-plane-api does not contain usable Go code (*build.NoGoError).. (Package is required by (root).)
	typo: Could not introduce github.com/envoyproxy/data-plane-api@typo, as its subpackage github.com/envoyproxy/data-plane-api does not contain usable Go code (*build.NoGoError).. (Package is required by (root).)

With this PR, the expected behavior is what you get.

Copy link

@jhayotte jhayotte left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@sdboyer
Copy link
Member

sdboyer commented Nov 23, 2017

Sorry, but the change to facilitate this is going to need to be more involved. This approach basically just makes ListPackages() lie about whether or not there's Go code in a given directory.

I'll explain more over on #1306.

@sdboyer sdboyer closed this Nov 23, 2017
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.

dep cannot vendor dependencies that do not have Go source code
4 participants