Skip to content

Add bin/setup to install development deps#1039

Merged
justin808 merged 2 commits intomainfrom
jg/bin-setup-dev-deps
Apr 2, 2026
Merged

Add bin/setup to install development deps#1039
justin808 merged 2 commits intomainfrom
jg/bin-setup-dev-deps

Conversation

@justin808
Copy link
Copy Markdown
Member

@justin808 justin808 commented Apr 2, 2026

Summary

  • Add a new executable bin/setup script for local development setup.
  • The script validates ruby, bundle, node, and yarn, then runs bundle install and yarn install.
  • Commands are routed through bin/conductor-exec when available to respect workspace-managed tool versions.

Pull Request checklist

  • Add/update test to cover these changes
  • Update documentation
  • Update CHANGELOG file

Other Information

  • bash -n bin/setup was run to validate script syntax.

Note

Low Risk
Adds a small dev-only setup script and a documentation update; no runtime or production code paths are affected.

Overview
Adds a new bin/setup script to bootstrap local development by verifying ruby, bundle, node, and yarn are available, then running bundle install and yarn install (routing commands through bin/conductor-exec when present).

Updates CONTRIBUTING.md to prefer bin/setup for installing dev dependencies, while still documenting the manual bundle install/yarn install equivalent and the optional npx husky hooks step.

Written by Cursor Bugbot for commit 56bfa47. This will update automatically on new commits. Configure here.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 2, 2026

Warning

Rate limit exceeded

@justin808 has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 1 minutes and 29 seconds before requesting another review.

Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 1 minutes and 29 seconds.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 75ed06ad-3b98-4f64-af2c-86536010fc43

📥 Commits

Reviewing files that changed from the base of the PR and between 4405ebb and 56bfa47.

📒 Files selected for processing (2)
  • CONTRIBUTING.md
  • bin/setup
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch jg/bin-setup-dev-deps

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.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 4909a32840

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread bin/setup
Comment on lines +8 to +9
if [[ -x "$ROOT_DIR/bin/conductor-exec" ]]; then
"$ROOT_DIR/bin/conductor-exec" "$@"
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Avoid unconditional conductor-exec routing

run_cmd always prefers bin/conductor-exec whenever the file exists and is executable, but bin/conductor-exec is hard-pinned to #!/bin/zsh; in environments without /bin/zsh (common in minimal Linux images), every ensure_tool probe fails and reports tools as missing even when ruby/bundle/node are installed, so bin/setup is unusable. This should fall back to direct execution when the wrapper cannot actually be run.

Useful? React with 👍 / 👎.

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented Apr 2, 2026

Greptile Summary

Adds bin/setup — a new bash dev-setup script that validates ruby, bundle, node, and yarn, then runs bundle install and yarn install, routing all commands through bin/conductor-exec (mise/version-manager support) when present.

  • The PR checklist leaves "Update CHANGELOG file" unchecked; per project guidelines in CLAUDE.md, new user-visible features should have a CHANGELOG.md entry.

Confidence Score: 5/5

  • Safe to merge; the script is correct and only adds a convenience dev-setup helper with no runtime impact on the gem itself.
  • The script uses safe bash practices (set -euo pipefail, proper quoting, executable checks), all four tool checks are sound, the conductor-exec routing is consistent between checks and installs, and the file ends with a required trailing newline. The only open item is a missing CHANGELOG entry, which is a P2 guideline note.
  • No files require special attention.

Important Files Changed

Filename Overview
bin/setup New bash script that validates required tools (ruby, bundle, node, yarn) then runs bundle install and yarn install, routing commands through bin/conductor-exec when available for mise/version-manager support.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A([bin/setup]) --> B[Set ROOT_DIR & cd to it]
    B --> C{conductor-exec\nexecutable?}
    C -->|yes| D[route via conductor-exec]
    C -->|no| E[run command directly]
    D --> F[mise exec available?]
    F -->|yes| G[mise exec -- cmd]
    F -->|no| H[direct exec]

    B --> I[ensure_tool ruby]
    I --> J[ensure_tool bundle]
    J --> K[ensure_tool node]
    K --> L[ensure_tool yarn]
    L --> M[bundle install]
    M --> N[yarn install]
    N --> O([done])

    style C fill:#f9f,stroke:#333
    style D fill:#bbf,stroke:#333
    style E fill:#bfb,stroke:#333
Loading

Reviews (1): Last reviewed commit: "Add bin/setup for development deps" | Re-trigger Greptile

Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

Bugbot Autofix prepared a fix for the issue found in the latest run.

  • ✅ Fixed: Overly broad conductor-exec routing misreports missing tools
    • Updated bin/setup to route through bin/conductor-exec only when mise is available, preventing false missing-tool errors on systems without zsh.

Create PR

Or push these changes by commenting:

@cursor push c3cb956985
Preview (c3cb956985)
diff --git a/bin/setup b/bin/setup
--- a/bin/setup
+++ b/bin/setup
@@ -5,7 +5,7 @@
 cd "$ROOT_DIR"
 
 run_cmd() {
-  if [[ -x "$ROOT_DIR/bin/conductor-exec" ]]; then
+  if command -v mise >/dev/null 2>&1 && [[ -x "$ROOT_DIR/bin/conductor-exec" ]]; then
     "$ROOT_DIR/bin/conductor-exec" "$@"
   else
     "$@"

You can send follow-ups to this agent here.

Comment thread bin/setup
"$ROOT_DIR/bin/conductor-exec" "$@"
else
"$@"
fi
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Overly broad conductor-exec routing misreports missing tools

Medium Severity

run_cmd unconditionally routes through bin/conductor-exec whenever the file is executable, but conductor-exec requires /bin/zsh. On systems without zsh (common on Linux servers, CI, Docker), the file passes the -x check yet fails to execute. In ensure_tool, this failure is silently caught (output redirected to /dev/null) and misreported as the tool being unavailable (e.g., "ruby is not available"). The existing conductor-setup.sh avoids this by gating on VERSION_MANAGER == "mise" before routing through conductor-exec, since conductor-exec only adds value when mise is present.

Additional Locations (1)
Fix in Cursor Fix in Web

@justin808 justin808 merged commit a2e6725 into main Apr 2, 2026
2 of 3 checks passed
@justin808 justin808 deleted the jg/bin-setup-dev-deps branch April 2, 2026 09:49
justin808 added a commit that referenced this pull request Apr 30, 2026
* origin/main: (22 commits)
  docs: add Dependabot configuration guide (#1094)
  Sync address-review prompt with upstream PR #16 (#1098)
  Supersede #910: entry shape test with lint unblock (#919)
  fix: align rspack v2 peer deps and installer defaults (#1091)
  docs: update README and guides for Shakapacker v10 (#1092)
  Release 10.0.0
  Update CHANGELOG.md for v10.0.0 (#1089)
  Release 10.0.0-rc.1
  Update CHANGELOG.md for v10.0.0-rc.1 (#1087)
  Supersede #961 by using pack-config-diff (#973)
  Add final summary output to rake release (#1041)
  Add bin/setup to install development deps (#1039)
  Release 10.0.0-rc.0
  Use npx release-it to avoid mise shim failures (#1040)
  Fix Nokogiri build failure on Ruby 3.4.6 (#1038)
  Update CHANGELOG.md for v10.0.0-rc.0 (#1037)
  Update rspack dev deps to 2.0.0-rc.0 (#1036)
  Fix stale and broken documentation across Shakapacker guides (#1023)
  Allow webpack-cli v7 in peer dependencies (#1021)
  refactor: simplify resolving js peer versions when installing (#1034)
  ...

# Conflicts:
#	package.json
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