Fix cross-compile path nesting and ruby-version-file warning in CD#156
Merged
martinemde merged 2 commits intomainfrom Jan 26, 2026
Merged
Fix cross-compile path nesting and ruby-version-file warning in CD#156martinemde merged 2 commits intomainfrom
martinemde merged 2 commits intomainfrom
Conversation
The compile.rake was adding the host Ruby version to ext.lib_dir while extconf.rb added the target Ruby version, causing double nesting like lib/code_ownership/4.0/3.2/code_ownership.so instead of the expected lib/code_ownership/3.2/code_ownership.so. This broke gem loading on Ruby 4.0 with "cannot load such file" errors.
Replace ruby-version-file with explicit ruby-version to avoid "Unexpected input" warnings from the setup-ruby action.
martinemde
approved these changes
Jan 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes the CD pipeline failure where the x86_64-linux smoke test failed with
cannot load such file -- code_ownership/4.0/code_ownership.Problem
Two issues were causing the CD workflow to fail:
1. Double path nesting during cross-compilation
compile.rakeadded the HOST Ruby version (4.0) toext.lib_dirextconf.rbadded the TARGET Ruby version to the extension pathlib/code_ownership/4.0/3.2/code_ownership.soinstead oflib/code_ownership/3.2/code_ownership.so2. Invalid input
ruby-version-fileThe
ruby-version-fileinput was being passed toruby/setup-ruby, but this is not a valid input. Looking at the action.yml, the valid inputs are:ruby-version,rubygems,bundler,bundler-cache,working-directory,cache-version,self-hosted,windows-toolchain, andtoken.The action automatically reads from
.ruby-versionwhenruby-versionis unset or set to'default'. Using explicitruby-version: '4.0'avoids the warning and is more explicit.Fix
compile.rakesinceextconf.rbalready handles the Ruby version in the pathruby-version-file: .ruby-versionwithruby-version: '4.0'in the CD workflow