Skip to content

chore: rename packages to allow cargo publish#22

Open
joewagner wants to merge 2 commits into
mainfrom
joe/publish
Open

chore: rename packages to allow cargo publish#22
joewagner wants to merge 2 commits into
mainfrom
joe/publish

Conversation

@joewagner

@joewagner joewagner commented Mar 25, 2025

Copy link
Copy Markdown
Contributor

fixes: #21

Overview

This PR is an attept to set up publishing the packages in this repo to Crates.io using the recall_ prefix, with the end goal of being able to publish the packages in https://github.com/recallnet/ipc followed by publishing the rust SDK to Crates.
In order to publish the recallnet/ipc repo we need the following four packages published from this repo.

fil_actors_evm_shared
fil_actor_eam
fil_actor_adm
fil_actors_runtime

Details

3 of the above 4 pacakges are currently published, and one is not. Of the three published, at least one is invalid, and I'm uncertain the status of the other two.
As explained in #21 we can get around this by publishing our own versions of the packages in this repo. Unfortunately publishing normally is blocked by an issue with the fvm_shared package. fvm_shared version 4.3.0 has a dependency to fvm_ipld_encoding that is set at ^0.4.0. The use of the ^ in setting the version range results in an issue when trying to publish because cargo publish ignores the root level lockfile. cargo build works as expected because it is aware of Cargo.lock. See here for details.

fvm_ipld_encoding introduced a breaking change in version 0.5.0, so it's not possible for us to publish this repo the way we are publishing other repos. There are other people who have had the same issue publishing from a workspace that we are having here. There is a nightly version of cargo that supports a flag that allows publishing all packages in a workspace, and this feature includes the ability to honor the lockfile's explicit versions. See here for details.

I've tested the changes in this PR using the --dry-run flag and publishing manually seems to work. Hopefully we won't be changing the code in this repo often (maybe never?), so doing a manual publish seems like it might be better than trying to work through the complexity of automating a workflow.

TL;DR;

I'd propose we merge the changes here, and I will publish a recall version of the packages in this repo manually.

Update March 26

I went ahead and published version 0.0.0 with the following process:

  1. rustup run nightly cargo -Zpackage-workspace publish --locked --package recall_vm_api
  2. rustup run nightly cargo -Zpackage-workspace publish --locked --package recall_fil_actors_runtime
  3. rustup run nightly cargo -Zpackage-workspace publish --locked --package recall_fil_actors_evm_shared
  4. rustup run nightly cargo -Zpackage-workspace publish --locked --package recall_fil_actor_evm
  5. rustup run nightly cargo -Zpackage-workspace publish --locked --package recall_fil_actor_eam
  6. rustup run nightly cargo -Zpackage-workspace publish --locked --package recall_fil_actor_adm

Update April 9

After rebasing on top of the sol facade changes and updating the fvm dependencies to use the ~ character instead of the default ^ we no longer need to use the rust nightly channel to publish.

There are a ton of changes here, but the main thing is that we needed to add the recall_ prefix to package names so that we could publish to crates without interfering with the packages that this repo cloned.

@github-actions

Copy link
Copy Markdown

Suggested version: 15.0.0-rc1

Comparing to: v0.1.5 (diff)

Changes in configuration file(s):

(empty)

Cutting a Release (and modifying non-markdown files)

This PR is modifying both Cargo.toml and non-markdown files.
The Release Checker is not able to analyse files that are not checked in to main. This might cause the above analysis to be inaccurate.
Please consider performing all the code changes in a separate PR before cutting the release.

Automatically created GitHub Release

A draft GitHub Release has been created.
It is going to be published when this PR is merged.
You can modify its' body to include any release notes you wish to include with the release.

@joewagner
joewagner force-pushed the joe/publish branch 4 times, most recently from d7efae4 to 983d281 Compare March 26, 2025 14:30
@joewagner
joewagner marked this pull request as ready for review April 9, 2025 20:21
@@ -1,54 +0,0 @@
name: Release Checker

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This workflow and the two below are left over from the repo we cloned to create this repo. They aren't needed afaik, and don't seem to work anyway so I am removing them.

Comment thread Cargo.toml
edition = "2021"
repository = "https://github.com/filecoin-project/builtin-actors"

# TODO: I don't believe we need this `[package]` section. We are publishing packages individually

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This top level package declaration should not be needed anymore, but this PR was large enough that I just left it for now in hopes of not further complicating things.

Comment thread Cargo.toml
test_vm = { path = "test_vm" }

# package we publish from `contracts` repo
recall_sol_facade = "0.1.2"

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This is the change found in recallnet/contracts#104

Comment thread runtime/Cargo.toml
# Enable the test_utils feature when testing.
fil_actors_runtime = { workspace = true, features = ["test_utils"] }
# TODO: I commented this out. How can a packaege be it's own dependency?
#recall_fil_actors_runtime = { workspace = true, features = ["test_utils"] }

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I'm not really sure what was going on here, but commenting this out seems ok. If someone else finds a reason to un-comment we can revisit

joewagner added a commit to recallnet/contracts that referenced this pull request Apr 17, 2025
To get the latest changes to the solidity facade publish to Crates.io I
updated the version and manually published. This is needed for
recallnet/builtin-actors#22

This also includes some changes made by the linter and the addition of a
README to the crate.
async-lancermj80p added a commit to async-lancermj80p/contracts that referenced this pull request Sep 29, 2025
To get the latest changes to the solidity facade publish to Crates.io I
updated the version and manually published. This is needed for
recallnet/builtin-actors#22

This also includes some changes made by the linter and the addition of a
README to the crate.
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.

Publish to crates.io

1 participant