-
Notifications
You must be signed in to change notification settings - Fork 68
Clean up proxy feature
#182
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
ValuedMammal
wants to merge
5
commits into
bitcoindevkit:master
Choose a base branch
from
ValuedMammal:build/feature_proxy
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Clean up proxy feature
#182
ValuedMammal
wants to merge
5
commits into
bitcoindevkit:master
from
ValuedMammal:build/feature_proxy
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Before, the `client` module was gated on the "proxy" feature, which caused unnecessary coupling since proxy is only required for the Socks5 client type. This change removes the client module's dependency on the "proxy" feature in favor of more precise feature gating of the Socks5 client type and related functions calling into the `socks` module. Note that `Client` still requires a TLS backend to be enabled by one of "use-openssl", "use-rustls" or "use-rustls-ring".
The "default" feature argument is redundant and unclear, as it requires the developer to know which aspects of the default features apply to a particular cfg attribute. This change simplifies feature gating logic by only requiring the features necessary to build with a given feature set.
Introduce simpler feature names "openssl", "rustls", and "rustls-ring". The original "use-" style names are still available for backwards compatibility.
925a9f6 to
ce7a0eb
Compare
Removes conditional compilation of `ElectrumApi::calls_made`. As a result the `debug-calls` feature flag is also removed.
Contributor
oleonardolima
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
utACK 51cfd77
| - run: cargo check --verbose --no-default-features --features=proxy | ||
| - run: cargo check --verbose --no-default-features --features=minimal | ||
| - run: cargo check --verbose --no-default-features --features=minimal,debug-calls | ||
| - run: cargo check --verbose --no-default-features --features=debug-calls |
Contributor
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
awesome! thanks for removing it 😁
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR is meant to streamline the handling of feature flags in the library, in particular by removing the Client's dependency on the
proxyfeature and overall simplifying the feature gating logic. Additionally, we move away from the olduse-*feature naming convention by introducing simpler feature names, remove the unusedminimalfeature, and get rid of conditional compilation fordebug-callswhile retaining the ability to atomically count calls made.fixes #91
fixes #42