Repository navigation
Conversation
XProcessing can report unresolved Java interfaces as additional superclasses when transitive supertypes are absent from a strict KSP classpath. Once assignability is established, non-generic targets do not require matching-supertype traversal. Return early for non-generic targets and add a two-stage classpath regression test that reproduces the XProcessing failure.
idanakav
marked this pull request as draft
September 10, 2026 22:51
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.
Description:
When KSP processes a Java class whose transitive supertypes are absent from its strict classpath, XProcessing can classify unresolved interfaces as classes.
For example:
Childis first compiled withParent,Foo, andBaravailable. The KSP consumer then receives only the direct artifact containingChildandTarget.When XProcessing computes
Child.superTypes, it identifies all three unresolved transitive types as classes and throws:The exception comes from XProcessing KSP type handling, which partitions supertypes into classes and interfaces and requires a class to have at most one superclass.
CompilerType.isAssignableTo()has already confirmed assignability before reaching this traversal:For a non-generic target, there are no type arguments to resolve through a matching supertype. Traversing the hierarchy cannot change the result and unnecessarily enters the failing XProcessing path.
This change moves the existing non-generic early return before
getMatchingSuperType():Generic targets retain the existing matching-supertype and type-argument checks.
The regression test reproduces the strict-classpath arrangement using two compilation stages:
Parent,Foo, andBaras an external dependency.ChildandTargetagainst that dependency.Child/Targetartifact.With the original ordering, the test fails with the three-superclass exception shown above. With the early return, it passes.
The current
room-compiler-processing:2.8.5artifact retains the same superclass-count invariant, so updating XProcessing alone does not remove this unsafe traversal.Test plan:
Related issue(s):
None.