Giter VIP home page Giter VIP logo

Comments (9)

9len avatar 9len commented on June 3, 2024 1

i've no clue about bazel, but i'm think that shouldn't be a hard work to get going.

It's not hard work, but neither is it exactly easy.

I think there are really two use cases to consider:

  1. library consumers
  2. library contributors

For (1) I think it's pretty important to keep bazel out of the mix, for reasons we've previously discussed (TL;DR go libs should play nice with the standard go toolchain), so I'd definitely advocate for checking in the generated code, and considering it part of the library.

For (2), I think you can make the claim that the generated code should only change when something in data-plane-api changes; might it makes sense to make code generation part of that build/check-in process, producing a package that can then be vendored by go-control-plane? That keeps the bazelness associated with api changes constrained to a place that already requires it.

Just my 2¢.

from go-control-plane.

kyessenov avatar kyessenov commented on June 3, 2024

Relevant read:

from go-control-plane.

davecheney avatar davecheney commented on June 3, 2024

from go-control-plane.

roadrunner avatar roadrunner commented on June 3, 2024

@kyessenov check out the protobuild package. docker swarm using the same approach as well.
example implementation https://github.com/containerd/containerd

from go-control-plane.

9len avatar 9len commented on June 3, 2024

looks like a much cleaner interface.

from go-control-plane.

kyessenov avatar kyessenov commented on June 3, 2024

@roadrunner envoy API is using bazel for canonical build system. so all the gogoproto annotations and codegen will need to be wired through bazel (for better or worse).

from go-control-plane.

roadrunner avatar roadrunner commented on June 3, 2024

@kyessenov, in my company, we use makefile pretty much for all stuff like the build / test / gen.
i've no clue about bazel, but i'm think that shouldn't be a hard work to get going.

as long as proto files are not changed, you don't need to invoke the generation process.

generating go code from the proto files might be done manually, ie: make protos or go list ./... | grep -v vendor | xargs protobuild

some developers prefer the generation process manually, like;
(re)generate -> modify -> check-in -> release

others preferer CI pipelines, like;
modify protos -> check-in -> (ci hooks) (re)generate -> auto commit / tag generated

from go-control-plane.

davecheney avatar davecheney commented on June 3, 2024

from go-control-plane.

kyessenov avatar kyessenov commented on June 3, 2024

I encourage folks to add gogoproto annotations in data-plane-api where it makes sense (e.g. nullable, stdduration). I didn't do a full revision, but things will be discovered as we use xDS.

The generation script is mostly automated. I can run it once in awhile manually, since it's fairly simple. Doing automatic multi-repo sync is painful, as we observed first-hand in istio.

from go-control-plane.

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.