Repository navigation
feat: add asdf runtime management script - #7
Conversation
- Introduced `81-runtimes` script for managing language/runtime toolchains via asdf. - Installs and verifies plugins for Java, Kotlin, Gradle, Maven, Node.js, .NET, Terraform, Opentofu, Golang, Erlang, Elixir, and Gleam. - Updated documentation to include runtime version management and added guidelines for testing on real machines.
|
Warning Rate limit exceeded
To keep reviews running without waiting, you can enable usage-based add-on for your organization. This allows additional reviews beyond the hourly cap. Account admins can enable it under billing. ⌛ 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. 📝 WalkthroughWalkthroughThis PR introduces asdf-based runtime version management into the setup system. A new ChangesRuntime Management via asdf
Sequence DiagramsequenceDiagram
participant Setup as Setup Script
participant Dotfiles as Dotfiles Module<br/>(80-dotfiles)
participant Runtimes as Runtimes Module<br/>(81-runtimes)
participant asdf as asdf Tool
participant Shell as Shell<br/>Environment
participant ToolVersions as ~/.tool-versions
Setup->>Dotfiles: Create symlinks
Dotfiles->>ToolVersions: Link ~/.tool-versions from repo
Dotfiles-->>Setup: Dotfiles ready
Setup->>Runtimes: Initialize runtime setup
Runtimes->>Shell: Ensure asdf in PATH
alt asdf not present
Runtimes->>asdf: Install asdf (OS-specific)
end
Runtimes->>asdf: Add plugins (java, node, dotnet, go, erlang, etc.)
Runtimes->>ToolVersions: Read configured versions
Runtimes->>asdf: Install versions from ~/.tool-versions
Runtimes->>Shell: Regenerate shims (asdf reshim)
Runtimes->>asdf: Verify each runtime (version commands)
Runtimes-->>Setup: Runtimes ready (or skip if ~/.tool-versions absent)
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
🚥 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. Review rate limit: 0/1 reviews remaining, refill in 19 minutes and 36 seconds.Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@runs/81-runtimes`:
- Around line 97-101: The ubuntu|debian branch currently always returns 1 even
when asdf is already installed; update the ubuntu|debian case to first check
has_cmd asdf (same way arch and macos do) and only log the manual-install
guidance and return 1 when has_cmd asdf is false — if has_cmd asdf is true,
allow execution to continue to the plugin/version installation logic instead of
unconditionally returning; reference the ubuntu|debian case, the has_cmd
function, and the existing log_warn/log_info/return 1 behavior when making the
change.
- Around line 50-53: The ensure_asdf_in_shell block hardcodes
"$HOME/.asdf/asdf.sh" instead of using the ASDF_DATA_DIR variable; update the
check/source to use "$ASDF_DATA_DIR/asdf.sh" (falling back to "$HOME/.asdf" if
ASDF_DATA_DIR is empty) so it mirrors the shims path logic that already uses
ASDF_DATA_DIR and avoids silent no-ops when ASDF_DATA_DIR is set; change the
condition and source call in the ensure_asdf_in_shell snippet that currently
references "$HOME/.asdf/asdf.sh" to reference "$ASDF_DATA_DIR/asdf.sh" (with a
fallback) to keep behavior consistent.
🪄 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
Run ID: 53ffec80-84de-4723-8492-eb0670af8a9c
📒 Files selected for processing (6)
docs/contributing.mddocs/tool-inventory.mdruns/80-dotfilesruns/81-runtimestests/docker-archtests/docker-ubuntu
- Unified asdf script path retrieval using `asdf_script_path` variable. - Enhanced check for asdf existence on Ubuntu/Debian, logging if already installed.
Summary by CodeRabbit
Release Notes
Documentation
Chores