Skip to content

Publish rainlang_parser to crates.io - #516

Merged
thedavidmeister merged 3 commits into
mainfrom
2026-05-27-publish-parser
May 27, 2026
Merged

Publish rainlang_parser to crates.io#516
thedavidmeister merged 3 commits into
mainfrom
2026-05-27-publish-parser

Conversation

@thedavidmeister

@thedavidmeister thedavidmeister commented May 27, 2026

Copy link
Copy Markdown
Contributor

Now that rainlang_bindings (0.1.12) and rainlang_dispair (0.1.7) are on crates.io, rainlang_parser can be published.

Changes

  • Version-pin the workspace deps ([workspace.dependencies.rainlang_bindings] → 0.1.12, rainlang_dispair → 0.1.7). cargo publish requires path deps to carry a version; they were path-only.
  • Add rainlang_parser to the Package Release crates list (dependency order: bindings, dispair, parser).

Verified locally: cargo package -p rainlang_parser --no-verify packages cleanly against the published bindings/dispair (parser's other deps — alloy, thiserror, tokio — are already versioned; it doesn't touch the foundry/git deps that block eval).

Note on lockstep

The three crates now release as a unit, so merging this triggers a Package Release that bumps + publishes all three (bindings/dispair get a no-content version bump alongside parser), and cargo-release rewrites parser's pins to match. This matches the rain.metadata workspace pattern. rainlang-eval stays excluded (foundry-evm git dep blocks publish).

Merging to main triggers the release.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Chores
    • Updated release automation to include the parser in the official publishing process
    • Updated workspace dependency specifications

Review Change Stack

Now that rainlang_bindings (0.1.12) and rainlang_dispair (0.1.7) are on
crates.io, parser can publish. cargo publish requires path deps to carry a
version, so pin the workspace dependency entries, and add rainlang_parser to
the Package Release crates list (dependency order: bindings, dispair, parser).
Verified parser packages cleanly against the published bindings/dispair.

The three crates now release as a lockstep unit, so a change to any member
republishes all three and cargo-release keeps parser's pins in sync.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@thedavidmeister thedavidmeister self-assigned this May 27, 2026
@coderabbitai

coderabbitai Bot commented May 27, 2026

Copy link
Copy Markdown
Contributor
📝 Walkthrough

Walkthrough

Release workflow extended to include rainlang_parser in the cargo publish pipeline. Workspace dependency declarations for rainlang_dispair and rainlang_bindings now carry explicit version fields alongside their local path references.

Changes

Crate Publication and Dependency Management

Layer / File(s) Summary
Release workflow configuration
.github/workflows/package-release.yaml
Workflow updated to pass rainlang_parser to the rainix-autopublish.yaml reusable workflow. Comments clarified to note three published crates and the ongoing exclusion of rainlang-eval.
Workspace dependency versions
Cargo.toml
Explicit version fields (0.1.7 and 0.1.12) added to rainlang_dispair and rainlang_bindings workspace dependencies, preserving local path references.

🎯 2 (Simple) | ⏱️ ~5 minutes

🐰 A bunny hops past two config files,
Adding versions, extending the crate list with smiles,
Three little crates now ready to fly,
Into the publish pipeline, reaching the sky! 🚀

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title directly and specifically describes the primary change: publishing the rainlang_parser crate to crates.io.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch 2026-05-27-publish-parser

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/package-release.yaml:
- Line 20: Update the reusable workflow call that currently says "uses:
rainlanguage/rainix/.github/workflows/rainix-autopublish.yaml@main" to pin to an
exact commit SHA (replace `@main` with @<commit-sha>) and remove "secrets:
inherit"; instead explicitly pass only the required secrets by name (e.g.,
secrets: { NPM_TOKEN: ${{ secrets.NPM_TOKEN }}, GITHUB_TOKEN: ${{
secrets.GITHUB_TOKEN }} } or the exact secret names the called workflow
expects). Locate the invocation line with "rainix-autopublish.yaml@main" and the
"secrets: inherit" block in package-release.yaml and replace them accordingly so
the workflow uses a fixed ref and a minimal, explicit secrets mapping.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: b25e27db-e033-43e0-9228-6d2ea7e3913d

📥 Commits

Reviewing files that changed from the base of the PR and between 3740c3e and bfc412d.

📒 Files selected for processing (2)
  • .github/workflows/package-release.yaml
  • Cargo.toml

#
# rainlang-eval is still excluded — its foundry-evm git dep blocks
# `cargo publish` entirely.
uses: rainlanguage/rainix/.github/workflows/rainix-autopublish.yaml@main

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Verify mutable workflow refs and inherited secrets in GitHub workflows.
rg -nP --type=yaml '^\s*uses:\s*.+@main\s*$|^\s*secrets:\s*inherit\s*$' .github/workflows -C2

