-
Notifications
You must be signed in to change notification settings - Fork 991
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Consider cutting down heavy dependencies #615
Comments
A thousand times this, please. |
FWIW, I got a 404 on that link - looks like the correct link is https://github.com/ridge/oauth2 (with a leading o) (I just ran into this exact problem thanks to |
The old module, github.com/golang/protobuf, has been deprecated a while, and the newer API has a slightly improved interface for the timestamp type as well, avoiding a potential error that needs to be handled (that we've traditionally ignored anyway in our own code). Note there is a remaining caller of the old module in Google's appengine module, which gets vendored in unnecessarily via x/oauth2 (golang/oauth2#615). In passing, update the protoc-gen-go tool as well to the version hosted in the new repository. Depends on pganalyze/collector-snapshot#30
@lfittl Thanks, updated. |
The old module, github.com/golang/protobuf, has been deprecated a while, and the newer API has a slightly improved interface for the timestamp type as well, avoiding a potential error that needs to be handled (that we've traditionally ignored anyway in our own code). Note there is a remaining caller of the old module in Google's appengine module, which gets vendored in unnecessarily via x/oauth2 (golang/oauth2#615). In passing, update the protoc-gen-go tool as well to the version hosted in the new repository. Depends on pganalyze/collector-snapshot#30
…382) The old module, github.com/golang/protobuf, has been deprecated a while, and the newer API has a slightly improved interface for the timestamp type as well, avoiding a potential error that needs to be handled (that we've traditionally ignored anyway in our own code). Note there is a remaining caller of the old module in Google's appengine module, which gets vendored in unnecessarily via x/oauth2 (golang/oauth2#615). In passing, update the protoc-gen-go tool as well to the version hosted in the new repository. Depends on pganalyze/collector-snapshot#30
Great idea!
|
However, in appengine Go 1.11, the refs: #334 |
This repo is actually no longer even buildable / testable with go1.11 (it requires go1.17+):
I opened https://go-review.googlesource.com/c/oauth2/+/570595 to drop the appengine gen 1 code which is no longer possible to exercise on those Go versions. |
Also opened googleapis/google-cloud-go#9545 which will make the cloud.google.com/go/compute/metadata dependency a zero-dep module. |
This library no longer builds on Go versions prior to Go 1.17, so no longer needs to support compilation specific to AppEngine environments on Go versions prior to Go 1.11 Related to #615 Change-Id: Ia9579ea2091cb86ee96065affb920370c4ba33ea Reviewed-on: https://go-review.googlesource.com/c/oauth2/+/570595 Reviewed-by: Matt Hickford <matt.hickford@gmail.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Cody Oss <codyoss@google.com> Run-TryBot: Matt Hickford <matt.hickford@gmail.com> TryBot-Result: Gopher Robot <gobot@golang.org>
Related #615 Related googleapis/google-cloud-go#9545 Change-Id: I762dc53c61204ec5103336dab6358b9b4d1337d4 GitHub-Last-Rev: 439c393 GitHub-Pull-Request: #719 Reviewed-on: https://go-review.googlesource.com/c/oauth2/+/579495 Reviewed-by: Cody Oss <codyoss@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> TryBot-Result: Gopher Robot <gobot@golang.org> Run-TryBot: Cody Oss <codyoss@google.com> Reviewed-by: Jordan Liggitt <liggitt@google.com>
This library no longer builds on Go versions prior to Go 1.17, so no longer needs to support compilation specific to AppEngine environments on Go versions prior to Go 1.11 Related to golang#615 Change-Id: Ia9579ea2091cb86ee96065affb920370c4ba33ea Reviewed-on: https://go-review.googlesource.com/c/oauth2/+/570595 Reviewed-by: Matt Hickford <matt.hickford@gmail.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Cody Oss <codyoss@google.com> Run-TryBot: Matt Hickford <matt.hickford@gmail.com> TryBot-Result: Gopher Robot <gobot@golang.org>
Related golang#615 Related googleapis/google-cloud-go#9545 Change-Id: I762dc53c61204ec5103336dab6358b9b4d1337d4 GitHub-Last-Rev: 439c393 GitHub-Pull-Request: golang#719 Reviewed-on: https://go-review.googlesource.com/c/oauth2/+/579495 Reviewed-by: Cody Oss <codyoss@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> TryBot-Result: Gopher Robot <gobot@golang.org> Run-TryBot: Cody Oss <codyoss@google.com> Reviewed-by: Jordan Liggitt <liggitt@google.com>
x/oauth2
has some churn due to security issues and changes in dependencies.However the dependencies of
x/oauth2
are not so set in stone:cloud.google.com/go
is required only for fetching GCE metadata. However the package for fetching metadata is pretty self-contained and can be pulled in.google.golang.org/appengine
is required only for Gen1 AppEngine. I haven't investigated how much code is actually used.After removal of these two dependencies, the rest is trivial:
(removed in e07593a)x/net
is used in one place to save 5 lines of code.google/go-cmp
is used in one test to save 11 lines of code.I currently maintain a dependency-less version of
x/oauth2
at https://github.com/ridge/oauth2. Here are the patches: master...ridge:oauth2:masterThe only feature loss is AppEngine Gen1 environment: for expediency I cut it out instead of figuring out if it can be retained.
The text was updated successfully, but these errors were encountered: