refactor(api)!: drop the inert globals - #832
Merged
Merged
Conversation
GlobalParams stored two paths nothing read. The renderer's css and js became part of the library and detection became our own, and both accessors were kept only so a caller that pointed us somewhere kept working. v7 is where that ends. Gone with it: the java, python and objc mirrors, OdrAndroid and its no-op init, ODRGlobalParams.bootstrapFromFrameworkBundle, and the ODR_WITH_LIBMAGIC / ODR_BUNDLE_ASSETS cmake options with the conan options that set them - the latter two did nothing but print a deprecation. The android instrumented test loses its init case and is renamed for what it still checks: that the AAR works with no setup at all. 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-globals
branch
from
September 6, 2026 12:52
c99976b to
6fe2167
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 2 of the v7 API plan.
docs/design/README.mdhas carried this as an open task for a while, with thereason it was still open written into it: "Removing them is the breaking change
this deliberately is not." A major is when it becomes one.
What was inert, and since when
GlobalParamsstored two strings and read neither back:odr_core_data_path— where the renderer's css and js used to be read from.They are compiled into the library now.
libmagic_database_path— themagic.mgcevery consumer had to ship andpoint us at. Detection is our own, and it reads inside zip and cfb
containers, which libmagic could not.
Both accessors were kept so a caller that configured them kept compiling. Same
for
ODR_WITH_LIBMAGICandODR_BUNDLE_ASSETS, which by then did nothing butprint a
message(DEPRECATION).What goes
odr/global_params.hpp,global_params.cppGlobalParams.java, fourJava_..._GlobalParams_*entry pointspyodr.GlobalParamsODRGlobalParamsincl.bootstrapFromFrameworkBundleOdrAndroidand its no-opinit(context)ODR_WITH_LIBMAGIC,ODR_BUNDLE_ASSETS, conanwith_libmagic,bundle_assetsNet −327/+23.
HtmlConfig::embed_shipped_resources,resource_path,relative_resource_pathsandHtmlResource::is_shippedare not touched —those decide where the compiled-in css and js land, which is a live question.
What died is the idea of finding a data directory.
Notes
OdrAndroidemptiesandroid/src/main/java; the module's sourcescome from
../jni/javaviasourceSets, so nothing else changes.OdrAndroidTestloses itsinitIsANoOpcase and is renamedAarContractTest— it now only checks what it was always really about, that the AAR works with
no setup.
Verified
Library, CLI, JNI + java jar, python module and
odr_testall build; the 68python tests pass. Apple and wasm are deletions only, with no remaining
reference to
ODRGlobalParamsanywhere in the tree.Migration
Delete the calls. Nothing replaces them — that is the point.