-
Notifications
You must be signed in to change notification settings - Fork 10
chore: update deps and include changes needed to publish to crates #580
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
7652a5e to
22743ac
Compare
864d364 to
916fad1
Compare
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" } |
There was a problem hiding this comment.
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 = [ |
There was a problem hiding this comment.
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" |
There was a problem hiding this comment.
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" | |||
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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> { |
There was a problem hiding this comment.
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.
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