paritytech / paritytech/parity-scale-codec

A question on semver stability

Open
#405 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
287
Forks
103
Avg merge
6d 13h
Merged PRs (30d)
1

Description

Hi folks!

I am currently on a mission to reduce the number of breaking changes across the rust-libp2p ecosystem. One of the fundamental dependencies of libp2p are PeerIds and Multiaddr. Both of them depend on the Multihash type defined here: https://github.com/multiformats/rust-multihash.

That type comes with the scale-codec feature which brings this crate into its dependency tree.

You might see where this is going. With parity-scale-codec in our public API, any breaking change in this crate triggers a breaking change in pretty much every crate across the rust-libp2p ecosystem.

I have two questions:

  • Do you have a policy on semver stability? For example, at most 1 breaking change every 2 years etc.
  • I see that the custom-derive for parity-scale-codec has an encode_as attribute. Is this equivalent to serde(with)? Would it be acceptable to remove parity-scale-codec as a dependency from multihash and move the Multihash implementation to an adapter crate where users then have to use the encode_as feature of the derive?

Thanks in advance! :)

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the public API's use of parity-scale-codec and the custom derive's encode_as attribute, then follow the linked multihash issue for ecosystem context. Done means the semver policy and the proposed adapter-crate approach have been evaluated and a clear decision is documented.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
api
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.