refactor(api)!: drop the inert config and charset surface - #833
Merged
Conversation
Four HtmlConfig fields stored a value no view read: background_image_format and background_image_dpi, from when a background was rendered to a file; no_drm, from when the output carried a restriction; embed_outline, from when one was written. Gone with their java, python, objc and wasm mirrors. TextFile::charset() went with them - encoding() answers it as a TextEncoding, and reports unknown where charset() returned nullopt - and so did UnknownCharset, which nothing has thrown since a file that cannot be named is still text. The bindings keep their own charset() accessors: those read encoding() rather than the removed overload, and are the shape a binding wants until the enum itself is mirrored. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016hxDa2rev11eLUEJZJ5nmz
andiwand
force-pushed
the
refactor/drop-inert-config
branch
from
September 6, 2026 12:59
fd0e001 to
e8293f9
Compare
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
PR 3 of the v7 API plan.
Same premise as #832 — surface that was kept only so existing callers kept
compiling, removed now that a major allows it.
HtmlConfigFour fields stored a value no view ever read back:
background_image_format,background_image_dpino_drmembed_outlineGone with their java, python, objc and wasm mirrors — including the
@deprecatedentries inindex.d.ts, so a TypeScript caller finds out atcompile time.
TextFile::charset()andUnknownCharsetcharset()wastext_encoding_to_string(encoding())with anulloptforunknown.
encoding()says the same thing as aTextEncodingand reportsTextEncoding::unknowninstead of an empty optional.UnknownCharsetgoestoo — nothing throws it, because a file whose encoding cannot be named is still
text.
The bindings keep their own
charset(). Worth being explicit, because itlooks like an oversight and is not: those accessors are not mirrors of the
removed overload — JNI, python and objc each build the string from
encoding()directly. Removing them would lose the accessor rather thanredirect it, because
TextEncodingis not mirrored in any binding. So abinding-side removal has a prerequisite, which turns out to matter beyond this
PR:
That reordering is the one thing here that was not in the plan when #831 was
written; I will update the plan doc on that branch.
Verified
Library, CLI, JNI + jar, python module and
odr_testbuild clean; 69 pythontests and the 57
*Csv*/*Text*/*Encoding*gtests pass.Migration
config.background_image_*,config.no_drm,config.embed_outline— delete.text_file.charset()→text_file.encoding(), comparing againstTextEncoding::unknowninstead of checking the optional.text_encoding_to_stringgives the old string back if you want it.