Skip to content
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

Start using Go Modules #1061

Merged
merged 2 commits into from
Apr 16, 2020
Merged

Start using Go Modules #1061

merged 2 commits into from
Apr 16, 2020

Conversation

brandur
Copy link
Contributor

@brandur brandur commented Apr 10, 2020

Similar to the original implementation for Go Modules in #712, here we
add a go.mod and go.sum, then proceed to use Go Modules style
import paths everywhere that include the current major revision.

Unfortunately, this may still cause trouble for Dep users who are trying
to upgrade stripe-go, but the project's now had two years to help its
users with basic Go Module awareness, and has chosen not to do so. It's
received no commits of any kind since August 2019, and therefore would
be considered unmaintained by most definitions. Elsewhere, Go Modules
now seem to be the only and obvious way forward, so we're likely to see
more and more users on them.

scripts/check_api_clients/main.go is also updated to be smarter about
breaking down package paths which may now include the major.

Caveats:

  • Go Coverage in tip is broken, and it wasn't immediately obvious to me
    why. We can probably get this fixed at our leisure though because it's
    marked as an allowed failure in the build.

  • We still need a solution to put the major version import into the API
    reference docs. I can probably figure something out there next week.

r? @remi-stripe
cc @stripe/api-libraries

[1] golang/dep#1963


Note: Targets the branch in #1055 for V71 integration.

@brandur brandur mentioned this pull request Apr 10, 2020
7 tasks
@brandur-stripe
Copy link
Contributor

As suggested by Remi, just pushed one more commit that brings this back to v70 so that we can test that our release script works properly when the time comes.

Similar to the original implementation for Go Modules in #712, here we
add a `go.mod` and `go.sum`, then proceed to use Go Modules style
import paths everywhere that include the current major revision.

Unfortunately, this may still cause trouble for Dep users who are trying
to upgrade stripe-go, but the project's now had two years to help its
users with basic Go Module awareness, and has chosen not to do so. It's
received no commits of any kind since August 2019, and therefore would
be considered unmaintained by most definitions. Elsewhere, Go Modules
now seem to be the only and obvious way forward, so we're likely to see
more and more users on them.

`scripts/check_api_clients/main.go` is also updated to be smarter about
breaking down package paths which may now include the major.

[1] golang/dep#1963
Move back down to current major version so that we can test that our
release script will bump it to v71 properly when the time comes.
@remi-stripe
Copy link
Contributor

This was rebased on the latest integration-v71 and we can now merge

@remi-stripe remi-stripe merged commit 83fd011 into integration-v71 Apr 16, 2020
@remi-stripe remi-stripe deleted the brandur-go-modules branch April 29, 2020 23:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants