Skip to content

Conversation

@joewagner
Copy link
Contributor

@joewagner joewagner commented Mar 19, 2025

This is a large set of wide spread changes, because there are many packages being renamed to enable publishing the needed packages to crates.io. The end goal being that we integrate Recall with the rust ecosystem and enable people to use crates and cargo to install the rust SDK.

There are a few other PRs that go along with this one:
recallnet/contracts#104
recallnet/builtin-actors#22
recallnet/rust-recall#261

@joewagner joewagner force-pushed the joe/release branch 2 times, most recently from 7652a5e to 22743ac Compare March 27, 2025 18:14
@joewagner joewagner changed the title chore: update entagler dep and prep for crates chore: update deps and include changes needed to publish to crates Apr 1, 2025
@joewagner joewagner force-pushed the joe/release branch 4 times, most recently from 864d364 to 916fad1 Compare April 7, 2025 22:05
wip: use workspace to set version

move all path deps into workspace root

fix fmt

update versions for publish

update release.yaml workflow publish order

wip: updating sol facade deps

update release workflow

update contracts after rebase

fix recall contracts submodule

update tool chain to 1.83.0

fix lint

remove lifetimes that can be elided, fix make lint
# packages we publish
# NOTE: you need to change these versions as needed, i.e. they are not automatically changed by the `workspace.package.version`
# value above. If there is a way to avoid the need to keep this value synched in multiple places that would be better.
recall_actor_sdk = { path = "recall/actor_sdk", version = "=0.1.2" }
Copy link
Contributor Author

@joewagner joewagner Apr 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This may be obvious, but it's key to remember that cargo uses the semver ^ by default, so unless we explicitly use = or ~ the version will be updated to the highest matching major version available on crates.
This isn't a consideration when building or working locally, since we have a committed lock file to set versions. crates does not capture lock files, hence we needed to be more explicit in this file. This is especially important for any dep with a major verion of 0, since semver allows breaking changes within a minor version change when the major version is 0. There are a few of these breaking changes in the fvm_ prefixed packages.

In general I went ahead and pinned the packages we release, because we can control everything, and I've used ~ for other packages.

# happens, try removing "crypto" feature from fvm_shared dependency in contracts/binding/Cargo.toml
# and run `cargo build`. Then add the "crypto" feature back and run `cargo build` again.
fvm = { version = "4.4.0", features = [
fvm = { version = "~4.3.0", features = [
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

getting all or our packages on the same fvm version was key to publishing.

fvm_sdk = { version = "~4.3.0" }
fvm_ipld_blockstore = "~0.2.1"
fvm_ipld_car = "~0.7.1"
fvm_ipld_encoding = "~0.4.0"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fvm_ipld_encoding has breaking changes between 0.4.x and 0.5.x

@@ -1,19 +1,18 @@
[package]
name = "frc42_dispatch"
name = "recall_frc42_dispatch"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had to publish the packages in /ext since the versions on crates do not match what we have here.

name = "fendermint_actors"
version = "0.1.0"
name = "recall_fendermint_actors"
version.workspace = true
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I moved all of the explicit version numbers to the root Cargo.toml so we don't have to try to sync them in many places.

}

impl<'a, S: KVStore> KVTransaction for Transaction<'a, S, Write> {
impl<S: KVStore> KVTransaction for Transaction<'_, S, Write> {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You'll see a few places were I removed lifetime specifiers that are able to be elided. I tried a few different toolchains when I was looking for a way to get all the dependencies to work together when published to crates (i.e. without a lock file). One of the versions of clippy complained that these can be elided and should be removed.
I ended up finding a way to stick with the current 1.81.0 toolchain, but afaict these lifetime specifiers are not needed, so I removed them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants