Skip to content

chore: update rust to nightly build#47

Open
jwilger wants to merge 1 commit into
mainfrom
deps
Open

chore: update rust to nightly build#47
jwilger wants to merge 1 commit into
mainfrom
deps

Conversation

@jwilger
Copy link
Copy Markdown
Owner

@jwilger jwilger commented Apr 26, 2026

Summary by CodeRabbit

  • Chores
    • Updated development environment configuration and dependencies for improved consistency
    • Switched Rust compiler to nightly channel to leverage advanced language features
    • Simplified development shell initialization by streamlining automatic setup processes
    • Standardized build dependencies through Nix for better cross-platform compatibility

@jwilger jwilger enabled auto-merge (squash) April 26, 2026 19:59
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 26, 2026

📝 Walkthrough

Walkthrough

The Nix development shell is simplified by removing nodePackages.prettier, git, and gh from build inputs and eliminating automatic cargo-mcp installation from the shell hook. The Rust toolchain channel is switched from stable to nightly while maintaining all existing components.

Changes

Cohort / File(s) Summary
Development Shell Configuration
flake.nix
Removed nodePackages.prettier, git, and gh from buildInputs; removed automatic cargo install --locked cargo-mcp from shellHook; pre-commit setup retained.
Rust Toolchain Channel
rust-toolchain.toml
Switched Rust toolchain channel from stable to nightly; component list (rustfmt, clippy, rust-src, rust-analyzer) and profile unchanged.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~5 minutes

Poem

🐰 twitches whiskers excitedly

The shell grows lean, dependencies shed,
Prettier finds its Nix-native bed,
Nightly Rust now takes the lead—
A simpler dev setup, indeed!

🚥 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 accurately reflects the main change: switching the Rust toolchain from stable to nightly in rust-toolchain.toml.
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 deps

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

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (1)
flake.nix (1)

46-64: Clarify Cargo MCP Server setup expectations in docs.

README.md mentions "Cargo MCP Server" features (line 384), but the dev shell doesn't auto-install cargo-mcp. Update onboarding docs or bootstrap instructions to explicitly describe the manual setup process or state the feature is optional.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@flake.nix` around lines 46 - 64, The README references "Cargo MCP Server" but
the dev shell (shellHook) doesn't provide or install cargo-mcp; either document
the manual setup or make shellHook install it. Update README.md near the "Cargo
MCP Server" mention to add a short onboarding note with the exact manual command
(e.g., use cargo install cargo-mcp with CARGO_HOME set) and mark the feature as
optional, or modify the shellHook to check for cargo-mcp and run cargo install
--root "$PWD/.dependencies/rust/cargo" cargo-mcp when missing; refer to
shellHook, cargo-mcp, and CARGO_HOME/CARGO_HOME environment in your change.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@rust-toolchain.toml`:
- Line 2: Local toolchain uses nightly (rust-toolchain.toml channel = "nightly")
but CI workflows hardcode stable (dtolnay/rust-toolchain@stable) and the nightly
matrix is marked optional, causing CI drift; update the CI and release workflows
to match the repository toolchain: replace dtolnay/rust-toolchain@stable with
dtolnay/rust-toolchain@nightly (or read the repo toolchain dynamically) in the
ci.yml and release-plz.yml jobs, and remove or disable continue-on-error for the
nightly entry in toolchain-matrix.yml so nightly failures block merges; search
for dtolnay/rust-toolchain, ci.yml, release-plz.yml, and toolchain-matrix.yml to
locate and change the relevant job definitions.

---

Nitpick comments:
In `@flake.nix`:
- Around line 46-64: The README references "Cargo MCP Server" but the dev shell
(shellHook) doesn't provide or install cargo-mcp; either document the manual
setup or make shellHook install it. Update README.md near the "Cargo MCP Server"
mention to add a short onboarding note with the exact manual command (e.g., use
cargo install cargo-mcp with CARGO_HOME set) and mark the feature as optional,
or modify the shellHook to check for cargo-mcp and run cargo install --root
"$PWD/.dependencies/rust/cargo" cargo-mcp when missing; refer to shellHook,
cargo-mcp, and CARGO_HOME/CARGO_HOME environment in your change.
🪄 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: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 3678067d-7c76-4823-b544-fef0c4a698e3

📥 Commits

Reviewing files that changed from the base of the PR and between 352ec23 and c64a899.

⛔ Files ignored due to path filters (1)
  • flake.lock is excluded by !**/*.lock
📒 Files selected for processing (2)
  • flake.nix
  • rust-toolchain.toml

Comment thread rust-toolchain.toml
@@ -1,4 +1,4 @@
[toolchain]
channel = "stable"
channel = "nightly"
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== rust-toolchain.toml =="
rg -n '^\s*channel\s*=' rust-toolchain.toml

echo
echo "== Workflow toolchain pins and gating =="
rg -n -C2 --iglob '.github/workflows/*.yml' \
  'dtolnay/rust-toolchain@|matrix\.toolchain|continue-on-error|cargo clippy --all-targets --all-features -- -D warnings'

Repository: jwilger/caxton

Length of output: 315


🏁 Script executed:

# List all workflow files
find .github/workflows -type f -name "*.yml" -o -name "*.yaml" | head -20

Repository: jwilger/caxton

Length of output: 312


🏁 Script executed:

# Search for toolchain configuration patterns in workflows
rg -n 'dtolnay/rust-toolchain|toolchain' .github/workflows/ -A 2 -B 2

Repository: jwilger/caxton

Length of output: 6696


Toolchain channel change is not propagated to CI/release workflows.

Local development is set to nightly, but critical workflows hardcode stable: ci.yml uses dtolnay/rust-toolchain@stable in 4 jobs (lines 25, 49, 74, 97), and release-plz.yml uses it in 3 jobs (lines 230, 330, 409). The toolchain-matrix.yml does test nightly but marks non-stable as optional (continue-on-error: true on line 19), so failures won't block merges. This creates local-vs-CI drift where nightly-specific issues or failures may be missed.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@rust-toolchain.toml` at line 2, Local toolchain uses nightly
(rust-toolchain.toml channel = "nightly") but CI workflows hardcode stable
(dtolnay/rust-toolchain@stable) and the nightly matrix is marked optional,
causing CI drift; update the CI and release workflows to match the repository
toolchain: replace dtolnay/rust-toolchain@stable with
dtolnay/rust-toolchain@nightly (or read the repo toolchain dynamically) in the
ci.yml and release-plz.yml jobs, and remove or disable continue-on-error for the
nightly entry in toolchain-matrix.yml so nightly failures block merges; search
for dtolnay/rust-toolchain, ci.yml, release-plz.yml, and toolchain-matrix.yml to
locate and change the relevant job definitions.

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