Repository navigation
docs: correct JavaBin native-image claim - #290
Merged
Merged
Conversation
SolrConfig, SolrNativeHints, AGENTS.md and the native-image dev doc said SolrJ's JavaBin codec uses deep reflection and needs extensive native-image hints, and gave that as the reason for XMLRequestWriter and the JSON parser. JavaBinCodec uses no reflection, and JavaBinResponseParser passes nativeTest -Pnative without an added hint. Describe the wire format without the false rationale. SolrNativeHints also called JsonResponseParser a SolrJ class and said the XML path is avoided, though updates use XMLRequestWriter. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Aditya Parikh <aditya.m.parikh@gmail.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.



Summary
Four places give a reason for the client's wire format that isn't true: that SolrJ's JavaBin codec "uses deep reflection" and would need extensive native-image hints.
SolrNativeHintsalso calledJsonResponseParsera SolrJ class (it is this project's) and said the XML path is avoided, though every update goes throughXMLRequestWriter.No code changes; only comments and docs.
Evidence
JavaBinCodec.javaatreleases/solr/10.0.0has nojava.lang.reflect,getDeclared*,getMethod,Class.forNameornewInstance. Its onejava.lang.invokeuse isMethodHandles.lookup()for the logger. It dispatches oninstanceofand tag bytes, which native-image analysis follows without hints.JavaBinResponseParserswapped in forJsonResponseParserand no hint added,./gradlew nativeTest -Pnativepassed (0 failed)../gradlew build: 460 tests, 0 failures, 0 skipped.Merge Danger
Door: two-way
Blast Radius: docs
🤖 Generated with Claude Code