Coder Social home page Coder Social logo

Comments (3)

opalmer avatar opalmer commented on June 15, 2024

Oddly enough, I came the same issue a few days ago because one of the instances of Gerrit that I manage uses several custom labels (which of course don't work with this struct).

I think using a map makes the most sense and would certainly be the route I would have taken if I had written the first implementation of Labels. But this is an existing struct so changing the implementation rather than say adding to it or changing how it's built, while not removing fields, would probably cause issues for consumers of go-gerrit.

I'm not certain what the best approach to fix and need to do some research but I'm certainly open to other suggestions. For now the ideas I have are:

  • Create a new field on Labels to hold non-standard labels.
  • Update the labels struct with functions to query non-standard labels
  • Dynamically construct all fields on the struct (last I checked there are a few libraries out there that might be able to do this for us).

from go-gerrit.

andygrunwald avatar andygrunwald commented on June 15, 2024

At the point of implementation i didn`t know that custom labels are possible.
This is, of course, a bug (or a missing feature, depends on the point of view).

I like the first two options.
But i want to mention a third option:

  1. Tag the current version
  2. Do the breaking change by changing this to a map

I know this is not beautiful, but if we mark this as a new tag + write down the change in the ChangeLog this should be fine (i hope that all consumers are using vendoring).
What do you think @opalmer and @perolausson?

from go-gerrit.

opalmer avatar opalmer commented on June 15, 2024

Yeah that's kind of the direction I was thinking actually. I can't really see any other better way in terms of implementation complexity or ease of use. Good thing we can tag releases now haha.

Once #22 lands we can tag 0.1.1.

from go-gerrit.

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.