8000 Next tracking branch by arlyon · Pull Request #526 · arlyon/async-stripe · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Next tracking branch #526

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

Open
wants to merge 75 commits into
base: master
Choose a base branch
from
Open

Next tracking branch #526

wants to merge 75 commits into from

Conversation

arlyon
Copy link
Owner
@arlyon arlyon commented Apr 4, 2024

Monomorphisation is dead. Long live ______

Tracking PR for async-stripe next which addresses longstanding codegen issues from time immemorial and fixes our compile time issues.

Outstanding:

  • miniserde
  • splitting out clients
  • testing
  • polish

It is intended that this branch become the basis for a release candidate for 1.0

mzeitlin11 and others added 7 commits March 19, 2024 21:12
commit 88d7dbc
Author: Matthew Zeitlin <37011898+mzeitlin11@users.noreply.github.com>
Date:   Sun Jan 7 15:00:26 2024 -0500

    Use OpenAPI definitions in webhook event definition

commit 6adf3f9
Author: Matthew Zeitlin <37011898+mzeitlin11@users.noreply.github.com>
Date:   Fri Jan 5 15:01:03 2024 -0800

    Remove unnecessary test closure

commit c3e3c8f
Author: Matthew Zeitlin <37011898+mzeitlin11@users.noreply.github.com>
Date:   Fri Jan 5 12:59:07 2024 -0800

    Remove AsRef<str> generated impl for enums

commit 8157122
Author: Matthew Zeitlin <37011898+mzeitlin11@users.noreply.github.com>
Date:   Thu Dec 28 12:45:11 2023 -0500

    Fix polymorphic returned types, add test

commit 4b4f493
Author: Matthew Zeitlin <37011898+mzeitlin11@users.noreply.github.com>
Date:   Wed Dec 27 15:57:14 2023 -0500

    Deduplication WIP

commit acc796e
Author: Matthew Zeitlin <37011898+mzeitlin11@users.noreply.github.com>
Date:   Tue Dec 26 14:24:59 2023 -0500

    Clean update some codegen, start adding back dedup

commit e09c203
Author: Matthew Zeitlin <37011898+mzeitlin11@users.noreply.github.com>
Date:   Sat Dec 23 15:33:37 2023 -0500

    DOC: fix cases of crazy-long lines in doc comments

commit 3009c49
Author: Matthew Zeitlin <37011898+mzeitlin11@users.noreply.github.com>
Date:   Sat Dec 23 13:59:38 2023 -0500

    Try to flatten the namespace as much as possible

commit feb13c4
Author: Matthew Zeitlin <37011898+mzeitlin11@users.noreply.github.com>
Date:   Sat Dec 23 11:47:48 2023 -0500

    Add test for charge having nullable refunds

commit d8a2dec
Author: Matthew Zeitlin <37011898+mzeitlin11@users.noreply.github.com>
Date:   Sat Dec 23 11:33:51 2023 -0500

    List<T> -> Option<List<T>>, no more List<T> defaults

commit 3abe2e6
Author: Matthew Zeitlin <37011898+mzeitlin11@users.noreply.github.com>
Date:   Fri Dec 22 13:00:18 2023 -0500

    Patch URLFinder handling

commit 00c139c
Author: Matthew Zeitlin <37011898+mzeitlin11@users.noreply.github.com>
Date:   Fri Dec 22 12:04:16 2023 -0500

    Reintegrate search pagination too, add lots more pagination testing

commit ccb9570
Author: Matthew Zeitlin <37011898+mzeitlin11@users.noreply.github.com>
Date:   Sun Dec 17 16:31:39 2023 -0500

    Add back AsCursor trait and clean up Expandable removed id method

commit 9930853
Author: Matthew Zeitlin <37011898+mzeitlin11@users.noreply.github.com>
Date:   Sun Dec 17 16:00:16 2023 -0500

    Workaround stripe docs change, don't require doc urls

commit b279dcb
Author: Matthew Zeitlin <37011898+mzeitlin11@users.noreply.github.com>
Date:   Sun Dec 17 15:53:17 2023 -0500

    Keep  simple, relegate more generated code to specific generated crates

commit 0a4ae20
Author: Matthew Zeitlin <37011898+mzeitlin11@users.noreply.github.com>
Date:   Sun Dec 10 14:28:28 2023 -0500

    Add initial README changes, migration guide

commit 8e2f641
Author: Matthew Zeitlin <37011898+mzeitlin11@users.noreply.github.com>
Date:   Sun Dec 10 10:50:47 2023 -0500

    Update contributing docs and add codegen readme

commit f7a0999
Author: Matthew Zeitlin <37011898+mzeitlin11@users.noreply.github.com>
Date:   Sun Dec 3 20:00:16 2023 -0500

    [skip ci] Add readme to examples directory

commit 11d80e6
Author: Matthew Zeitlin <37011898+mzeitlin11@users.noreply.github.com>
Date:   Sun Dec 3 19:41:57 2023 -0500

    Clean up some codegen, add ability to autogenerate generated crate description

commit a6bba63
Author: Matthew Zeitlin <37011898+mzeitlin11@users.noreply.github.com>
Date:   Sun Dec 3 13:10:20 2023 -0500

    Make webhook examples more easily runnable without features

commit cfb4fd0
Author: Matthew Zeitlin <37011898+mzeitlin11@users.noreply.github.com>
Date:   Fri Dec 1 12:59:10 2023 -0500

    Address initial comments and fix openapi clippy

commit 975440d
Author: Matthew Zeitlin <37011898+mzeitlin11@users.noreply.github.com>
Date:   Thu Nov 30 15:16:06 2023 -0500

    Add some manual renaming to lessen breaking changes / use clearer names

commit 8c04938
Author: Matthew Zeitlin <37011898+mzeitlin11@users.noreply.github.com>
Date:   Thu Nov 30 14:52:16 2023 -0500

    Remove rustfmt hack for stripe_treasury long lines

commit 30eb3c1
Author: Matthew Zeitlin <37011898+mzeitlin11@users.noreply.github.com>
Date:   Thu Nov 30 14:48:16 2023 -0500

    Try using just path to infer object struct name

commit b7630f9
Author: Matthew Zeitlin <37011898+mzeitlin11@users.noreply.github.com>
Date:   Thu Nov 30 12:35:03 2023 -0500

    Make sure nested paths are also reexported so don't need stripe_types

commit c402ad9
Author: Matthew Zeitlin <37011898+mzeitlin11@users.noreply.github.com>
Date:   Thu Nov 30 12:04:22 2023 -0500

    Allow codegen to replace Default::default() -> None for common option case

commit 12db0bc
Author: Matthew Zeitlin <37011898+mzeitlin11@users.noreply.github.com>
Date:   Sun Nov 26 17:57:26 2023 -0500

    Add examples back to CI

commit 30673e9
Author: Matthew Zeitlin <37011898+mzeitlin11@users.noreply.github.com>
Date:   Sun Nov 26 15:23:29 2023 -0500

    Quiet some tracing, make sure nightly formatting present for CI

commit 3c817c8
Author: Matthew Zeitlin <37011898+mzeitlin11@users.noreply.github.com>
Date:   Sun Nov 26 15:17:15 2023 -0500

    Ci fixups: async-std tests + don't expect out dir to exist

commit 9836631
Author: Matthew Zeitlin <37011898+mzeitlin11@users.noreply.github.com>
Date:   Sun Nov 26 15:08:50 2023 -0500

    Keep examples separate in ci for now

commit 18c4348
Author: Matthew Zeitlin <37011898+mzeitlin11@users.noreply.github.com>
Date:   Sun Nov 26 15:02:39 2023 -0500

    Make CI use same indexmap versions

commit 168eeda
Author: Matthew Zeitlin <37011898+mzeitlin11@users.noreply.github.com>
Date:   Sun Nov 26 14:59:14 2023 -0500

    Try to fix gh actions

commit 1f83a15
Author: Matthew Zeitlin <37011898+mzeitlin11@users.noreply.github.com>
Date:   Sun Nov 26 14:24:26 2023 -0500

    Add more tests for closable issues

commit 0b46685
Author: Matthew Zeitlin <37011898+mzeitlin11@users.noreply.github.com>
Date:   Sun Nov 26 12:40:40 2023 -0500

    Make id inference safer and more correct

commit 0b958dc
Author: Matthew Zeitlin <37011898+mzeitlin11@users.noreply.github.com>
Date:   Sun Nov 26 11:02:44 2023 -0500

    Add some testing

commit 1026ea5
Author: Matthew Zeitlin <37011898+mzeitlin11@users.noreply.github.com>
Date:   Sun Nov 26 10:56:16 2023 -0500

    Move id handling to external mappings file

commit 99d3fa5
Author: Matthew Zeitlin <37011898+mzeitlin11@users.noreply.github.com>
Date:   Sun Nov 26 00:20:43 2023 -0500

    Remove no longer used generated code

commit aa9e78c
Author: Matthew Zeitlin <37011898+mzeitlin11@users.noreply.github.com>
Date:   Sat Nov 25 20:34:03 2023 -0500

    Migrate git workflows

commit 6e1b11e
Author: Matthew Zeitlin <37011898+mzeitlin11@users.noreply.github.com>
Date:   Sat Nov 25 20:30:07 2023 -0500

    Migrate old examples, add back from branch

commit 02ba0fa
Author: Matthew Zeitlin <37011898+mzeitlin11@users.noreply.github.com>
Date:   Sat Nov 25 17:53:52 2023 -0500

    Migrate old tests, add back from branch

commit 6ff0bac
Author: Matthew Zeitlin <37011898+mzeitlin11@users.noreply.github.com>
Date:   Sat Nov 25 16:58:03 2023 -0500

    Add generated files and webhook crate

commit 50afbe3
Author: Matthew Zeitlin <37011898+mzeitlin11@users.noreply.github.com>
Date:   Sat Nov 25 16:47:14 2023 -0500

    Add codegen changes

commit edea437
Author: Matthew Zeitlin <37011898+mzeitlin11@users.noreply.github.com>
Date:   Sat Nov 25 13:53:40 2023 -0500

    Remove extra files

commit 25077cb
Author: Matthew Zeitlin <37011898+mzeitlin11@users.noreply.github.com>
Date:   Sat Nov 25 13:49:41 2023 -0500

    Stripe client changes + core types crate

More merge changes
Copy link
codecov bot commented Apr 4, 2024

Codecov Report

Attention: Patch coverage is 19.83881% with 3879 lines in your changes are missing coverage. Please review.

Project coverage is 25.62%. Comparing base (c165e2c) to head (020065b).
Report is 167 commits behind head on master.

❗ Current head 020065b differs from pull request most recent head ba6f20d. Consider uploading reports for the commit ba6f20d to get more accurate results

Files Patch % Lines
...d/stripe_billing/src/subscription_item/requests.rs 0.00% 454 Missing ⚠️
.../src/checkout_acss_debit_payment_method_options.rs 0.00% 193 Missing ⚠️
...heckout/src/checkout_acss_debit_mandate_options.rs 0.00% 192 Missing ⚠️
...stripe_billing/src/billing_portal_session/types.rs 31.57% 156 Missing ⚠️
...er_balance_bank_transfer_payment_method_options.rs 0.00% 156 Missing ⚠️
...heckout_customer_balance_payment_method_options.rs 0.00% 138 Missing ⚠️
generated/stripe_billing/src/plan/requests.rs 8.33% 121 Missing ⚠️
generated/stripe_billing/src/portal_flows_flow.rs 0.00% 106 Missing ⚠️
...eckout/src/checkout_card_payment_method_options.rs 0.00% 106 Missing ⚠️
..._billing/src/portal_flows_flow_after_completion.rs 0.00% 95 Missing ⚠️
... and 45 more
Additional details and impacted files
@@             Coverage Diff             @@
##           master     #526       +/-   ##
===========================================
+ Coverage    5.83%   25.62%   +19.78%     
===========================================
  Files         146      934      +788     
  Lines       22571    99872    +77301     
===========================================
+ Hits         1317    25592    +24275     
- Misses      21254    74280    +53026     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

mzeitlin11 and others added 22 commits April 5, 2024 13:37
Simplify client, remove some allocations
Add fixture testing and serialize object keys

Fix object keys in tests

Add object field for serialization without adding field

Split serde gate into serialize and deserialize
Implement miniserde-based deserialization
Enum generated FromStr improvements
* Rebase

Update codegen code

wip

wip

* Fix doc build

* stripe_* to async-stripe-* crate naming

* Reexport async-stripe-std from root

* Add updated workflow
A call to tracing:: was added on #576
but the dependency seems to be missing, which causes the branch to not
compile at the moment.
fix(client-core): add tracing dependency
Rust 1.80 enables check cfg by default. This means that it will look
for unexpected cfg configs.
Currently we are using multiple cfgs that are not defined on
the webhook Cargo.toml. This should fix it.
mzeitlin11 and others added 16 commits February 9, 2025 13:01
Make sure CI pins rust version in all jobs
http crate does not allow uppercase characters in header name and it was
causing crashes when hitting thing branch with error "index out of
bounds."

The error should happen at compile time, but for some reason the
HeaderName::from_static was executed at runtime, so this commit forces
it to be executed at compile time by extracing it into the const.

Signed-off-by: Robin Ilyk <contact@robko.cz>
idempotency key cannot be empty and cannot be longer than 255 characters
and having asserts before their usage is not the best error handling
strategy. having it in a newtype guarantees that every use of this key
is valid and no assert or runtime panic is needed.

Refs: #662 (comment)
Refs: #662 (comment)
Refs: https://docs.stripe.com/api/idempotent_requests
Signed-off-by: Robin Ilyk <contact@robko.cz>
small functional improvements
Co-authored-by: Geoffry Song <goffrie@gmail.com>
Bump to hyper1 and associated deps
fix(webhook): Correctly enable serialize feature on all enabled crates
feat(async-stripe-core): Create newtype for idempotency key
@Folyd
Copy link
Folyd commented Mar 27, 2025

Thanks for working on async-stripe. Just wondering any roadmap or timeline to release the 1.0?

@arlyon
Copy link
Owner Author
arlyon commented Apr 8, 2025

I am going to (finally) get an alpha up this week 👨‍💻🎉

F438
@arlyon
Copy link
Owner Author
arlyon commented Apr 21, 2025

OK this took a little longer since versioning is a pain (part-codegen, part cargo.toml). 1 version for the whole workspace seems to be the only solution. Will have it published in the morning

@arlyon
Copy link
Owner Author
arlyon commented Apr 22, 2025

@Folyd 1.0.0-alpha.2 is published now (alpha.0 and alpha.1 had issues that were discovered only part-way through the publishing process). List of crates here: https://crates.io/search?q=async-stripe-&sort=new

I will email crates.io about getting the rate limits raised since they are currently in the way of automated releases

@Folyd
Copy link
Folyd commented May 9, 2025

1.0.0-alpha.2 works good for me, however, it lack some fields for Invoice, can we fix this in the next alpha version?
See #699

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants
0