✨ Prefer markly for Markdown; stop forcing other Markdown backends - #70
Merged
Merged
Conversation
- markdown-merge: :auto resolves markly, commonmarker, kramdown, then kreuzberg-language-pack (last resort); optional backends load markly first. Reported available_markdown_backends order is unchanged. - kettle-jem: drop commonmarker-merge and kramdown-merge runtime dependencies and local path entries; they remain usable when installed. Stops commonmarker's native build (fails on ruby-head) in every bundle that includes kettle-jem. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01P8aveNcdgPobyMrq8DkD9r
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.
Why
:autoorder: markdown-merge picked an unspecified (:auto) backend inBACKEND_REFERENCESorder: kreuzberg-language-pack, then commonmarker, markly, kramdown. The language pack is always registered, so the native parsers never got a chance. In kettle-jem's bundle today,Markdown::Merge.resolve_backend(nil)returns"kreuzberg-language-pack". Markly is the best Markdown parser we have and should come first.commonmarker-mergeandkramdown-mergeas runtime dependencies, although it loads onlymarkdown/mergeandast/crispr/markdown/markly. Every gem that bundles kettle-jem therefore compilescommonmarker. That native extension does not build on ruby-head:magnus0.8 is missing Ruby 4.1'shandle_weak_references, and the fix sits unreleased on magnus main. kettle-jem-appraisals'ruby-headjob has failed in setup this way since 2026-08-08.What
BACKEND_PREFERENCE(markly,commonmarker,kramdown,kreuzberg-language-pack) drives:autoresolution. An explicit backend andTreeHaver.current_backend_idstill win, and the language pack stays the final fallback.require … rescue LoadError), now markly first.BACKEND_REFERENCESandavailable_markdown_backendskeep their order, which the sharedstructuredmerge-fixturesslice-195 fixture defines for every language implementation.commonmarker-mergeandkramdown-mergeruntime dependencies. They are still used when a project installs them.Gemfile, fromgemfiles/modular/templating_local.gemfile, and from thetemplating_local.gemfile.exampletemplate.Gemfile.lockwas updated withbundle lock, using the env the committed lock is generated with. The diff only removes commonmarker-merge, kramdown-merge, commonmarker (all platforms) and rb_sys.Verification
.rubocop_gradual.lockwas force-updated withrubocop-gradual --force-update, with that fix applied locally. Only thelib/markdown/merge.rbentries change (line shifts from the new constant).Bundler/DuplicatedGemthat is already on main.ast/crispr/markdown/marklyandmarkdown/merge):Markdown::Merge.resolve_backend(nil)was"kreuzberg-language-pack"before and is"markly"now.available_markdown_backendskeeps its order.STRUCTUREDMERGE_DEVpointing at the branch,K_JEM_TEMPLATING=true): 686 examples, 0 failures.structuredmerge-fixturesslice-195 fixture still passes (fixtures_integration_spec).🤖 Generated with Claude Code
https://claude.ai/code/session_01P8aveNcdgPobyMrq8DkD9r