Skip to content
This repository has been archived by the owner on Nov 30, 2022. It is now read-only.

Revert "don't export core" #125

Merged
merged 3 commits into from May 4, 2021
Merged

Conversation

TheBlueMatt
Copy link
Member

This reverts commit 1b36c27.

This broke build of rust-bitcoin. I'm gonna play with it to see if I can get CI to pass without this commit.

This reverts commit 1b36c27.
@TheBlueMatt TheBlueMatt force-pushed the master branch 7 times, most recently from 737da43 to 5c3093e Compare May 4, 2021 00:47
Copy link
Contributor

@dr-orlovsky dr-orlovsky left a comment

Choose a reason for hiding this comment

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

utACK

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 e257592

@apoelstra apoelstra merged commit 235ff17 into rust-bitcoin:master May 4, 2021
@RCasatta
Copy link
Contributor

RCasatta commented May 4, 2021

#122 (comment)

Why all this rush?

@dr-orlovsky
Copy link
Contributor

@RCasatta not just in bitcoin core, but in each crate using bitcoin_hashes, otherwise macro would not work. This is bad from macro hygiene point of view and I think @TheBlueMatt solution is supreme, since it has no such requirement.

The rush was caused by broken builds of rust-bitcoin right after bitcoin_hashes release, and since there was no PR opened there in parallel with this one, your comment was probably missed.

@RCasatta
Copy link
Contributor

RCasatta commented May 4, 2021

I didn't say this is worse, I just feel bad I put a clear "this is breaking" comment in five lines PR description that was missed and I haven't had time to comment the revert before the merge and the history will blame my commit. I should have commented also the bump version PR...

btw the macro is not hygienic anyway since it requires Hash trait in scope

also, this wasn't the only option to fix downstream build, wouldn't yanking 0.9.5 would have been sufficient as a first step?

@TheBlueMatt
Copy link
Member Author

TheBlueMatt commented May 4, 2021 via email

@sgeisler
Copy link
Contributor

sgeisler commented May 4, 2021

also, this wasn't the only option to fix downstream build, wouldn't yanking 0.9.5 would have been sufficient as a first step?

I have to agree with this very much. Breaking downstream sucks, but the current situation is not much better tbh, there is still a broken version out there and there is rust-bitcoin/rust-bitcoin#602 because of that apparently. Yanking would have been much easier.

@apoelstra
Copy link
Member

@RCasatta the break was not that anybody downstream was actually using the exported core. That is the breakage that you warned about and we explicitly decided to live with it.

The break was that we were exporting the new core in our macros, which is part of the general "rust macros cause downstream breakage that unit tests and compile-tests cannot fix" problem. This was not mentioned anywhere in the original PR, by anybody, and that is what we are fixing now.

@apoelstra
Copy link
Member

@sgeisler the fuzztest is not downstream breakage. Anything downstream that depends on the fuzztest feature is dangerously and security-compromisingly broken. Yes, we have to update the rust-bitcoin fuzztests because of this. This was expected and uninteresting.

The hygeine issue is part of the general "rust macros cause downstream breakage that unit tests and compile-tests cannot fix" problem.

@RCasatta
Copy link
Contributor

RCasatta commented May 4, 2021

@RCasatta the break was not that anybody downstream was actually using the exported core. That is the breakage that you warned about and we explicitly decided to live with it.

No, I wrote rust-bitcoin would need extern crate core not that someone is using the core re-exported.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants