Comments (8)
Here is the way I would look at it personally:
- Modules are required to follow semver in order for the go command to behave as documented.
- 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).
- 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.
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.
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.
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.
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.
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.
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.
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)
- Adding googleads API HOT 2
- add ai/generativelanguage types HOT 6
- Eliminate use of alias field_mask package HOT 3
- onboard onto owlbot
- [Policy Bot] found one or more issues with this repository. HOT 1
- New submodules: upgrade before 2024-03-01 to avoid ambiguous import errors with google.golang.org/genproto HOT 4
- [Policy Bot] found one or more issues with this repository. HOT 1
- Please generate these files with google.golang.org/grpc/cmd/protoc-gen-go-grpc HOT 5
- Licence examples causing hits on FOSSA.com HOT 3
- How do we trigger a regeneration of Go from updated protobuf files? HOT 2
- Adding AuthorizationHeader to the HttpRequest type does not append an Authorization header HOT 5
- Missing SearchRelatedAccountGroupMembershipsRequest.GetParent() implementation. HOT 2
- ci: reenable apidiff workflow once multi-package execution is fixed
- ci: Skip apidiff for newly added packages
- Unable to unmarshal `Document` due to orientation is outputted as string `PAGE_UP` HOT 7
- update go.mod to 1.17
- Use of the repo not clear HOT 1
- Add support for Datastore COUNT (aggregation) query HOT 1
- Different types between this repo and Bazel HOT 1
- go build should run all versions, not just latest HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from go-genproto.