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

Make Provider initialization sync again #3509

Open
arboleya opened this issue Dec 31, 2024 · 0 comments · May be fixed by #3514
Open

Make Provider initialization sync again #3509

arboleya opened this issue Dec 31, 2024 · 0 comments · May be fixed by #3514
Assignees
Labels
chore Issue is a chore

Comments

@arboleya
Copy link
Member

arboleya commented Dec 31, 2024

Looking back, I think making the Provider instantiation async may have been a mistake.

A few cons:

  • Unnatural / Non-Standard
  • Protected constructor
  • Requires the parent function/context to be async
  • Users have no control over when the first HTTP requests are made

Actions:

  • Remove Provider.create() method
  • Make initialization sync
  • Make constructor public
  • Delay loading chain configs until they're needed
  • Re-add Provider.create() method with a deprecation
@arboleya arboleya added the chore Issue is a chore label Dec 31, 2024
@arboleya arboleya self-assigned this Dec 31, 2024
@arboleya arboleya linked a pull request Jan 1, 2025 that will close this issue
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore Issue is a chore
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant