Skip to content

feat: add asdf runtime management script - #7

Merged
Colin23 merged 2 commits into
mainfrom
asdf-managed-runtimes
May 3, 2026
Merged

Colin23 merged 2 commits into
mainfrom
asdf-managed-runtimes

Conversation

@Colin23

@Colin23 Colin23 commented May 3, 2026 •

Copy link
Copy Markdown
Owner

Summary by CodeRabbit

Release Notes

  • Documentation

    • Enhanced contributing guide with detailed runtime version management procedures and expanded testing environment guidance.
    • Refined tool inventory documentation and removed provisional language.
  • Chores

    • Updated Docker test configurations.
    • Integrated runtime version management infrastructure.

- 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.
@coderabbitai

coderabbitai Bot commented May 3, 2026 •

Copy link
Copy Markdown

Warning

Rate limit exceeded

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

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 @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: defaults

Review profile: CHILL

Plan: Pro

Run ID: 76070930-50ca-48fd-b960-4da3442fad23

📥 Commits

Reviewing files that changed from the base of the PR and between d44456a and 8b02d4b.

📒 Files selected for processing (1)
  • runs/81-runtimes
📝 Walkthrough

Walkthrough

This PR introduces asdf-based runtime version management into the setup system. A new runs/81-runtimes module installs and configures language runtimes (JVM, Node, .NET, Go, BEAM, etc.) from a shared ~/.tool-versions file. Supporting changes add .tool-versions symlink creation to dotfiles, update documentation, and skip runtime setup in Docker test environments.

Changes

Runtime Management via asdf

Layer / File(s) Summary
Documentation & Configuration
docs/contributing.md, docs/tool-inventory.md
Contributing guide now documents runtime setup via asdf and ~/.tool-versions. Tool inventory tables remove "(future)" labels and clarify installation methods.
Dotfiles Integration
runs/80-dotfiles
Creates ~/.tool-versions symlink from dotfiles repo and adds it to symlink verification checks.
Core Runtime Setup
runs/81-runtimes
New Bash module that installs asdf (OS-specific), ensures plugins exist, installs configured runtimes from ~/.tool-versions, and verifies each runtime via version commands. Handles asdf shell environment setup and plugin updates.
Test Configuration
tests/docker-arch, tests/docker-ubuntu
Docker smoke tests now skip the runtimes module during fresh install, idempotency, and drift-recovery test runs.

Sequence Diagram

sequenceDiagram
    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)
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs


🐰 With asdf now in place, languages flow true,
From .tool-versions springs each runtime anew,
Plugins assemble, versions align,
No more manual chaos—the runtimes just shine! 🔨✨

🚥 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 'feat: add asdf runtime management script' accurately describes the main change—introducing a new asdf-based runtime management module (runs/81-runtimes). This is the primary addition in the changeset.
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 asdf-managed-runtimes

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
Review rate limit: 0/1 reviews remaining, refill in 19 minutes and 36 seconds.

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

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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

📥 Commits

Reviewing files that changed from the base of the PR and between edc8526 and d44456a.

📒 Files selected for processing (6)
  • docs/contributing.md
  • docs/tool-inventory.md
  • runs/80-dotfiles
  • runs/81-runtimes
  • tests/docker-arch
  • tests/docker-ubuntu

Comment thread runs/81-runtimes Resolved
Comment thread runs/81-runtimes Resolved
- Unified asdf script path retrieval using `asdf_script_path` variable.
- Enhanced check for asdf existence on Ubuntu/Debian, logging if already installed.
@Colin23
Colin23 merged commit e7aa8da into main May 3, 2026
4 checks passed
@Colin23
Colin23 deleted the asdf-managed-runtimes branch May 3, 2026 20:27
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