Skip to content

Conversation

tcharding
Copy link
Member

Wildcards make it hard to grep for where stuff comes from, explicit imports and re-exports are ... more explicit.

  • Patch 1: Re-export the context types explicitly.
  • Patch 2: Re-export the key types explicitly.

Fix: #681

@sanket1729
Copy link
Member

ACK modulo CI

@apoelstra
Copy link
Member

Looks like CI is red because of formatting.

@tcharding
Copy link
Member Author

Ran the formatter, no other changes.

@sanket1729
Copy link
Member

Ah, sanitizers again :)

@tcharding
Copy link
Member Author

tcharding commented Mar 26, 2024

Are you ok to merge this with the ASAN fail @apoelstra or do you want me to disable ASAN in this repo as well?

EDIT: I just did #687

@tcharding
Copy link
Member Author

No acks so rebasing to get up to date with master branch.

@apoelstra
Copy link
Member

So, in #656 we added a "check for changes to the public API" script but it looks like we have failed to CI-enforce this. Therefore this PR is unnecessarily hard to check. I think, for one, that you are losing a reexport of crate::context::global at the root.

Can you open a PR to run the API script (there are a bunch of changes even on master) and to CI-check this, then rebase this PR on that?

@tcharding
Copy link
Member Author

Yep sure thing.

The `just` command makes scripts and commands discoverable for new devs
and old devs alike when switching between repos.

Add a justfile copied from bitcoin with changes as required.
Add a command to run the `contrib/check-for-api-changes.sh` script.
Run `just check-api` and commit the changes. We should have never gotten
to this state, upcoming patch will check for changes in CI.
Add a job to run the `contrib/check-for-api-changes.sh` script in CI.
Copy the script from `rust-bitcoin`, also add a `just` command to call
it.
@tcharding
Copy link
Member Author

Now on top of #691

Wildcards make it hard to grep for where stuff comes from, explicit
imports and re-exports are ... more explicit.

Import and re-export explicitly instead of by using wildcards.
Wildcards make it hard to grep for where stuff comes from, explicit
imports and re-exports are ... more explicit.

Re-export the `key` types explicitly.
@apoelstra
Copy link
Member

Awesome :). So much easier to review.

I'm gonna try to ACK/merge this even though both Github and my local tools see it as 7 independent commits (even though 5 are already in master). I verified that the first 5 are exactly the same commits in #691.

apoelstra
apoelstra previously approved these changes Mar 27, 2024
Copy link
Member

@apoelstra apoelstra left a comment

Choose a reason for hiding this comment

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

ACK 0da394e

@tcharding tcharding dismissed apoelstra’s stale review March 27, 2024 19:02

The merge-base changed after approval.

@apoelstra apoelstra merged commit b370f67 into rust-bitcoin:master Mar 27, 2024
@tcharding tcharding deleted the 03-19-rm-wildcard branch April 1, 2024 21:49
chain-forgexcr45 added a commit to chain-forgexcr45/rust-secp256k1 that referenced this pull request Sep 28, 2025
0da394e64848baf93c0aca0a9d6b5c9b2648b908 Remove wildcard re-exports of key types (Tobin C. Harding)
d63e95b99b5183aa181a82eee89727f290a6c82d Remove wildcard re-exports of context types (Tobin C. Harding)

Pull request description:

  Wildcards make it hard to grep for where stuff comes from, explicit imports and re-exports are ... more explicit.

  - Patch 1: Re-export the `context` types explicitly.
  - Patch 2: Re-export the `key` types explicitly.

  Fix: #681

ACKs for top commit:
  apoelstra:
    ACK 0da394e64848baf93c0aca0a9d6b5c9b2648b908

Tree-SHA512: ac92baa9b9abaaff436223bf1d18d286825dbfc8eef401c714314902ff471db4830dce360138845efd781bcb883676d0cbc3db8d691476403eb487a0585edeaa
william2332-limf added a commit to william2332-limf/rust-secp256k1 that referenced this pull request Oct 2, 2025
0da394e64848baf93c0aca0a9d6b5c9b2648b908 Remove wildcard re-exports of key types (Tobin C. Harding)
d63e95b99b5183aa181a82eee89727f290a6c82d Remove wildcard re-exports of context types (Tobin C. Harding)

Pull request description:

  Wildcards make it hard to grep for where stuff comes from, explicit imports and re-exports are ... more explicit.

  - Patch 1: Re-export the `context` types explicitly.
  - Patch 2: Re-export the `key` types explicitly.

  Fix: #681

ACKs for top commit:
  apoelstra:
    ACK 0da394e64848baf93c0aca0a9d6b5c9b2648b908

Tree-SHA512: ac92baa9b9abaaff436223bf1d18d286825dbfc8eef401c714314902ff471db4830dce360138845efd781bcb883676d0cbc3db8d691476403eb487a0585edeaa
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.

secp256k1-sys/src/lib.rs uses a wildcard import

3 participants