Add Zeitwerk eager loading check to CI#95
Conversation
|
Hey! Thanks for the PR -- I'm open to this if your downstream changes merged into RubyLLM Only question is that Whatever RubyLLM provides as it solution for this, I'm happy to follow. |
|
Looks like I commented to soon and #94 provides that solution. Happy to merge this once RubyLLM does |
|
Sounds good, thanks! Also note this is entirely optional and pedantic, so if it's annoying later on of course feel free to remove! |
8d5d025 to
5d045b3
Compare
|
crmne/ruby_llm#504 was merged, so I'll keep an eye out for a RubyLLM release and then mark this ready for review...! |
|
Ok, we're live: https://github.com/crmne/ruby_llm/releases/tag/1.15.0 |
There was a problem hiding this comment.
Pull request overview
Adds a CI validation step to catch Zeitwerk autoload/eager-load issues early by running Zeitwerk::Loader.eager_load_all after Ruby dependencies are installed.
Changes:
- Add a “Check Zeitwerk eager loading” step to the Ruby test job in CI.
- Run the eager-load check before installing Bun dependencies / running specs.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| run: | | ||
| bundle install | ||
|
|
||
| - name: Check Zeitwerk eager loading |
Summary
Zeitwerk::Loader.eager_load_allvalidation to the CI test jobpatvice/mainafterruby_llm-mcpPR Fix Zeitwerk eager loading crash in non-Rails environments #94 was mergedProblem
Without automated Zeitwerk eager loading validation, autoloading issues can slip into production causing crashes. These issues include:
Solution
Add a simple validation step that runs
Zeitwerk::Loader.eager_load_allafter dependency installation. This structural validation provides fast feedback before the rest of the test job continues.Upstream Status
The original blocker in RubyLLM has been fixed on
ruby_llmmain:This PR remains draft until a published
ruby_llmgem release includes #504. The current latest RubyGems release isruby_llm1.14.1 from April 2, 2026, which still predates the fix.Testing
Local verification after rebasing still fails with the expected upstream gem issue because Bundler resolves
ruby_llm1.14.1:Command run locally: