Skip to content

ruby: enable and verify psych/YAML on Kandelo#814

Open
brandonpayton wants to merge 1 commit into
mainfrom
gascity/kd-1mr/kd-egn1-enable-ruby-psych-yaml-support
Open

ruby: enable and verify psych/YAML on Kandelo#814
brandonpayton wants to merge 1 commit into
mainfrom
gascity/kd-1mr/kd-egn1-enable-ruby-psych-yaml-support

Conversation

@brandonpayton

Copy link
Copy Markdown
Member

Purpose

Enable and verify Ruby psych/YAML on Kandelo (kd-egn1).

main already builds Ruby with psych/YAML wired in build-ruby.sh (libyaml 0.2.5,
--with-ext=...,psych,...), but there is no ruby.rb Homebrew formula and no
runtime test that require 'yaml' + YAML.load/dump actually work on the platform.
This PR adds the psych-including formula and a Node runtime smoke, and verifies psych
works at runtime.

Changes

  • homebrew/kandelo-homebrew/Formula/ruby.rb (new): Ruby 4.0.5 formula that builds
    through the resolver (psych/YAML included) and whose test block exercises
    require 'yaml' with a YAML.dump/YAML.load round-trip in addition to the basic
    interpreter check.
  • packages/registry/ruby/demo/yaml-smoke.ts (new): a Node runtime smoke that runs
    the built ruby.wasm under the kernel host (host-fs passthrough so RUBYLIB
    resolves) and asserts the YAML round-trip, printing the psych/libyaml versions.

Coordination (important)

This keeps/verifies psych, which directly conflicts with PR #810 (kd-p3hr): #810's
build-ruby.sh deletes the libyaml block and sets --with-out-ext=...,psych, i.e.
merging #810 as-is would regress psych/YAML off main. This PR relies on main's
psych-enabled build-ruby.sh and does not modify it. The #810 psych removal must be
reconciled (not merged) — flagged to the coordinator. Published-bottle acceptance
tracks kd-yuef.

Verification

  • Ruby built via build.sh + build-ruby.sh: libyaml 0.2.5 built, psych compiled and
    statically linked (psych.a); runtime stdlib includes psych.rb/yaml.rb.
  • Node runtime smoke (npx tsx packages/registry/ruby/demo/yaml-smoke.ts):
    PASSpsych=5.3.1 libyaml=0.2.5; require 'yaml' + YAML.dump/YAML.load
    round-trip succeed. Outcome lists: test-runs/kd-egn1/yaml-node-smoke/outcome-lists/
    (1 passed / 0 failed / 1 skipped).
  • Browser smoke: skipped here — published-bottle/browser acceptance tracks kd-yuef;
    local Node runtime is verified.

Bead: kd-egn1 (initiative: homebrew-all; follow-up of kd-p3hr)

🤖 Generated with Claude Code

main already builds Ruby with psych/YAML (libyaml 0.2.5, --with-ext=...,psych,...),
but ships no ruby.rb Homebrew formula and no runtime test that YAML actually works.
Add the psych-including formula plus a Node runtime smoke, and verify psych at runtime.

- homebrew/kandelo-homebrew/Formula/ruby.rb: Ruby 4.0.5 formula whose test block
  exercises require 'yaml' + a YAML.dump/load round-trip (not just the interpreter).
- packages/registry/ruby/demo/yaml-smoke.ts: Node runtime smoke that runs the built
  ruby.wasm under the kernel host (host-fs passthrough so RUBYLIB resolves) and
  asserts the YAML round-trip.

Verified under Node: psych=5.3.1, libyaml=0.2.5; require 'yaml' + YAML.dump/load
round-trip pass.

Relies on main's psych-enabled build-ruby.sh and does not modify it. PR #810
(kd-p3hr) removes psych from build-ruby.sh (--with-out-ext=...,psych); that removal
must be reconciled so it does not regress psych/YAML off main.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
brandonpayton added a commit that referenced this pull request Jul 1, 2026
This branch's first Ruby port removed psych/YAML (dropped the libyaml build block,
--with-out-ext=...,psych, psych out of STATIC_EXTINITS/EXTOBJS/EXTLIBS). Runtime
verification in kd-egn1 (PR #814) shows psych/YAML actually works on Kandelo
(psych=5.3.1, libyaml=0.2.5), so the removal was an unnecessary regression that
would strip psych from main once this merges.

Reconcile per coordinator decision (kd-egn1 owns Ruby): revert
packages/registry/ruby/build-ruby.sh to origin/main (known-good psych) and delete
this branch's homebrew/kandelo-homebrew/Formula/ruby.rb so #814's ruby.rb is the
sole ruby formula. This branch no longer touches Ruby vs main; its other language
runtimes (perl/cpython/php/erlang/texlive) are unchanged.

This branch's resolver-contract / sysroot-avoidance edits to build-ruby.sh are
preserved for a follow-up (test-runs/kd-egn1/810-reconcile/) rather than lost.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
brandonpayton added a commit that referenced this pull request Jul 1, 2026
…s bottle

This branch's perl.rb staged the runtime by globbing the source tree, which
could not include the generated XSLoader.pm (never produced by `make perl`), so
File::Spec failed. PR #821 (kd-k7zy) fixes this end to end: it generates the
core-module runtime, packages it as perl-runtime.zip, statically links the core
XS (Kandelo wasm has no dlopen), and fixes the target -fno-strict-aliasing
miscompile -- File::Spec/POSIX/Cwd/XSLoader all load (Node-verified).

Per coordinator decision (kd-k7zy owns Perl, same resolution as ruby->#814 /
cpython->#818): revert packages/registry/perl/build-perl.sh to origin/main and
delete this branch's homebrew/kandelo-homebrew/Formula/perl.rb so #821's perl is
the sole owner. This branch no longer touches Perl vs main; php/erlang/texlive
are unchanged. #810's build-perl.sh delta was purely the resolver-contract
refactor, which #821 already carries, so nothing is preserved separately.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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