-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
code-generator is missing from this repo #6
Comments
Intentional? no. Known? yes. Godeps does not do it itself and the publisher does not fix it up (but could). |
Yep this is a bit of a tricky one right now - does Godeps support explicitly vendoring a package that the project doesn't actually depend upon? Even if we make the publisher do this, we need to make sure a |
An hack/update-godeps.sh could help I think. But I wonder whether we really have to protect the users from the vendoring tools so much. The published repo should of course work. But if users copy the code, they have to know their vendoring tool of choice. And yes, these are a pain in Goland. |
Another option is to create a dependency link between the generator and the sample repo with an empty import. Could that work? import _ "k8s.io/code-generator" |
Or |
Which means it must be aware of its branch and pick the right version. Don't like that either. We need a sane vendoring tool like dep that can reference extra repos. |
/meow |
In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
@sttts today |
You might be surprised soon ;) |
I am using dep to get started on a fork of this repo. Here's my config for vendoring the code generator (relies on dep v0.4.1+): required = [
"k8s.io/code-generator/cmd/client-gen"
]
[[constraint]]
name = "k8s.io/client-go"
version = "kubernetes-1.9.2"
[[constraint]]
name = "k8s.io/api"
version = "kubernetes-1.9.2"
[[constraint]]
name = "k8s.io/apimachinery"
version = "kubernetes-1.9.2"
[[constraint]]
name = "k8s.io/code-generator"
version = "kubernetes-1.9.2"
[prune]
non-go = true
go-tests = true
unused-packages = true
[[prune.project]]
name = "k8s.io/code-generator"
unused-packages = false
non-go = false
go-tests = false
[[prune.project]]
name = "k8s.io/gengo"
unused-packages = false
non-go = false
go-tests = false I haven't gotten to the point where everything is working so that may need to change some more. 😀 |
What is still missing? Am surprised that we have to disable pruning for required packages, at least the |
What I posted is a bit of a jenky hack to workaround golang/dep#1545 not being merged yet.
This is a temporary wart in dep hopefully. Long term, just the required should be sufficient. |
I didn't expect to do 5-7. I assumed that since this is a standalone repo, code generation should work ootb. Intentional?
@munnerz @sttts
The text was updated successfully, but these errors were encountered: