Skip to content

Commit

Permalink
chore: prepare 0.19 release (#324)
Browse files Browse the repository at this point in the history
This commit updates the changelog for the 0.19 release, bumps the
crate versions correctly and updates the release procedure.
  • Loading branch information
thomaseizinger authored Jun 6, 2023
1 parent abfcd94 commit 16e68d8
Show file tree
Hide file tree
Showing 5 changed files with 92 additions and 11 deletions.
83 changes: 80 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,60 @@
## [](https://github.com/multiformats/rust-multihash/compare/v0.18.0...v0.19.0) (2023-06-06)


### ⚠ BREAKING CHANGES

* the Serde serialization format changed
* split crates into multiple to isolate breaking changes
* `identity` hasher was removed

See the migration section below for help on upgrading.

### Features

* **codetable:** remove `identity` hasher ([#289](https://github.com/multiformats/rust-multihash/issues/289)) ([8473e2f](https://github.com/multiformats/rust-multihash/commit/8473e2f7ecdc0838a3f35d0ecb1935b4c70797c2))
* Serde serialize Multihash in bytes representation ([#302](https://github.com/multiformats/rust-multihash/issues/302)) ([1023226](https://github.com/multiformats/rust-multihash/commit/10232266c01aa83190af62ad6aeebf63bb7a16c7))


### Bug Fixes

* avoid possible panic in error handling code ([#277](https://github.com/multiformats/rust-multihash/issues/277)) ([5dc1dfa](https://github.com/multiformats/rust-multihash/commit/5dc1dfac0235e63e9ad80572e6b73f8fcd301ec3))
* don't panic on non minimal varints ([#291](https://github.com/multiformats/rust-multihash/issues/291)) ([6ef6040](https://github.com/multiformats/rust-multihash/commit/6ef604012b84d5c15d4f3c66a28ead96afedf158)), closes [#282](https://github.com/multiformats/rust-multihash/issues/282)
* expose `MultihashDigest` trait in codetable ([#304](https://github.com/multiformats/rust-multihash/issues/304)) ([50b43cd](https://github.com/multiformats/rust-multihash/commit/50b43cdbba5492923ffb31bb197930d2f3e2cf14))


### Code Refactoring

* split crates into multiple to isolate breaking changes ([#272](https://github.com/multiformats/rust-multihash/issues/272)) ([954e523](https://github.com/multiformats/rust-multihash/commit/954e5233d273a2b7d682fd087178203628d131a4))

### Migrating

When upgrading to `v0.19`, consider the following:

- `Code` has moved to `multihash_codetable::Code`.
Either use that or define your own codetable using `multihash_derive`.
- `Code` has moved from `multihash::Code` to `multihash_codetable::Code`. It's strongly recommended to define your own code table using `multihash_derive`. Check the [custom codetable example](codetable/examples/custom_table.rs) on how to use it. For the simplest migration, use the `multihash_codetable::Code`.

**Before**

```rust
use multihash::{Code, MultihashDigest};

fn main() {
let hash = Code::Sha2_256.digest(b"hello, world!");
println!("{:?}", hash);
}
```

**After**

```rust
use multihash_codetable::{Code, MultihashDigest};

fn main() {
let hash = Code::Sha2_256.digest(b"hello, world!");
println!("{:?}", hash);
}
```

If you get compile errors, make sure you have the correct features enabled. In this case it would be the `sha2` and `digest` features.

- `multihash::Multihash` now requires the size of its internal buffer as a const-generic.
You can migrate your existing code by defining the following type-alias:
Expand All @@ -13,7 +64,33 @@ When upgrading to `v0.19`, consider the following:
```

- The `identity` hasher has been removed completely.
Check the [identity example](examples/identity.rs) on how to replicate the functionality.

**Before**

```rust
use multihash::{Code, MultihashDigest};

fn main() {
let hash = Code::Identity.digest(b"hello, world!");
println!("{:?}", hash);
}
```

**After**

```rust
use multihash::Multihash;

const IDENTITY_HASH_CODE: u64 = 0x00;

fn main() {
let hash = Multihash::<64>::wrap(IDENTITY_HASH_CODE, b"hello, world!").unwrap();
println!("{:?}", hash);
}
```

Check the [identity example](examples/identity.rs) for more information on how to replicate the functionality.


## [v0.18.1](https://github.com/multiformats/rust-multihash/compare/v0.18.0...v0.18.1) (2023-04-14)

Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ name = "multihash"
description = "Implementation of the multihash format"
repository = "https://github.com/multiformats/rust-multihash"
keywords = ["multihash", "ipfs"]
version = "0.18.0"
version = "0.19.0"
authors = ["dignifiedquire <[email protected]>", "David Craven <[email protected]>", "Volker Mische <[email protected]>"]
license = "MIT"
readme = "README.md"
Expand Down
12 changes: 8 additions & 4 deletions RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,13 @@ becomes:
# [v0.18.0](https://github.com/multiformats/rust-multihash/compare/v0.17.0...v0.18.0) (2022-12-06)
```

## Publishing
Create a pull request with the changelog changes and the correct version bumps to the crates.

Publishing on crates.io, bumping version & generating tags is done using [`cargo-release`](https://github.com/crate-ci/cargo-release).

Publishing
----------

Once the PR above is merged, the crate can be published. This is done using [`cargo-release`](https://github.com/crate-ci/cargo-release).

This requires the following permissions

Expand All @@ -39,11 +43,11 @@ This requires the following permissions
Dry run

```sh
$ cargo release <patch|minor|major>
$ cargo release --workspace
```

Actual publishing

```sh
$ cargo release --execute <patch|minor|major>
$ cargo release --workspace --execute
```
2 changes: 1 addition & 1 deletion codetable/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ sha2 = { version = "0.10.0", default-features = false, optional = true }
sha3 = { version = "0.10.0", default-features = false, optional = true }
strobe-rs = { version = "0.8.1", default-features = false, optional = true }
ripemd = { version = "0.1.1", default-features = false, optional = true }
multihash-derive = { version = "0.8.0", path = "../derive", default-features = false }
multihash-derive = { version = "0.9.0", path = "../derive", default-features = false }
core2 = { version = "0.4.0", default-features = false }
serde = { version = "1.0.158", features = ["derive"], optional = true }

Expand Down
4 changes: 2 additions & 2 deletions derive/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "multihash-derive"
version = "0.8.1"
version = "0.9.0"
edition = "2018"
description = "Proc macro for deriving custom multihash tables."
license = "MIT"
Expand All @@ -12,7 +12,7 @@ std = ["multihash/std", "core2/std"]

[dependencies]
multihash-derive-impl = { version = "0.1.0", path = "../derive-impl" }
multihash = { version = "0.18.0", path = "../", default-features = false }
multihash = { version = "0.19.0", path = "../", default-features = false }
core2 = { version = "0.4.0", default-features = false }

[dev-dependencies]
Expand Down

0 comments on commit 16e68d8

Please sign in to comment.