Skip to content

vm_check.sh: the ruby on PATH when the rbenv build is not there (fixes #261's CI step) - #296

Merged
284km merged 1 commit into
mainfrom
ci-vm-check-ruby
Nov 25, 2026
Merged

284km merged 1 commit into
mainfrom
ci-vm-check-ruby

Conversation

@284km

@284km 284km commented Nov 25, 2026

Copy link
Copy Markdown
Owner

#261 added a CI step, "Compare the forced ISeq VM with ruby", that runs tools/iseq/vm_check.sh. The script's reference ruby was $HOME/.rbenv/versions/4.0.10/bin/ruby, this machine's, which CI does not have. The step fails at once on every run that reaches it, and the two steps after it are skipped: the first run that got there, a PR's (45602800954, branch codex-allocation-keyword-copies), shows the step failed within its first second.

The change

The script takes the rbenv path when it is there, and otherwise the ruby on PATH, which in CI is setup-ruby's at the reference's version (REF_RUBY_VERSION). RUBY= still overrides. ci.yml is not changed.

Checked

With HOME pointed at an empty directory (no rbenv path), the reference ruby 4.0.10 on PATH (tools/ref_ruby.sh), on main 8c6699f:

  • this script: vm_check: 245/245;
  • main's script: fails, vm_check: 0/1, as in CI.

With the real HOME, this script: 245/245, as before.

I wrote the step in #261 without giving it RUBY; this is that mistake's fix.

🤖 Generated with Claude Code

The script's reference ruby was this machine's rbenv path, which CI does not
have: #261's step "Compare the forced ISeq VM with ruby" failed at once on
every run that reached it. It takes that path when it exists, else the ruby
on PATH (CI's setup-ruby, at the reference's version).

@284km 284km left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Reviewed 53dad6e. No Critical / Major / Minor findings. tools/iseq/vm_check.sh hard-coded the rbenv path of the reference ruby, which CI does not have, so the "Compare the forced ISeq VM with ruby" step added in #261 failed at once on every run and skipped the two steps after it. It now uses RUBY if given, else the rbenv 4.0.10 build if present, else the ruby on PATH (CI's setup-ruby 4.0.10). The author checked with an empty HOME: this version 245/245, main's version fails as CI does. No workflow change. Suggestion (not blocking): the PATH fallback does not check the version; sourcing tools/ref_ruby.sh would also apply its version and gem-dir checks (#224/#241). A wrong version would fail loudly rather than pass silently, so this is only a nicety. git merge-tree against main: clean. No mere-pr-review-watch inline comments. Merging.

@284km
284km merged commit 47e5d6a into main Nov 25, 2026
6 of 19 checks passed
284km added a commit that referenced this pull request Nov 25, 2026
vm_check.sh takes the reference ruby through tools/ref_ruby.sh (#296's review)
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