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

Protobuf repo as a dependency #723

Closed
amineck opened this issue Jun 5, 2017 · 2 comments
Closed

Protobuf repo as a dependency #723

amineck opened this issue Jun 5, 2017 · 2 comments

Comments

@amineck
Copy link

amineck commented Jun 5, 2017

Hi,

I have a project with github.com/google/openrtb as a dependency and I'm using go generate to generate go code from the protobuf files. I was wondering what's the best solution to handle these kind of dependencies with dep?

Here is the output I receive:

dep ensure github.com/google/openrtb
ensure Solve(): No versions of github.com/google/openrtb met constraints:
	1.4.1: Could not introduce github.com/google/openrtb@1.4.1, as its subpackage github.com/google/openrtb/openrtb-core/src/main/protobuf does not contain usable Go code (*build.NoGoError).. (Package is required by (root).)
	1.4.0: Could not introduce github.com/google/openrtb@1.4.0, as its subpackage github.com/google/openrtb/openrtb-core/src/main/protobuf does not contain usable Go code (*build.NoGoError).. (Package is required by (root).)
	1.3.0: Could not introduce github.com/google/openrtb@1.3.0, as its subpackage github.com/google/openrtb/openrtb-core/src/main/protobuf does not contain usable Go code (*build.NoGoError).. (Package is required by (root).)
	1.2.2: Could not introduce github.com/google/openrtb@1.2.2, as its subpackage github.com/google/openrtb/openrtb-core/src/main/protobuf does not contain usable Go code (*build.NoGoError).. (Package is required by (root).)
	1.2.1: Could not introduce github.com/google/openrtb@1.2.1, as its subpackage github.com/google/openrtb/openrtb-core/src/main/protobuf does not contain usable Go code (*build.NoGoError).. (Package is required by (root).)
	1.2.0: Could not introduce github.com/google/openrtb@1.2.0, as its subpackage github.com/google/openrtb/openrtb-core/src/main/protobuf does not contain usable Go code (*build.NoGoError).. (Package is required by (root).)
	1.1.0: Could not introduce github.com/google/openrtb@1.1.0, as its subpackage github.com/google/openrtb/openrtb-core/src/main/protobuf does not contain usable Go code (*build.NoGoError).. (Package is required by (root).)
	1.0.5: Could not introduce github.com/google/openrtb@1.0.5, as its subpackage github.com/google/openrtb/openrtb-core/src/main/protobuf does not contain usable Go code (*build.NoGoError).. (Package is required by (root).)
	1.0.4: Could not introduce github.com/google/openrtb@1.0.4, as its subpackage github.com/google/openrtb/openrtb-core/src/main/protobuf does not contain usable Go code (*build.NoGoError).. (Package is required by (root).)
	1.0.3: Could not introduce github.com/google/openrtb@1.0.3, as its subpackage github.com/google/openrtb/openrtb-core/src/main/protobuf does not contain usable Go code (*build.NoGoError).. (Package is required by (root).)
	1.0.2: Could not introduce github.com/google/openrtb@1.0.2, as its subpackage github.com/google/openrtb/openrtb-core/src/main/protobuf does not contain usable Go code (*build.NoGoError).. (Package is required by (root).)
	1.0.1: Could not introduce github.com/google/openrtb@1.0.1, as its subpackage github.com/google/openrtb/openrtb-core/src/main/protobuf does not contain usable Go code (*build.NoGoError).. (Package is required by (root).)
	1.0.0: Could not introduce github.com/google/openrtb@1.0.0, as its subpackage github.com/google/openrtb/openrtb-core/src/main/protobuf does not contain usable Go code (*build.NoGoError).. (Package is required by (root).)
	0.9.8: Could not introduce github.com/google/openrtb@0.9.8, as its subpackage github.com/google/openrtb/openrtb-core/src/main/protobuf does not contain usable Go code (*build.NoGoError).. (Package is required by (root).)
	0.9.7: Could not introduce github.com/google/openrtb@0.9.7, as its subpackage github.com/google/openrtb/openrtb-core/src/main/protobuf does not contain usable Go code (*build.NoGoError).. (Package is required by (root).)
	0.9.6: Could not introduce github.com/google/openrtb@0.9.6, as its subpackage github.com/google/openrtb/openrtb-core/src/main/protobuf does not contain usable Go code (*build.NoGoError).. (Package is required by (root).)
	0.9.5: Could not introduce github.com/google/openrtb@0.9.5, as its subpackage github.com/google/openrtb/openrtb-core/src/main/protobuf does not contain usable Go code (*build.NoGoError).. (Package is required by (root).)
	0.9.4: Could not introduce github.com/google/openrtb@0.9.4, as its subpackage github.com/google/openrtb/openrtb-core/src/main/protobuf does not contain usable Go code (*build.NoGoError).. (Package is required by (root).)
	0.9.3: Could not introduce github.com/google/openrtb@0.9.3, as its subpackage github.com/google/openrtb/openrtb-core/src/main/protobuf does not contain usable Go code (*build.NoGoError).. (Package is required by (root).)
	0.9.2: Could not introduce github.com/google/openrtb@0.9.2, as its subpackage github.com/google/openrtb/openrtb-core/src/main/protobuf does not contain usable Go code (*build.NoGoError).. (Package is required by (root).)
	0.9.1: Could not introduce github.com/google/openrtb@0.9.1, as its subpackage github.com/google/openrtb/openrtb-core/src/main/protobuf does not contain usable Go code (*build.NoGoError).. (Package is required by (root).)
	0.9.0: Could not introduce github.com/google/openrtb@0.9.0, as its subpackage github.com/google/openrtb/openrtb-core/src/main/protobuf does not contain usable Go code (*build.NoGoError).. (Package is required by (root).)
	0.8.6: Could not introduce github.com/google/openrtb@0.8.6, as its subpackage github.com/google/openrtb/openrtb-core/src/main/protobuf does not contain usable Go code (*build.NoGoError).. (Package is required by (root).)
	0.8.5: Could not introduce github.com/google/openrtb@0.8.5, as its subpackage github.com/google/openrtb/openrtb-core/src/main/protobuf does not contain usable Go code (*build.NoGoError).. (Package is required by (root).)
	0.8.4: Could not introduce github.com/google/openrtb@0.8.4, as its subpackage github.com/google/openrtb/openrtb-core/src/main/protobuf does not contain usable Go code (*build.NoGoError).. (Package is required by (root).)
	0.8.3: Could not introduce github.com/google/openrtb@0.8.3, as its subpackage github.com/google/openrtb/openrtb-core/src/main/protobuf does not contain usable Go code (*build.NoGoError).. (Package is required by (root).)
	0.8.2: Could not introduce github.com/google/openrtb@0.8.2, as its subpackage github.com/google/openrtb/openrtb-core/src/main/protobuf does not contain usable Go code (*build.NoGoError).. (Package is required by (root).)
	0.8.1: Could not introduce github.com/google/openrtb@0.8.1, as its subpackage github.com/google/openrtb/openrtb-core/src/main/protobuf does not contain usable Go code (*build.NoGoError).. (Package is required by (root).)
	0.8.0: Could not introduce github.com/google/openrtb@0.8.0, as its subpackage github.com/google/openrtb/openrtb-core/src/main/protobuf does not contain usable Go code (*build.NoGoError).. (Package is required by (root).)
	0.7.3: Could not introduce github.com/google/openrtb@0.7.3, as its subpackage github.com/google/openrtb/openrtb-core/src/main/protobuf does not contain usable Go code (*build.NoGoError).. (Package is required by (root).)
	0.7.2: Could not introduce github.com/google/openrtb@0.7.2, as its subpackage github.com/google/openrtb/openrtb-core/src/main/protobuf does not contain usable Go code (*build.NoGoError).. (Package is required by (root).)
	0.7.1: Could not introduce github.com/google/openrtb@0.7.1, as its subpackage github.com/google/openrtb/openrtb-core/src/main/protobuf does not contain usable Go code (*build.NoGoError).. (Package is required by (root).)
	0.7.0: Could not introduce github.com/google/openrtb@0.7.0, as its subpackage github.com/google/openrtb/openrtb-core/src/main/protobuf does not contain usable Go code (*build.NoGoError).. (Package is required by (root).)
	0.6.6: Could not introduce github.com/google/openrtb@0.6.6, as its subpackage github.com/google/openrtb/openrtb-core/src/main/protobuf does not contain usable Go code (*build.NoGoError).. (Package is required by (root).)
	0.6.5: Could not introduce github.com/google/openrtb@0.6.5, as its subpackage github.com/google/openrtb/openrtb-core/src/main/protobuf does not contain usable Go code (*build.NoGoError).. (Package is required by (root).)
	0.6.4: Could not introduce github.com/google/openrtb@0.6.4, as its subpackage github.com/google/openrtb/openrtb-core/src/main/protobuf does not contain usable Go code (*build.NoGoError).. (Package is required by (root).)
	0.6.3: Could not introduce github.com/google/openrtb@0.6.3, as its subpackage github.com/google/openrtb/openrtb-core/src/main/protobuf does not contain usable Go code (*build.NoGoError).. (Package is required by (root).)
	0.6.2: Could not introduce github.com/google/openrtb@0.6.2, as its subpackage github.com/google/openrtb/openrtb-core/src/main/protobuf does not contain usable Go code (*build.NoGoError).. (Package is required by (root).)
	0.6.1: Could not introduce github.com/google/openrtb@0.6.1, as its subpackage github.com/google/openrtb/openrtb-core/src/main/protobuf does not contain usable Go code (*build.NoGoError).. (Package is required by (root).)
	0.6: Could not introduce github.com/google/openrtb@0.6, as its subpackage github.com/google/openrtb/openrtb-core/src/main/protobuf does not contain usable Go code (*build.NoGoError).. (Package is required by (root).)
	0.8.0-beta4: Could not introduce github.com/google/openrtb@0.8.0-beta4, as its subpackage github.com/google/openrtb/openrtb-core/src/main/protobuf does not contain usable Go code (*build.NoGoError).. (Package is required by (root).)
	0.8.0-beta3: Could not introduce github.com/google/openrtb@0.8.0-beta3, as its subpackage github.com/google/openrtb/openrtb-core/src/main/protobuf does not contain usable Go code (*build.NoGoError).. (Package is required by (root).)
	0.8.0-beta2: Could not introduce github.com/google/openrtb@0.8.0-beta2, as its subpackage github.com/google/openrtb/openrtb-core/src/main/protobuf does not contain usable Go code (*build.NoGoError).. (Package is required by (root).)
	0.8.0-beta: Could not introduce github.com/google/openrtb@0.8.0-beta, as its subpackage github.com/google/openrtb/openrtb-core/src/main/protobuf does not contain usable Go code (*build.NoGoError).. (Package is required by (root).)
	master: Could not introduce github.com/google/openrtb@master, as it is not allowed by constraint * from project districtm.ca/go-data/testrand.
	compat: Could not introduce github.com/google/openrtb@compat, as it is not allowed by constraint * from project districtm.ca/go-data/testrand.
	1.0.4.compat: Could not introduce github.com/google/openrtb@1.0.4.compat, as it is not allowed by constraint * from project districtm.ca/go-data/testrand.
	1.0.5.compat: Could not introduce github.com/google/openrtb@1.0.5.compat, as it is not allowed by constraint * from project districtm.ca/go-data/testrand.
	1.1.0.compat: Could not introduce github.com/google/openrtb@1.1.0.compat, as it is not allowed by constraint * from project districtm.ca/go-data/testrand.

Thank you.

@sdboyer
Copy link
Member

sdboyer commented Jun 6, 2017

hi, welcome, thanks for the issue!

so, code generation is one of the stickier areas with dep. we don't support any kind of arbitrary code evaluation; the closest thing to a discussion of it has been in #269, pursuant to cgo. for code generation, at least, this is in keeping with how the Go team originally outlined the ideas behind e.g. go generate - that's something that the publisher is supposed to do, not the consumer.

for this particular case, i'd probably take the approach of creating a repository that's derived from github.com/google/openrtb by creating some automation that go generates the protobuf you need, commits and pushes the results.

@amineck
Copy link
Author

amineck commented Jun 6, 2017

Sounds reasonable to me. Thank you very much for your time :)

@sdboyer sdboyer closed this as completed Jun 13, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants