feat: add per-variable field initializers from codeanalyzer 2.3.8#157
Merged
sinha108 merged 1 commit intoJun 5, 2026
Merged
Conversation
sinha108
approved these changes
Jun 5, 2026
rahlk
added a commit
that referenced
this pull request
Jun 23, 2026
… fixes the emitter gaps
- reconstruct: a field with no initializers rehydrates to {} (not None), matching
the analyzer's analysis.json representation.
- Verified codeanalyzer-java 2.4.1 fixes the three projection gaps (#156/#157/#158):
rebuilt the 2.4.1 jar and re-ran the daytrader parity — fields no longer collapse
(642 JField nodes), imports link to :JType (1449), and J_CALLS went 287 -> 1702
(97% parity; the residual is external-target gating + run-to-run WALA variance
between the separate --emit json and --emit neo4j invocations). Docstring/CHANGELOG
updated; the SDK still pins 2.4.0 until 2.4.1 is released.
rahlk
added a commit
that referenced
this pull request
Jun 23, 2026
…r at 2.4.1 The Java analyzer jar is no longer a pip dependency — the SDK release workflow downloads the latest codeanalyzer-java jar (now v2.4.1) into the bundled jar/ dir. The earlier codeanalyzer-java==2.4.0 entry in [project.dependencies] was broken (2.4.x is not on PyPI; PyPI tops out at 2.3.7), so remove it and bump the [tool.backend-versions] marker to 2.4.1. v2.4.1 is now the latest release and fixes the field/import/call-graph projection gaps (#156/#157/#158), so a graph emitted by the bundled analyzer is a complete projection.
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.
Mirrored the new
variable_initializersfield from codeanalyzer 2.3.8 onJFieldand updated the bundled jar.Motivation and Context
The new codeanalyzer 2.3.8 emits field initializer expressions for allowing the consumption and processing of constants in class fields. These changes update
JFieldto contain the newvariable_initializers, instead of silently dropping it during validation.How Has This Been Tested?
In
test_java_analysis, a new test has been introduced that asserts initializers for different types of fields. The full Java-related local suites also pass.Breaking Changes
There are no breaking changes. The new field is intentionally defaulted to
Noneso existing cached analyses and older jars validate unchanged.Types of changes
Checklist
Additional context
This is a companion PR to this PR in the codeanalyzer repository.