-
Notifications
You must be signed in to change notification settings - Fork 1k
Closed
Labels
dependenciesPull requests that update a dependency filePull requests that update a dependency file
Description
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:
- Heavy
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. - Heavy
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:master
The only feature loss is AppEngine Gen1 environment: for expediency I cut it out instead of figuring out if it can be retained.
hickford, sagikazarmark, pquerna, fserb, cespare and 7 moretrakhimenok and oxisto
Metadata
Metadata
Assignees
Labels
dependenciesPull requests that update a dependency filePull requests that update a dependency file
Activity
fserb commentedon Feb 15, 2023
A thousand times this, please.
lfittl commentedon Feb 25, 2023
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
go mod vendor
not supporting build constraints, and so even though the appengine file is marked "+build appengine" that doesn't prevent vendoring from pulling it in)Update from github.com/golang/protobuf to google.golang.org/protobuf
misha-ridge commentedon Feb 26, 2023
@lfittl Thanks, updated.
Update from github.com/golang/protobuf to google.golang.org/protobuf
Update from github.com/golang/protobuf to google.golang.org/protobuf (#…
hickford commentedon Sep 7, 2023
Great idea!
https://go-proverbs.github.io/
sg0hsmt commentedon Mar 9, 2024
google.golang.org/appengine
is imported from two files, both of which have theappengine
build tag set.However, in appengine Go 1.11, the
appengine
build tag is no longer used, so these files are now unused and the dependencies can be removed.refs: #334
liggitt commentedon Mar 11, 2024
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.
liggitt commentedon Mar 11, 2024
Also opened googleapis/google-cloud-go#9545 which will make the cloud.google.com/go/compute/metadata dependency a zero-dep module.
appengine: drop obsolete code for AppEngine envs <=Go 1.11
7 remaining items