Skip to content

Add CI check for RI backward compatibility#1625

Merged
st0012 merged 1 commit intomasterfrom
ri-backward-compat-ci
Feb 24, 2026
Merged

Add CI check for RI backward compatibility#1625
st0012 merged 1 commit intomasterfrom
ri-backward-compat-ci

Conversation

@st0012
Copy link
Member

@st0012 st0012 commented Feb 23, 2026

Adds a CI workflow that catches Marshal format incompatibilities between old and new RDoc versions, preventing regressions like #1535.

How it works

  1. Installs an old RDoc gem (matrix: 6.5.0, 6.9.0, 7.0.2)
  2. Uses it to generate ri data from RDoc's own lib/
  3. Installs the current RDoc from the branch
  4. Loads all modules from the old ri data — fails if any Marshal incompatibility exists

Verification

Temporarily removing the RUBY_VERSION guard from Heading (reverting it from Struct to always-Class) causes the check to fail as expected:

https://github.com/ruby/rdoc/actions/runs/22323179123

@matzbot
Copy link
Collaborator

matzbot commented Feb 23, 2026

🚀 Preview deployment available at: https://d8d6743f.rdoc-6cd.pages.dev (commit: 60551ff)

Prevents regressions like #1535 where Marshal format changes
(e.g., Heading Struct → class) break ri when reading data
generated by older RDoc versions.

The check generates ri data using old RDoc gem versions, then
installs the current RDoc and verifies it can still read that data.
@st0012 st0012 force-pushed the ri-backward-compat-ci branch from 0302e40 to 60551ff Compare February 23, 2026 20:32
@st0012 st0012 marked this pull request as ready for review February 23, 2026 20:33
Copy link
Member

@kou kou left a comment

Choose a reason for hiding this comment

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

+1

@st0012 st0012 merged commit 44b6976 into master Feb 24, 2026
74 checks passed
@st0012 st0012 deleted the ri-backward-compat-ci branch February 24, 2026 11:45
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.

3 participants