Publish Substrate to crates.io

What does “based on” mean in this case, exactly? Does it mean that we should only trigger the publishing of Substrate crates before the releases of Polkadot? Or that the crates’ versions should somehow by influenced by the Polkadot version? Or something else?

I’m no Substrate/Polkadot expert but I infer that these projects are by design supposed to exist separately. This is corroborated by what’s mentioned in https://substrate.io/vision/substrate-and-polkadot:

However, although they’re synergistic, Polkadot and Substrate are not dependent on each other. Polkadot parachains can be built and maintained without ever touching Substrate (though alternative software options for doing so are currently limited) and chains built with Substrate do not need to be connected to Polkadot or Kusama. Substrate-based chains can exist as ‘solo-chains’ on an independent basis.

That being my understanding, I argue that Substrate crates’ versions shouldn’t anyhow be coupled to what’s happening in the Polkadot repository. In fact, this is how it works currently. For instance, a while ago, before the automated publishing pipeline even existed, version 7.0.0 of sp-std was published ad-hoc; “7.0.0” isn’t matching any Polkadot version - the PR even mentions that the publishing was motivated by subxt, not Polkadot. “7.0.0” also isn’t used uniformly for all crates in the repository since each has crate its own history and development lifecycle, e.g. some are newer or more/less mature than others.

I think the current versioning scheme for Substrate, where each crate has its own version and each crate version is managed separately, makes sense since crates have different histories and purposes. Not all crates are related to one other. I don’t see a reason to go for “one version for all” because that would incur bumping the versions of everything even if we want to actually only publish a new version of a single crate (example); the current strategy of only publishing new versions for crates which have changed is obviously more efficient than having to republish everything, every time, due to a sporadic version bump from a random crate.

1 Like