Repository navigation
vm_check.sh: the ruby on PATH when the rbenv build is not there (fixes #261's CI step) - #296
Conversation
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
left a comment
There was a problem hiding this comment.
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.
vm_check.sh takes the reference ruby through tools/ref_ruby.sh (#296's review)
#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.ymlis not changed.Checked
With
HOMEpointed at an empty directory (no rbenv path), the reference ruby 4.0.10 on PATH (tools/ref_ruby.sh), on main 8c6699f:vm_check: 245/245;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