Remove dead :unions_with_bind render branch#11
Open
alexskr wants to merge 1 commit into
Open
Conversation
The non-optional `:unions_with_bind` branch in `Query#to_s` was unreachable: its DSL writer (`union_with_bind_as`) was dropped during an earlier reset-to-upstream + manual reapply, leaving the render branch orphaned with no way to populate `options[:unions_with_bind]`. Confirmed unused across all active downstream lineages (ncbo/goo, ontoportal/goo, and the AgroPortal/LIRMM `ontoportal-lirmm-development` branch) — every consumer calls only `optional_union_with_bind_as`. This is a pure dead-code removal; query output is unchanged. The live `:optional_unions_with_bind` path and the shared `add_union_with_bind` helper it relies on are retained. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.
What
Removes the unreachable
:unions_with_bind(non-optional) render branch fromQuery#to_sinlib/sparql/client/query.rb.Why
The branch was dead code. Its DSL writer (
union_with_bind_as) was dropped during an earlier reset-to-upstream + manual reapply of NCBO customizations, which keptoptional_union_with_bind_asbut dropped the inline setter — leaving the render branch orphaned with no way to populateoptions[:unions_with_bind]. A dead branch that still looks functional is a maintenance trap.Scope / safety
options[:unions_with_bind]has no writer in any active lineage, so no query the stack emits can reach this branch. Query output is unchanged.ncbo/goo,ontoportal/goo, and the AgroPortal/LIRMMontoportal-lirmm-developmentbranch all call onlyoptional_union_with_bind_as.:optional_unions_with_bindpath and the sharedadd_union_with_bindhelper it depends on.Not in scope (deliberately deferred)
The escaping hardening (route
add_union_with_bindinterpolation throughserialize_uri/serialize_value) and thebuffer.popguard touch the live optional path and should land as a separate change with its own test coverage.🤖 Generated with Claude Code