feat: add sol-shell devShell, drop sol-prelude and rs-prelude#130
Conversation
Closes #127, #128. devShells.sol-shell: slim shell with the Solidity toolchain, the sol-* tasks, and minimal dev tooling (gh, pre-commit). Lets sol-only consumers (rain.solmem, rain.deploy, rain.datacontract, rain.string, rain.sol.codegen, rain.math.binary, rain.math.saturating, rain.math.fixedpoint) pull a much smaller closure than the default shell — no chromium, rust toolchain, node, subgraph deps, sqlite, age. On a cold cache the savings are large; on a warm cache the linkage work and store footprint still drop substantially. Refactored shell composition into named layers: - sol-build-inputs: Solidity toolchain (foundry, slither, solc, reuse, git). - sol-tasks: the sol-* task wrappers. - rs-tasks: the rs-* task wrappers. - rainix-tasks: sol-tasks ++ rs-tasks. - common-shell-inputs: dev-only tooling (gh, pre-commit, hooks). Each devShell composes from these — sol-shell is sol-build-inputs + sol-tasks + common-shell-inputs; default extends with rust + node + rainix-tasks + subgraph + chromium etc. + common-shell-inputs. Removed sol-prelude and rs-prelude: - sol-prelude was forge install + forge build. forge install is a no-op for soldeer-managed repos; forge build is redundant because every rainix-sol-* task compiles on demand. - rs-prelude had no body, only kept for symmetry with sol-prelude. Both removals are safe across the rain ecosystem because every consumer's flake.lock pins a specific rainix SHA — they continue using the old definitions until they nix flake update. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
Warning Rate limit exceeded
You’ve run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (31)
📒 Files selected for processing (20)
📝 WalkthroughWalkthroughThis PR refactors the Nix flake to remove the deprecated ChangesPrelude Task Removal and Dev Shell Refactoring
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related issues
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
The flake no longer exports sol-prelude or rs-prelude attributes; the matrix tasks compile on demand. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
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 `@flake.nix`:
- Around line 346-353: The comment claiming common-shell-inputs is "shared
across every devShell" is inconsistent with tauri-shell which manually includes
pkgs.pre-commit and pre-commit.enabledPackages and omits pkgs.gh; either update
tauri-shell to include the shared array or change the comment. Fix option A:
replace the manual inclusion inside tauri-shell with a reference to
common-shell-inputs (so tauri-shell uses common-shell-inputs plus any
tauri-specific inputs) ensuring pkgs.gh is included via common-shell-inputs; Fix
option B: alter the comment above common-shell-inputs to state it is shared only
by sol-shell and default and not by tauri-shell, and keep tauri-shell's explicit
inputs; update references to pre-commit.enabledPackages and pkgs.pre-commit in
tauri-shell accordingly to match the chosen approach.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
- forge soldeer init --clean removed test/fixture/lib/forge-std and generated dependencies, soldeer.lock, remappings.txt. - Updated 2 imports (script/Deploy.sol, test/Counter.t.sol) to use the versioned forge-std-1.16.1/src/ prefix. - Dropped 'lib' from libs (now empty after the cleanup). - Removed empty .gitmodules at the rainix root. - Added .soldeerignore, remappings.txt, soldeer.lock to fixture's REUSE.toml annotations. - Added 'forge soldeer install' before the build step in test/bats/task/skip-simulation.test.bats so the bats setup populates dependencies/ before compiling the fixture. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- sol-shell-test mkTask runs 7 bats files under test/bats/devshell/sol-shell/ (forge, slither, solc, reuse, gh, sol-tasks, plus a slim.test asserting chromium/cargo/node/graph/goldsky/age are NOT present). Exposed via packages.sol-shell-test rather than added to sol-shell.buildInputs to avoid adding bats + the bats fixtures into every consumer's closure. CI invokes via "nix develop .#sol-shell --command nix run .#sol-shell-test" so the bats inherit sol-shell's PATH. - README sync: removed sol-prelude / rs-prelude entries (deleted in this PR), added sol-shell to the dev shells table, fixed Goldsky CLI version drift (8.6.6 -> 13.3.4 to match flake.nix). - Removed audit/2026-03-12-01/ — all findings closed (FIXED, DISMISSED, or made moot by this PR's removal of rs-prelude). New audit pass tracked separately. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…mment Fixes the rainix sol-test failure that surfaced after #130 migrated test/fixture to soldeer — the matrix tasks need dependencies/ populated before forge can resolve forge-std imports. Also tightens the common-shell-inputs comment per CodeRabbit feedback: tauri-shell does not consume common-shell-inputs (it omits gh and inlines pre-commit). Consolidating is out of scope here. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…absence The previous slim assertions failed on GitHub Actions runners because cargo, node, and chromium are pre-installed system-wide at /usr/bin and /usr/local/bin. Those system installs are irrelevant to the sol-shell closure; what matters is whether nix is pulling those binaries into the shell. Rewrite each assertion to: if the binary resolves at all, it must NOT resolve to a /nix/store path. A system copy on PATH is fine; a nix copy means sol-shell's buildInputs grew. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
@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:
Review Effort: Would have taken 5-10 minutes Examples:
Medium (M)Characteristics:
Review Effort: Would have taken 15-30 minutes Examples:
Large (L)Characteristics:
Review Effort: Would have taken 45+ minutes Examples:
Additional Factors to ConsiderWhen deciding between sizes, also consider:
Notes:
|
|
Tip For best results, initiate chat on the files or code changes. SIZE=M |
Summary
Closes #127, #128.
Adds a slim
devShells.sol-shellfor Solidity-only consumers, and removessol-prelude/rs-preludesince both are obsolete after the soldeer migration.Composition refactor
Shell composition broken into named layers so
defaultandsol-shellshare their building blocks:sol-build-inputs: Solidity toolchain (foundry, slither, solc, reuse, git).sol-tasks: therainix-sol-*task wrappers.rs-tasks: therainix-rs-*task wrappers.rainix-tasks = sol-tasks ++ rs-tasks— convenience.common-shell-inputs: dev-only tooling (gh, pre-commit + its enabledPackages).Each shell composes from these:
sol-shell=sol-build-inputs ++ sol-tasks ++ common-shell-inputs.default=sol-build-inputs ++ rust-build-inputs ++ node-build-inputs ++ rainix-tasks ++ subgraph-tasks ++ common-shell-inputs ++ [chromium, the-graph, goldsky, sqlite, yq-go, age, default-shell-test].tauri-shellunchanged.What
sol-shellsavesFor sol-only consumers (rain.solmem, rain.deploy, rain.datacontract, rain.string, rain.sol.codegen, rain.math.binary, rain.math.saturating, rain.math.fixedpoint),
nix develop .#sol-shellskips:sol-prelude / rs-prelude removed
sol-preludebody wasforge install+forge build.forge installis a no-op for soldeer-managed repos;forge buildis redundant since everyrainix-sol-*task compiles on demand (forge test auto-compiles, slither drives forge build itself, reuse lint doesn't compile).rs-preludehad no body, kept only for symmetry with sol-prelude. With sol-prelude gone there's nothing to mirror.Safe across the rain ecosystem because every consumer's
flake.lockpins a specific rainix SHA — they continue using the old definitions until theynix flake update.Test plan
nix flake check --no-build— only pre-existing "unknown flake output" warnings, no new errors.Related
nixpkgs-oldinput and the gtk/webkit closure.🤖 Generated with Claude Code
Summary by CodeRabbit
New Features
Refactor