Repository: rainlanguage/rainlang

Length of output: 2393


Pin the reusable workflow ref and avoid inheriting all secrets.

.github/workflows/package-release.yaml uses rainix-autopublish.yaml@main (mutable ref) and forwards all secrets via secrets: inherit (broadens blast radius). Pin the workflow to a commit SHA and pass only the specific secrets required by the called workflow.

Suggested hardening
-    uses: rainlanguage/rainix/.github/workflows/rainix-autopublish.yaml@main
+    uses: rainlanguage/rainix/.github/workflows/rainix-autopublish.yaml@<commit-sha>
...
-    secrets: inherit
+    secrets:
+      PUBLISH_PRIVATE_KEY: ${{ secrets.PUBLISH_PRIVATE_KEY }}
🧰 Tools
🪛 zizmor (1.25.2)

[error] 20-20: unpinned action reference (unpinned-uses): action is not pinned to a hash (required by blanket policy)

(unpinned-uses)


[warning] 20-20: secrets unconditionally inherited by called workflow (secrets-inherit): this reusable workflow

(secrets-inherit)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/package-release.yaml at line 20, Update the reusable
workflow call that currently says "uses:
rainlanguage/rainix/.github/workflows/rainix-autopublish.yaml@main" to pin to an
exact commit SHA (replace `@main` with @<commit-sha>) and remove "secrets:
inherit"; instead explicitly pass only the required secrets by name (e.g.,
secrets: { NPM_TOKEN: ${{ secrets.NPM_TOKEN }}, GITHUB_TOKEN: ${{
secrets.GITHUB_TOKEN }} } or the exact secret names the called workflow
expects). Locate the invocation line with "rainix-autopublish.yaml@main" and the
"secrets: inherit" block in package-release.yaml and replace them accordingly so
the workflow uses a fixed ref and a minimal, explicit secrets mapping.

@thedavidmeister
thedavidmeister merged commit 83a4b1c into main May 27, 2026
8 checks passed
@github-actions

Copy link
Copy Markdown
Contributor

@coderabbitai assess this PR size classification for the totality of the PR with the following criterias and report it in your comment:

S/M/L PR Classification Guidelines:

This guide helps classify merged pull requests by effort and complexity rather than just line count. The goal is to assess the difficulty and scope of changes after they have been completed.

Small (S)

Characteristics:

  • Simple bug fixes, typos, or minor refactoring
  • Single-purpose changes affecting 1-2 files
  • Documentation updates
  • Configuration tweaks
  • Changes that require minimal context to review

Review Effort: Would have taken 5-10 minutes

Examples:

  • Fix typo in variable name
  • Update README with new instructions
  • Adjust configuration values
  • Simple one-line bug fixes
  • Import statement cleanup

Medium (M)

Characteristics:

  • Feature additions or enhancements
  • Refactoring that touches multiple files but maintains existing behavior
  • Breaking changes with backward compatibility
  • Changes requiring some domain knowledge to review

Review Effort: Would have taken 15-30 minutes

Examples:

  • Add new feature or component
  • Refactor common utility functions
  • Update dependencies with minor breaking changes
  • Add new component with tests
  • Performance optimizations
  • More complex bug fixes

Large (L)

Characteristics:

  • Major feature implementations
  • Breaking changes or API redesigns
  • Complex refactoring across multiple modules
  • New architectural patterns or significant design changes
  • Changes requiring deep context and multiple review rounds

Review Effort: Would have taken 45+ minutes

Examples:

  • Complete new feature with frontend/backend changes
  • Protocol upgrades or breaking changes
  • Major architectural refactoring
  • Framework or technology upgrades

Additional Factors to Consider

When deciding between sizes, also consider:

  • Test coverage impact: More comprehensive test changes lean toward larger classification
  • Risk level: Changes to critical systems bump up a size category
  • Team familiarity: Novel patterns or technologies increase complexity

Notes:

  • the assessment must be for the totality of the PR, that means comparing the base branch to the last commit of the PR
  • the assessment output must be exactly one of: S, M or L (single-line comment) in format of: SIZE={S/M/L}
  • do not include any additional text, only the size classification
  • your assessment comment must not include tips or additional sections
  • do NOT tag me or anyone else on your comment

@coderabbitai

coderabbitai Bot commented May 27, 2026

Copy link
Copy Markdown
Contributor

Tip

For best results, initiate chat on the files or code changes.

SIZE=S

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.

1 participant