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

Use the esplora client crate #764

Merged

Conversation

afilini
Copy link
Member

@afilini afilini commented Sep 28, 2022

Description

Use the external esplora client crate now that it's published

Changelog notice

  • Start using the external esplora client crate
  • Deprecate the use-esplora-reqwest and use-esplora-ureq features in favor of use-esplora-async and use-esplora-blocking

Checklists

All Submissions:

  • I've signed all my commits
  • I followed the contribution guidelines
  • I ran cargo fmt and cargo clippy before committing

New Features:

  • I've added tests for the new feature
  • I've added docs for the new feature

Bugfixes:

  • This pull request breaks the existing API
  • I've added tests to reproduce the issue which are now passing
  • I'm linking the issue being fixed by this PR

Cargo.toml Outdated
use-esplora-reqwest = ["esplora", "reqwest", "reqwest/socks", "futures"]
use-esplora-ureq = ["esplora", "ureq", "ureq/socks"]
use-esplora-reqwest = ["esplora", "esplora-client/async", "futures"]
use-esplora-ureq = ["esplora", "esplora-client/blocking"]
Copy link
Contributor

@tnull tnull Sep 28, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think keeping these names is a bit strange given the ureq/reqwest dependencies have been removed. Maybe these features could also be renamed use-esplora-async/use-esplora-blocking, while initially keeping the deprecated features around as aliases to not break compatibility?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I also like this idea. Add the new feature names, but keep the old ones around for a release with comment in Cargo.toml and we'll put in tag changelog that old feature names are deprecated.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apparently there's no way to deprecate a feature, should we just add a note to the changelog?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What you did with making the old ureq/reqwest features aliases for the new names is all I was expecting, plus adding your change log note.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In line with @tnull point, I was wondering if it doesn't also make sense to rename the ureq.rs and reqwest.rs file under the esplora module to blocking.rs and async.rs respectively.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did consider it but since the modules are not public it doesn't make any difference for the public API, so it's just an internal thing

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm, but doesn't that mean that there is even less of a reason not to clean it up?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, maybe, I personally don't mind but I'm not against cleaning it up either.

I replied like that because for some reason I though this PR had already been merged by Steve and so I thought it was too late to fix it and I didn't want to open another PR just for that. But since this is still open yeah I can do it!

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll do a quick re-review and merge it now. :-)

@afilini afilini force-pushed the feat/use-external-esplora-client branch 4 times, most recently from 7cee104 to 0e84361 Compare September 28, 2022 18:58
@afilini afilini force-pushed the feat/use-external-esplora-client branch from 0e84361 to 5f50be9 Compare September 28, 2022 19:08
Copy link
Member

@notmandatory notmandatory left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK 5f50be9

Copy link
Contributor

@tnull tnull left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, mod #764 (comment)

@afilini afilini force-pushed the feat/use-external-esplora-client branch from 5f50be9 to d7bfe68 Compare September 29, 2022 10:00
Copy link
Member

@notmandatory notmandatory left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK d7bfe68

@notmandatory notmandatory merged commit 8e8fd49 into bitcoindevkit:master Sep 29, 2022
@afilini afilini mentioned this pull request Oct 7, 2022
24 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

4 participants