Skip to content

[pull] master from stripe:master#301

Merged
pull[bot] merged 1 commit into
All-Blockchains:masterfrom
stripe:master
May 9, 2026
Merged

[pull] master from stripe:master#301
pull[bot] merged 1 commit into
All-Blockchains:masterfrom
stripe:master

Conversation

@pull

@pull pull Bot commented May 9, 2026

Copy link
Copy Markdown

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

…, and param files (#1855)

* Convert eager require to autoload for resources, services, and params

Replace ~985 eager require calls with Ruby's autoload in the three
generated barrel files (resources.rb, services.rb, params.rb). This
defers loading of resource classes, service classes, and param classes
until they are first referenced, rather than loading all of them on
require 'stripe'.

Add Stripe.eager_load! for production use — it walks the same file
list in the same order as the old require calls, so there are no
load-order surprises. A Railtie registers Stripe in
config.eager_load_namespaces so Rails calls eager_load! automatically
when config.eager_load is true (the production default).

On Ruby 4.0.2 / Apple M1:
- Boot time: 214ms -> 61ms (-71%)
- Object allocations: 193k -> 35k (-82%)
- Retained memory: 9.0 MB -> 1.4 MB (-85%)

Ref #1432

Co-authored-by: Claude <noreply@anthropic.com>

* Fix lint and typecheck CI failures

- Run rubocop autocorrect to fix line length, trailing whitespace, and
  argument alignment in autoload statements
- Exclude lib/stripe/params.rb from CollectionLiteralLength (generated
  list, same as existing event_types.rb exclusion)
- Add typed: ignore to railtie files since Rails isn't a Sorbet-visible
  dependency

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Committed-By-Agent: claude

* Regenerate resources, services, and params from updated codegen

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Committed-By-Agent: claude

* Remove redundant rubocop.yml exclusion for params.rb

The codegen now emits an inline rubocop:disable comment around the
PARAM_FILES array, making the .rubocop.yml file-level exclusion
unnecessary.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Committed-By-Agent: claude

---------

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Michael Broshi <mbroshi@stripe.com>
@pull pull Bot locked and limited conversation to collaborators May 9, 2026
@pull pull Bot added the ⤵️ pull label May 9, 2026
@pull pull Bot merged commit 5b973db into All-Blockchains:master May 9, 2026
9 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant