Skip to content

Consider cutting down heavy dependencies #615

Closed
@misha-ridge

Description

@misha-ridge

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:
  • x/net is used in one place to save 5 lines of code. (removed in e07593a)
  • 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    dependenciesPull requests that update a dependency file

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions