The FVM is a workspace of crates which have different release schedules:
- The primary crates are released together.
- The
fvm_ipld_*crates (living in ipld/) are released independently and only live in this repo for convenience. - The rest of the crates are for local testing and are not released.
Important
Some changes need to be backported to older versions of the FVM, namely the v2 and v3 tracks. These must not break compatibility with the older network versions.
When releasing a new version of the FVM, make sure to check if any backports are needed and do them in separate PRs targeting the appropriate branches. Afterwards, make sure to create a new release for the backported changes.
Note that the v2 and v3 tracks no longer contain the fvm_integration_tests crate so there is no need to backport and release it.
The primary crates are fvm, fvm_shared, fvm_sdk, and the integration testing framework fvm_integration_tests. These are the crates that have version.workspace = true.
Versioning of the primary crates is not strictly semver compatible:
- Major releases are used to signal when the FVM drops support for old network versions.
- Minor releases are used to signal breaking changes.
- Patch releases are used for bug fixes, new features and other non-breaking changes.
Versioning of the fvm_ipld_* crates follows standard semver rules.
Preparing Primary Crates
To propose a new release, open a pull request with the following changes:
- Update the version in
Cargo.toml:workspace.package→version. - Update the version of the coupled workspace dependencies in
Cargo.tomlto match the new version (leaving semver range specifier~intact):workspace.dependencies→fvm→versionworkspace.dependencies→fvm_shared→versionworkspace.dependencies→fvm_sdk→versionworkspace.dependencies→fvm_integration_tests→version
- Update the lockfile with a rebuild:
cargo check --all. - Make sure the
CHANGELOG.mdfiles in each offvm,sdk, andsharedare all up-to-date (look throughgit log -- path/to/crate), set the release date & version, and add a new "Unreleased" section. It may be appropriate to duplicate some entries across these crates if the changes are relevant to multiple crates.
See PR #2002 for an example.
When a release PR is opened or updated, the Release Checker GitHub Action will:
- Verify that the version bump is correct.
- Perform a workspace-wide dry-run publish (
cargo publish --workspace --dry-run) to ensure all crates are in a valid state for release. - Create a draft GitHub Release and comment on the PR with a summary.
To propose a release of a crate other than fvm, fvm_shared, fvm_sdk, or
fvm_integration_tests, open a pull request with the following changes:
- Install
cargo-edit(cargo install cargo-edit). - Use
cargo set-versionto set the version for each crate you're releasing. This will both update the crate version, and make all other crates in the workspace depend on the latest version. - Make sure the
CHANGELOG.mdfiles are all up-to-date (look throughgit log -- path/to/crate), set the release date & version, and add a new "Unreleased" section.
The Release Checker will also handle these crates independently based on the paths modified in the PR.
Once the release is prepared, it'll go through a review:
- Make sure that we're ready to release. E.g., make sure downstream can consume the release.
- Make sure that we're correctly following semver.
- Make sure that we're not missing anything in the changelogs.
- Verify that the Release Checker action has passed, including the "Dry-run publish" step.
Finally, an FVM "owner" will:
-
Merge the release PR to master.
-
The Releaser GitHub Action will automatically:
- Create git tags for each released crate (
crate_name@vX.Y.Z). - Publish the draft GitHub Release(s).
- Publish the crates to crates.io using
cargo publish --workspace --no-default-features.- Note: This repository uses trusted publishing via OIDC. No
CARGO_REGISTRY_TOKENsecret is required, but the repository must be configured as a trusted publisher on crates.io.
- Note: This repository uses trusted publishing via OIDC. No
- Create git tags for each released crate (
-
Verify the releases on crates.io: https://crates.io/crates/fvm/versions https://crates.io/crates/fvm_shared/versions https://crates.io/crates/fvm_sdk/versions https://crates.io/crates/fvm_integration_tests/versions