Repository navigation
fix(docx): mark the Word export's 2.5 API @Beta where it was unmarked - #1018
Merged
Merged
Conversation
The API reference reads stability from the annotation, so an unmarked member is listed as Stable whatever docs/api-stability.md says. Seven elements that 2.5 added to render-docx and the semantic export SPI carried no @beta: - DocxBackendProvider; - the DocxSemanticBackend(Consumer<DocxExportReport>) constructor; - DocxExportReport.Note and DocxExportReport.Severity: a nested type does not take its enclosing type's marker; - DocxSemanticBackend's requiresResolvedLayout and exportSections: Java does not carry a method's annotation to its override; - the six-argument canonical constructor of SemanticExportContext, which takes the @beta layoutGraph and layoutFailure components. All seven are new in 2.5, so nothing that was Stable in a release changes tier. The Stable path is unchanged: new DocxSemanticBackend(), session.export(backend, path) and the four- and three-argument SemanticExportContext constructors. docs/api-stability.md names each of them, and the CHANGELOG, the capability matrix, the render-docx README and the DOCX recipe say the same. The @beta members of the semantic SPI gain the Experimental line in their Javadoc that other @beta elements carry. DocxBetaSurfaceTest and SemanticExportContextTest pin the marker on each element, and its absence on the Stable path. The knowledge pack is regenerated.
…al line DocxSemanticBackend.builder() and Builder were @beta without the Experimental line other @beta elements carry; they gain it. The two overrides drop their own line: {@inheritdoc} already brings the one on the methods they override, so it showed twice. The canonical SemanticExportContext constructor gains @SInCE 2.5.0, and two paragraphs of the CHANGELOG and api-stability.md are reflowed.
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
The API reference reads stability from the annotation: a member without
@Betais listed as Stable, whateverdocs/api-stability.mdsays. Seven elements that 2.5 added torender-docxand the semantic export SPI had no marker:DocxBackendProvider@Beta; named under semantic backend discoveryDocxSemanticBackend(Consumer<DocxExportReport>)@BetaDocxExportReport.Note,DocxExportReport.Severity@Betarecord@BetaDocxSemanticBackend.requiresResolvedLayout,.exportSections@Betamethods. Java does not carry a method's annotation to its override@BetaSemanticExportContext's six-argument canonical constructor@BetalayoutGraphandlayoutFailurecomponents@BetaAll seven are new in 2.5 (absent from the 2.4.1 knowledge pack), so nothing that was Stable in a release changes tier.
The rest of what 2.5 added there already matched the page:
DocxExportReport;DocxSemanticBackend.builder()andBuilder;layoutGraph/layoutFailurecomponents andrequireLayoutGraph;SemanticBackendProvider(s),SemanticSection, andSemanticBackend.exportSections/requiresResolvedLayout;toDocxBytes/writeDocx/buildDocxonDocumentSessionandMultiSectionDocument;PageContext.unpaginated(boolean, boolean).What changed
@Betaon the seven elements, each with the Experimental line in its Javadoc that other@Betaelements carry. The two overrides inherit it through{@inheritDoc}.@Betabut had no Experimental line. They gain it:SemanticBackend.requiresResolvedLayout,SemanticBackend.exportSections,SemanticExportContext.requireLayoutGraph, the record's components,DocxSemanticBackend.builder()andBuilder.docs/api-stability.md:DocxBackendProvider;NoteandSeverity;exportSectionsoverride.Note/Severityand the constructor. The migration note lists the provider among the@Betaadditions.render-docxREADME name the provider as Experimental, and the DOCX recipe's report section says the report is.backends.json/backends.mdchange, by the[beta]markers above.DocxBetaSurfaceTest(render-docx) pins the marker on each DOCX element. It also pins that the Stable path stays unmarked: theDocxSemanticBackendclass, its no-argument constructor,name()andexport(graph, context).SemanticExportContextTest(core) pins the marker on the six-argument constructor and its absence on the four- and three-argument ones.The Stable path is unchanged. Adding an annotation breaks neither binary nor source compatibility.
Scope:
render-docxand the semantic export SPI.ShapeNode.divider, an authoring-side component also new in 2.5, is not changed here.Verification
./mvnw -B -ntp clean install -pl :graph-compose-render-docx -amand./mvnw -B -ntp test -f qa/pom.xml: core 842, render-pdf 339, render-docx 2545 and qa 1910 tests, 0 failures.node knowledge/tools/api-surface/extract-api.mjs --from-reactor --check: current.check-stability-doc.mjs: every originating@Betais named (2 packages, 10 types, 26 members)../mvnw -B -ntp -DskipTests -P japicmp verify -pl :graph-compose-core,:graph-compose-templatesends in BUILD SUCCESS, and all three executions ran. The core report lists the six-argument constructor asNEW CONSTRUCTORwithNEW ANNOTATION: …Beta, and reports no break.b2fd72ac9):clean verifyof the 12-module reactor, as CI runs it; the four knowledge checks of CI's JDK 17 job (API surfaces, stability doc, claims, routes); core javadoc (0 warnings); then install and the examples tests (93). It ends in GATE PASS.Lane: canonical surface (public API markers and docs). No layout or render code changes, so the DOCX corpus is untouched.