Conversation
Rakefile
Outdated
| end | ||
|
|
||
| Dir.chdir(File.join(RUST_DIR, "ruby-rbs")) do | ||
| sh "cargo", "publish", "--dry-run", "--no-verify" |
There was a problem hiding this comment.
Why is this one with --no-verify, but the other one doesn't have it?
There was a problem hiding this comment.
cargo publish --dry-run fails with ruby-rbs because ruby-rbs-sys is not published at this time.
Rakefile
Outdated
| sh "git", "add", "-f", *vendor_paths, verbose: false | ||
| sh "git", "commit", "-m", "Temporary commit for cargo publish (will be reverted)", verbose: false |
There was a problem hiding this comment.
Is the idea to create a commit that can include the vendored C files just to publish and then undo the commit?
Could this be a bit confusing if crates.io shows the published commit sha and users can't find it in the repository?
There was a problem hiding this comment.
Yeah, this is to avoid adding --allow-dirty flag because cargo identifies .gitignore files are dirty.
I got that it will be confusing with commit sha. Hmm...
There was a problem hiding this comment.
Instead of resetting:
- It cuts new branch for release,
- Commit with the vendor files,
- Push the commits with release tag, and
- Publish the crates with the commits.
So the commits the published crates are built from are available on GitHub with the release tags.
This PR introduces the
rust/rbs_versionfile to make Rust crate releases more stable and safe. The file declares the version of the RBS C library that the Rust crates are built against, ensuring that published crates always use a specific, pinned version of the C parser source rather than relying on symlinks to the working tree.The
vendordirectories under the Rust crate source code contain copies of the necessary files from the tags of this repository. (We also have symlink support for development against the working copy version of the C library.)It also adds several Rake tasks for development and release operations:
rust:rbs:pin[VERSION]/rust:rbs:sync/rust:rbs:symlink— manage vendored RBS C parser source in each craterust:publish:ruby-rbs-sys/rust:publish:ruby-rbs— publish each crate independently, withRBS_RUST_PUBLISH_DRY_RUN=1for dry-run modeThe CI workflow (
rust.yml) is updated to runrust:rbs:syncbefore Rust builds and adds separate dry-run publish jobs for each crate. Documentation is added indocs/rust.md.