rust-bitcoin / bitcoin_hashes

Simple library which implements a few hashes and does nothing else
Creative Commons Zero v1.0 Universal
66 stars 52 forks source link

Usage of underscore in repository/crate name #157

Closed tcharding closed 2 years ago

tcharding commented 2 years ago

The underscore in bitcoin_hashes is an accident of history (sorry I can't find the quote, perhaps you can ack this statement please @apoelstra).

Everywhere else in the rust-bitcoin stack we use -. This makes it mildly annoying to interact with bitcoin_hashes. We cannot rename the crate on crates.io because _ and - are treated the same. We can rename the directory and repository on github.com and everything should still work.

What we could do is rename the github repository, change all the URLs in the manifest but keep the package name as bitcoin_hashes. We can also do package re-names in dependencies now with our new MSRV so in, for example, rust-bitcoin we could have

bitcoin-hashes = { package = "bitcoin_hashes", version = "0.10.0", default-features = false }

A little comment in the file bitcoin-hashes/Cargo.toml would let folks know what we are doing:

[package]
# Note, the `_` was an accident of history, when you add this crate to your dependencies you may
# wish to do so as: `bitcoin-hashes = { package = "bitcoin_hashes", version = "0.10.0" }`.
name = "bitcoin_hashes"         

Not sure if this is worth the trouble but it reduces the scope of the an accident that cannot be totally fixed.

apoelstra commented 2 years ago

concept ACK doing this (and ack the claim that the _ was a mistake on my part).

Not sure whether this is worth the trouble .. will let others weigh in.

tcharding commented 2 years ago

I just added a symlink bitcoin-hashes -> bitcoin_hashes and that takes care of basically all the interaction I have on a regular basis with this underscore. Closing.