Repository navigation
SONARJAVA-7259 Introduce a compiler-neutral frontend backend with scoped resource management - #6432
aurelien-coet-sonarsource wants to merge 6 commits into
Conversation
c922a82 to
21c6673
Compare
|
/pvf |
|
📊 Performance Validation complete |
21c6673 to
408ed99
Compare
Resolve Apache license URLs through the existing local license-resource mechanism so normal packaging can validate its generated licenses.
Add repeatable snapshots of trees, tokens, semantics, diagnostics and scanner issues, plus explicit generic symbol and type identity assertions.
Route ordinary parser helpers through the neutral frontend facade and retain sessions through lazy assertions. Keep compiler-specific probes and capture batch metadata before session construction to preserve failure behavior.
408ed99 to
1ea0d28
Compare
Code Review ✅ Approved 2 closed / 2 findings🟡 Medium risk · Refactoring parsing into backend-owned sessions changes AST and semantic resource lifecycles, which could leak or prematurely close resources during analysis. Introduces a compiler-neutral frontend backend with scoped resource management, routing parsing through owned sessions so cleanup runs on success, failure, and cancellation. Resolved the cleaner Error handling that skipped remaining cleaners and the session leak when parsing throws an Error. No open issues found. ✅ 2 closed✅ Bug: Cleaner Error now skips and discards all remaining cleaners
✅ Bug: FrontendParser.parse leaks the session when parsing throws an Error
Verification Repos 1 inspected · PRs 1 inspectedFunctional validation No results Rules 1 not applicable Broader impact Repos 1 inspected PRs 1 inspectedCross-repo 1 repository inspected 0 open impactsCross-PR 1 PR inspected 0 open impacts
Auto-approval Not enabledFor more verification details, comment OptionsAuto-apply is off → Gitar will not commit updates to this branch. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Gitar |
|




Summary by Gitar
FrontendBackend,EcjFrontendBackend, andFrontendSessionto own parser configuration and parse lifecycle.FrontendResourcesso cleanup actions run on success, failure, and cancellation.FrontendParser,FrontendConfiguration, andFrontendBatchas entry points for parsing and batch inputs.JParserConfig,JavaFrontend, andJavaAstScannernow parse through sessions and owned resources.JSemaregisters its environment cleaner on the owning resource set.TestResourceScopeandSemanticFixturefor scoped parser fixtures in tests.FrontendContractSnapshotandFrontendLifecycleTestto check frontend output and lifecycle behavior.apache.txtlicense text and redirected Apache license URLs insonar-java-plugin/pom.xml.This will update automatically on new commits.