Giter Site home page Giter Site logo

Comments (13)

k8s-ci-robot avatar k8s-ci-robot commented on August 16, 2024 6

@Kargakis: cat image

In response to this:

/meow

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.

from sample-controller.

sttts avatar sttts commented on August 16, 2024 2

dep is unlike to be used anytime soon.

You might be surprised soon ;)

from sample-controller.

0xmichalis avatar 0xmichalis commented on August 16, 2024 1

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"

from sample-controller.

sttts avatar sttts commented on August 16, 2024

Intentional?

Intentional? no. Known? yes. Godeps does not do it itself and the publisher does not fix it up (but could).

from sample-controller.

munnerz avatar munnerz commented on August 16, 2024

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 godeps save ./... in future doesn't wipe out the code-generator dependency (thinking about end-users who might copy and paste this repo to start their own)

from sample-controller.

sttts avatar sttts commented on August 16, 2024

(thinking about end-users who might copy and paste this repo to start their own)

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.

from sample-controller.

0xmichalis avatar 0xmichalis commented on August 16, 2024

Or hack/update-codegen.sh can ensure the generator is cloned in the directory it expects to find it.

from sample-controller.

sttts avatar sttts commented on August 16, 2024

Or hack/update-codegen.sh can ensure the generator is cloned in the directory it expects to find it.

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.

from sample-controller.

0xmichalis avatar 0xmichalis commented on August 16, 2024

/meow

from sample-controller.

0xmichalis avatar 0xmichalis commented on August 16, 2024

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.

@sttts today code-generator and sample-controller follow the release branches of kubernetes/kubernetes. Unless that is going to change in the future, I think hack/update-codegen.sh should try to checkout the same branch in code-generatorthat is already checkout out in sample-controller when the script runs. Seems like a viable short-term fix, dep is unlike to be used anytime soon.

from sample-controller.

carolynvs avatar carolynvs commented on August 16, 2024

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. 😀

from sample-controller.

sttts avatar sttts commented on August 16, 2024

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 unused-packages = false part.

from sample-controller.

carolynvs avatar carolynvs commented on August 16, 2024

What I posted is a bit of a jenky hack to workaround golang/dep#1545 not being merged yet.

  • The root of code-generator package doesn't contain go code, so dep is currently not letting me require it. As a workaround I am requiring a subpackage (cmd/codegen).
  • The extra project level prune settings tell dep to not remove the root package contents. Dep thinks the root project is unused because I wasn't able to require the root project.

This is a temporary wart in dep hopefully. Long term, just the required should be sufficient.

from sample-controller.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.