Giter Site home page Giter Site logo

Add tagged releases about go-genproto HOT 8 CLOSED

googleapis avatar googleapis commented on August 17, 2024
Add tagged releases

from go-genproto.

Comments (8)

thepudds avatar thepudds commented on August 17, 2024 2

Here is the way I would look at it personally:

  1. Modules are required to follow semver in order for the go command to behave as documented.
  2. Modules that do not have semver tags are recorded by consumers using a semver version in the form of a pseudo-version. (Typically this will be a v0 major version, unless the module author constructed a v2+ module following the "Major Subdirectory" approach).
  3. Hence, modules that do not apply semver tags and have not created a "Major Subdirectory" are effectively declaring themselves to be in the semver v0 major version series.

Sidenote: as far as I am aware, semver draws a distinction between semver, a semver version, and a semver VCS tag (the last of which is not covered by the spec itself but is mentioned in an unpublished FAQ on master. There’s more that could be said on that, but it gets progressively less interesting…).

from go-genproto.

jeanbza avatar jeanbza commented on August 17, 2024

Thanks for filing this. We only plan to use modules for dependency management in this repo, and don't plan to tag.

This is due to the fact that this repo is only used for auto-generated code and that the HEAD commit is always the most relevant (since this is the definition that's used by APIs deployed to prod). As such cloud.google.com/go always depends on the latest version of genproto. (you're likely getting an older version because grpc-go depends on an older version of cloud.google.com/go)

Therefore, the overhead of maintaining versions, release notes, and multi-module repositories down the line is not worth the little gain that the readability of versions provide.

it's hard to reason about what version of go-genproto I'm using because there are no tagged releases.

Ideally you should not have to: always use the latest version by way of go get -u. Let us know if for some reason you do need to reason about versions, though.

from go-genproto.

jsha avatar jsha commented on August 17, 2024

Here's an example of where I need to reason about versions: My package's current go.mod contains:

google.golang.org/genproto v0.0.0-20180518175338-11a468237815

When I run go mod verify, this line changes to:

google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8

Did the version go up or down? I have to check out the repository and run git show twice to find out. If that was a tagged version, it would be very easy and quick to see.

Therefore, the overhead of maintaining versions, release notes, and multi-module repositories down the line is not worth the little gain that the readability of versions provide.

I don't think there's any need to provide release notes, and certainly not multi-module repositories. My use case would be met with a simple git tag v1.0.0 and an occasional re-tag like get tag v1.0.1, git tag v1.0.123, etc.

For what it's worth, the current Go documentation treats version tagging as a requirement:

As a result of Semantic Import Versioning, code opting in to Go modules must comply with these rules:
Follow semver (with tags such as v1.2.3).

from go-genproto.

jeanbza avatar jeanbza commented on August 17, 2024

Version tagging is a requirement for semver. We expressly do not support semver, or versions in general. Note that this approach is followed by a large number of repositories including all x/* repos.

And, thanks for providing an example. However, the answer to having to think about which version of genproto to use is always go get -u. As mentioned, HEAD is what's actually deployed, and therefore always the best choice of what to use. :)

from go-genproto.

jsha avatar jsha commented on August 17, 2024

Version tagging is a requirement for semver. We expressly do not support semver, or versions in general.

Interesting. My reading of that documentation suggests that version tagging and semver are considered requirements for "code opting in to Go modules." Should I file a ticket to change the docs?

Note that this approach is followed by a large number of repositories including all x/* repos.

I also recently filed a ticket for that: golang/go#31371. :-)

from go-genproto.

jeanbza avatar jeanbza commented on August 17, 2024

Oh, sorry, I didn't read your link properly. Yes, you're totally right, that wiki expressly states (stated) that modules must follow semver. I've updated the wiki to be a bit less strict and note the fact that semver is not required.

Note: that wiki is community run. It is close, but not exactly canonical documentation.

from go-genproto.

jeanbza avatar jeanbza commented on August 17, 2024

Quick update: @thepudds wisely points out that cmd/go doc also heavily implies semver is required: https://golang.org/cmd/go/#hdr-Module_compatibility_and_semantic_versioning

The go command requires that modules use semantic versions

We're discussing how best to tackle this quirk. :)

from go-genproto.

jeanbza avatar jeanbza commented on August 17, 2024

Welp, looks like the semver requirement is correct, but pseudo-versions are semver. 😆 My fault! Pulling back the doc change with a small amendment.

All that said, unfortunately the point remains that this repo will continue using pseudo-versions.

from go-genproto.

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.