You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Export Java graph shards from the compiler invocation that already type-checks
the project, using the public javac plugin/tree/model APIs after attribution.
Preserve Gradle/Maven incremental state and use a JDT workspace route only when
the resident IDE model is the semantic owner. Do not run clean, query JDT once
per declaration, or type-check the same source a second time for enrichment.
Current master baseline
Current master registers scip-java for Java and Kotlin. For Java it publishes semantic-index authority with contains and references. The PR #147 Gson
cold cell took 88.653 s, compared with 231.398 s through generic JDT LS
fan-out.
javac/kotlinc plugins emit SCIP directly rather than SemanticDB;
the supported floor is Java 17 and Gradle 8;
Scala/Zinc support was removed; and
the default Gradle/Maven path performs a real build and includes clean.
Its artifact remains a useful navigation fallback, but SCIP has no call role.
Imports/accesses/implementation relationships are producer-specific, and the
order-based overload/constructor discriminator churns when declarations are
inserted or reordered.
Upstream mechanism
The public JDK compiler API is enough for the build-integrated route:
Plugin
is loaded by ServiceLoader on the processor path and receives the active JavacTask;
a plugin registers a TaskListener
for parse/enter/analyze/generate/compilation events; and
Trees
maps attributed TreePaths to Element, TypeMirror, source positions,
scopes and declaration trees.
Elements/Types provide direct supertypes, member lookup and override checks.
No private javac AST parser is required for the initial strict provider.
Annotation-processor/generated source handling still needs lifecycle tests.
Decision: two semantic-owner lanes, one protocol
Build lane: javac plugin
Attach a versioned graph plugin to the project's ordinary Java compile tasks.
On ANALYZE completion for a compilation unit, scan its attributed tree once
and write a source shard. At final compilation completion, write the ordered
manifest/commit record only if diagnostics and the build universe satisfy the
configured policy.
Integrate through Gradle/Maven without replacing their task graph:
Gradle: add the plugin/processor path and -Xplugin: option to each actual
Java source-set compile task; retain daemon, build cache, configuration cache
and incremental compilation;
Maven: attach to the existing compiler execution and target directory; do not
prepend clean; and
Bazel/other javac hosts: attach at the toolchain/action boundary only when the
exact target/action inputs are nameable.
If a task is UP-TO-DATE, load the previously committed shards. Deleted source,
classpath, compiler-option, annotation-processor or generated-source changes
must invalidate the affected manifest even when no plugin invocation occurs.
Resident lane: JDT
When an Eclipse/JDT workspace already owns unsaved/resident source, expose a
narrow bulk snapshot from that workspace and its reconciled compilation units.
It must produce the same graph schema and identities as the javac route and
must freeze one workspace generation. It is a fallback/IDE lane, not a second
pass after javac.
MethodInvocationTree and member references to resolved executable elements;
NewClassTree/constructor elements for instantiation;
identifiers/member selects plus assignment/update context for reads/writes;
TypeMirror and tree paths for type references;
direct class/interface supertypes and Elements.overrides for inheritance and
overrides;
annotations with resolved annotation type and annotated target;
diagnostics from the same compilation task; and
test facts only through a named JUnit/TestNG enricher with framework
provenance.
Virtual/interface calls identify the statically selected method. Runtime
implementations remain candidate/unresolved unless final/sealed analysis proves
one exact target.
Identity and universe
Use module/artifact coordinate plus binary owner name, item kind and a canonical
structural signature:
methods/constructors include erased or fully qualified parameter types,
generic arity and return/type-parameter context as required;
fields, record components, enum constants and annotation elements remain
distinct;
locals include source file, enclosing stable member and lexical structure;
anonymous/local classes include a structural owner key that does not change
on unrelated line insertion; and
source/bridge/generated elements retain origin and generator/processor
provenance.
Do not trust scip-java's +N overload ordinal as the final ID. Exact fixtures
must insert/reorder overloads and constructors without renaming unaffected
members.
The universe includes module/source set, Java release/preview flags, classpath
and module path order/content, compiler/JDK version, annotation processors and
options, generated sources, Gradle/Maven target coordinates and relevant build
properties. One multi-module build can have several target universes.
Incremental and correctness behavior
no-op: validate existing manifest; compiler need not run;
private body edit: ordinary incremental compile writes only affected source
shards;
public ABI edit: build tool/compiler invalidates dependents, and the graph
records the affected target/source closure;
annotation processor or classpath change: invalidate generated/consumer
shards according to the build;
compiler error: publish diagnostics and either a clearly partial generation
or retain the prior strict generation according to the common policy—never
silently combine old and new facts;
delete/rename: explicit shard deletion; and
cancellation/crash: no commit.
Cold acceptance is relative to the same build without the graph plugin. Target
overhead is at most 25% plus serialization, with no extra compilation.
Outcome
Export Java graph shards from the compiler invocation that already type-checks
the project, using the public javac plugin/tree/model APIs after attribution.
Preserve Gradle/Maven incremental state and use a JDT workspace route only when
the resident IDE model is the semantic owner. Do not run
clean, query JDT onceper declaration, or type-check the same source a second time for enrichment.
Current master baseline
Current master registers
scip-javafor Java and Kotlin. For Java it publishessemantic-indexauthority withcontainsandreferences. The PR #147 Gsoncold cell took 88.653 s, compared with 231.398 s through generic JDT LS
fan-out.
scip-java 0.13.x changed its architecture:
scip-code/scip-java;clean.Its artifact remains a useful navigation fallback, but SCIP has no call role.
Imports/accesses/implementation relationships are producer-specific, and the
order-based overload/constructor discriminator churns when declarations are
inserted or reordered.
Upstream mechanism
The public JDK compiler API is enough for the build-integrated route:
Pluginis loaded by
ServiceLoaderon the processor path and receives the activeJavacTask;TaskListenerfor parse/enter/analyze/generate/compilation events; and
Treesmaps attributed
TreePaths toElement,TypeMirror, source positions,scopes and declaration trees.
Elements/Typesprovide direct supertypes, member lookup and override checks.No private javac AST parser is required for the initial strict provider.
Annotation-processor/generated source handling still needs lifecycle tests.
Decision: two semantic-owner lanes, one protocol
Build lane: javac plugin
Attach a versioned graph plugin to the project's ordinary Java compile tasks.
On
ANALYZEcompletion for a compilation unit, scan its attributed tree onceand write a source shard. At final compilation completion, write the ordered
manifest/commit record only if diagnostics and the build universe satisfy the
configured policy.
Integrate through Gradle/Maven without replacing their task graph:
-Xplugin:option to each actualJava source-set compile task; retain daemon, build cache, configuration cache
and incremental compilation;
prepend
clean; andexact target/action inputs are nameable.
If a task is
UP-TO-DATE, load the previously committed shards. Deleted source,classpath, compiler-option, annotation-processor or generated-source changes
must invalidate the affected manifest even when no plugin invocation occurs.
Resident lane: JDT
When an Eclipse/JDT workspace already owns unsaved/resident source, expose a
narrow bulk snapshot from that workspace and its reconciled compilation units.
It must produce the same graph schema and identities as the javac route and
must freeze one workspace generation. It is a fallback/IDE lane, not a second
pass after javac.
Fact extraction
Walk attributed trees and elements:
MethodInvocationTreeand member references to resolved executable elements;NewClassTree/constructor elements for instantiation;TypeMirrorand tree paths for type references;Elements.overridesfor inheritance andoverrides;
provenance.
Virtual/interface calls identify the statically selected method. Runtime
implementations remain candidate/unresolved unless final/sealed analysis proves
one exact target.
Identity and universe
Use module/artifact coordinate plus binary owner name, item kind and a canonical
structural signature:
generic arity and return/type-parameter context as required;
distinct;
on unrelated line insertion; and
provenance.
Do not trust scip-java's
+Noverload ordinal as the final ID. Exact fixturesmust insert/reorder overloads and constructors without renaming unaffected
members.
The universe includes module/source set, Java release/preview flags, classpath
and module path order/content, compiler/JDK version, annotation processors and
options, generated sources, Gradle/Maven target coordinates and relevant build
properties. One multi-module build can have several target universes.
Incremental and correctness behavior
shards;
records the affected target/source closure;
shards according to the build;
or retain the prior strict generation according to the common policy—never
silently combine old and new facts;
Cold acceptance is relative to the same build without the graph plugin. Target
overhead is at most 25% plus serialization, with no extra compilation.
Implementation map
integration; do not put a JVM inside the TypeScript package.
only after a handshake proves target coverage.
Acceptance
accesses, types, direct inheritance, overrides, annotations, diagnostics
and source evidence.
clean, no disabled Gradle daemon/configuration cache, and no secondcompiler pass.
JPMS, records, sealed types, overloads, constructors, generics, lambdas,
anonymous/local classes, annotation processing and generated sources.
change, error, cancel, crash and retry are atomic.
producer/universe provenance.
latency are reported separately.
pnpm build,pnpm test, andpnpm coveragepass.Primary references