Skip to content

gemspec: drop the stale ox dependency (fixes #74) - #75

Open
ronaldtse wants to merge 1 commit into
unitsml:mainfrom
ronaldtse:fix/drop-stale-ox
Open

ronaldtse wants to merge 1 commit into
unitsml:mainfrom
ronaldtse:fix/drop-stale-ox

Conversation

@ronaldtse

Copy link
Copy Markdown
Contributor

Drop the stale ox dependency

Fixes #74 (filed with the full analysis; zero comments since, so here is the one-line PR it offered).

Verification (this PR's evidence, current main):

$ grep -rnE '\bOx\b|require .ox' lib/ spec/   # moxml false-positives excluded
(no matches)

unitsml.gemspec declares spec.add_dependency "ox" but nothing in lib/ or spec/ requires or references it — stale from before the moxml/lutaml-model migration.

Why removal matters (from #74): Moxml::Config.detect_loaded_adapter prefers :ox whenever the Ox constant is defined, so unitsml dragging ox into every consumer's bundle silently forces all moxml traffic in the process onto the ox adapter. ox is additionally a TruffleRuby cext crash hazard under sustained load (oracle/truffleruby#4454), which we hit packaging Metanorma with tebako. Removing the unused dep lets applications pick their XML backend deliberately (leptris via moxml ≥ 0.5, nokogiri, …).

Change: gemspec −1 line (the runtime dep), Gemfile −1 line (the same autodetect hijack in the development bundle — restore if that entry was deliberate adapter coverage). No code change; nothing calls Ox.

— filed on behalf of the tebako ecosystem (tebako-ci)

No code references Ox: no require "ox", no Ox. constant use anywhere
in lib/ or spec/ — the dependency is stale from before the
moxml/lutaml-model migration. Its mere presence hijacks moxml's
adapter auto-detection (detect_loaded_adapter prefers :ox whenever the
Ox constant is defined), forcing every consumer's moxml traffic onto
ox whether they chose it or not; ox is additionally a TruffleRuby
cext crash hazard (truffleruby/truffleruby#4454).

The Gemfile entry goes too: it re-introduces the same autodetect
hijack into the development bundle. No replacement needed — nothing
calls Ox.
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.

Remove stale ox dependency (unused in code; hijacks moxml adapter auto-detection)

2 participants