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

Add go.mod to support the new module system #689

Merged
merged 1 commit into from
Sep 4, 2018

Conversation

brandur
Copy link
Contributor

@brandur brandur commented Sep 4, 2018

Adds a go.mod file to support the new experimental Go module system
which is likely to see full release pretty soon.

See #559 for original context. I originally tried this in #563, but ran
into trouble because Vgo wasn't smart enough to have subpackages in a
module know to use their parent's version, so we'd see problems where
it'd use stripe-go v46 (for example), go on to look at stripe-go/charge,
see that it depended on stripe-go, so it would re-ascend the tree and
default to stripe-go v1 instead of v46! See #563 for details, but it
didn't work at all and I ended up just reverting.

Since then it seems like some major improvements have been made and
subpackages can now resolve their parents version correctly. (I tried
this in a test project and although I'm not 100% sure that it was doing
t he right thing because go.mod is not yet in GitHub's master, it
looked like it was working).

Also, the system has improved to the point where the /v46 path suffix
is no longer needed in vgo.mod which means that we don't even have to
updated our build scripts. That's great.

After this lands, I'll make sure to mess around it with a little more to
make sure everything looks like it's doing what expect.

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

Adds a `go.mod` file to support the new experimental Go module system
which is likely to see full release pretty soon.

See #559 for original context. I originally tried this in #563, but ran
into trouble because Vgo wasn't smart enough to have subpackages in a
module know to use their parent's version, so we'd see problems where
it'd use stripe-go v46 (for example), go on to look at stripe-go/charge,
see that it depended on stripe-go, so it would re-ascend the tree and
default to stripe-go v1 instead of v46! See #563 for details, but it
didn't work at all and I ended up just reverting.

Since then it seems like some major improvements have been made and
subpackages can now resolve their parents version correctly. (I tried
this in a test project and although I'm not 100% sure that it was doing
t he right thing because `go.mod` is not yet in GitHub's master, it
looked like it was working).

Also, the system has improved to the point where the `/v46` path suffix
is no longer needed in `vgo.mod` which means that we don't even have to
updated our build scripts. That's great.

After this lands, I'll make sure to mess around it with a little more to
make sure everything looks like it's doing what expect.
@ob-stripe
Copy link
Contributor

I'm 100% trusting you to check that this works as expected, but lgtm :)

@brandur-stripe
Copy link
Contributor

I'm 100% trusting you to check that this works as expected, but lgtm :)

Haha. I'll let you know. Thanks!

@brandur-stripe brandur-stripe merged commit c4b9ac3 into master Sep 4, 2018
@brandur-stripe brandur-stripe deleted the brandur-go-mod-round-2 branch September 4, 2018 20:06
@brandur-stripe
Copy link
Contributor

Released as 46.1.0.

nadaismail-stripe pushed a commit that referenced this pull request Oct 18, 2024
* Updated plan

* idempotent notes

* Break out prorated order amendment test

* Plan update

* Moving stripe price precision to a constant

* Core proration use case tests

* Initial working version of amendment helper logic

* Memoized price helper

* Only set sub term on products when we know it matches the billing frequency

* Initial take at add_invoice_items generation

* Improved price multiplier calculation

* todo docs update

* Allow error context to be called w/o state

* Some more debugging functions from working with cloudflare

* Calculate billing periods

I have a feeling we don't need this because of the cotermed thing

* Docs improvement

* Test expansion for standard amendment tests

* Refactoring CommonHelpers to namespace behind Critic

* Test factory updates, including lots of Stripe factories

* Using new stripe id generator

* Fixing bad boolean in order amendment logic

* Another round of expansions on the prorated order amendment logic

* Create customer with card helper

* Fixing price test comparison

* Fix error context typing error

* Typing fixes

* Fixing error context references

* Better logging on sync record creation

* Adjust order failures for improved order logic

* Fix sub term through quote error test

* Gracefully handle terminations

We can't prorate these!

* Logs so we know something isn't stalled out

* Centralize price equality logic, normalize decimal values

* extract out backend proration test and temp skipping it

* Another round of price equality fixes

* Fix for multiple quantity test

* Accept price param in metered billing

* Add idempotency keys to cancellation & update calls

* Use translate_product to get SF context

* Users could map invalid field values, use raw error

* Fix sync record tests

* Typing fix
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