Skip to content

Skip binary Ruby sources when scanning cache digest dependencies - #2751

Merged
joelhawksley merged 4 commits into
ViewComponent:mainfrom
joeljunstrom:fix-cache-digest-binary-sources
Oct 27, 2026
Merged

joelhawksley merged 4 commits into
ViewComponent:mainfrom
joeljunstrom:fix-cache-digest-binary-sources

Conversation

@joeljunstrom

@joeljunstrom joeljunstrom commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

Some gems, like avo-advanced_search, load components from encrypted files. The component identifier then points at a binary file, and scanning it for render calls raised invalid byte sequence errors at boot. Those files are still hashed into the digest, so changing them still busts the cache.

What are you trying to accomplish?

Avoid blowing up if a project has dependencies with binary components

What approach did you choose and why?

Just check the encoding instead of trying to guess around extensions etc. We are already reading to checking if encoding is valid should be cheap.

Anything you want to highlight for special attention from reviewers?

Nothing comes to mind =)

Some gems, like avo-advanced_search, load components from encrypted files.
The component identifier then points at a binary file, and scanning it for
render calls raised invalid byte sequence errors at boot. Those files are
still hashed into the digest, so changing them still busts the cache.
Comment thread docs/CHANGELOG.md Resolved
@joelhawksley
joelhawksley merged commit eff8252 into ViewComponent:main Oct 27, 2026
25 checks passed
@joeljunstrom
joeljunstrom deleted the fix-cache-digest-binary-sources branch October 27, 2026 18:30
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.

2 participants