feat(api)!: drop DocumentPath - #901
Merged
Merged
Conversation
A path addressed an element by position, and the edit path left it for the id an element carries, which an insert or a delete does not shift. Nothing public read a path any more but the python and Java mirrors. `DocumentPath`, `Element::document_path`, `Element::navigate_path`, the adapter hooks behind them and the utility that walked them are gone; an element is named by `Element::identifier` and found by `Document::element_by_id`. The tests that addressed an element by a path string walk one of their own. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0137vd79NGaB8nfLsdPoghM4
andiwand
added a commit
that referenced
this pull request
Sep 13, 2026
`Element.documentPath()` went in #901, and the instrumented suite was the one caller the removal missed, since it sits outside the binding directories. It asserts the id round trip instead. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0137vd79NGaB8nfLsdPoghM4
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.
🤖 Generated with Claude Code
The third of the three public-API changes before the major. Independent of the other two, rebased onto main after #900 merged.
What goes.
DocumentPath,Element::document_path()andElement::navigate_path(), the two adapter hooks behind them, andinternal/util/document_util, which only walked paths. With them the python class and methods, the JavaDocumentPathclass withElement.documentPath()andnavigatePath(), and their tests.Why. A path addressed an element by position, and the edit path left it in #873 for the id an element carries, which an insert or a delete does not shift. Nothing public read a path any more but the two binding mirrors. An element is named by
Element::identifier()and found byDocument::element_by_id(), which is what the edit envelope uses.The tests.
document_test.cppaddressed elements by strings like/child:41/child:0/child:1and/child:0/cell:A1/child:0, which is what a reader can check against a file. It now walks those with a helper of its own,navigate, pluspath_offor the tests that save and reload and so cannot hold an id across the two decodes. The repeated-cell and csv tests that round-tripped a path round-trip the id instead.csv_document.cppreachedTablePositionthrough the removed header and includes it itself now.Verified. The full suite passes, 1818 tests. JUnit 62 (one path test gone) and pytest 83 pass, and python exposes neither the class nor the methods. The touched translation units are clean under Homebrew clang
-Wall -Wextra -Werror. Nothing in the Objective-C or wasm bindings named a path.Changelog entry added, marked breaking.