Repository navigation
Conversation
jaschdoc
reviewed
Oct 16, 2026
bcorso
force-pushed
the
bcorso/simplify-incremental-java-file-manager
branch
4 times, most recently
from
October 19, 2026 16:31
5bc47ba to
db47fac
Compare
Collaborator
|
Please rebase on main :) |
bcorso
force-pushed
the
bcorso/simplify-incremental-java-file-manager
branch
6 times, most recently
from
October 26, 2026 05:33
280ad43 to
dea4de8
Compare
Collaborator
Author
Done! |
bcorso
force-pushed
the
bcorso/simplify-incremental-java-file-manager
branch
from
November 2, 2026 19:43
dea4de8 to
ba87740
Compare
…avaFileManager. CliJavaModuleFinder in IncrementalJavaFileManager.initialize was constructed with jdkHome = null and jdkRelease = null, so jrtFileSystemRoot and modulesRoot are always null and getDefaultJdkModuleRoots always returned an empty list. Additionally, KotlinSymbolProcessing.createAASession already registers kspConfig.jdkHome as a KaLibraryModule via buildKspSdkModule, so StandaloneProjectFactory.getAllBinaryRoots already includes all JDK module roots inside libraryRoots. Pass the already-computed libraryRoots and createPackagePartProvider from KotlinSymbolProcessing directly to IncrementalJavaFileManager instead of resolving binary roots and creating a package part provider a second time, index libraryRoots directly in init, remove the separate initialize method so both initial and incremental Java source files use add via a shared addRoots helper, and skip adding empty sub-indices when indexing single Java source files.
bcorso
force-pushed
the
bcorso/simplify-incremental-java-file-manager
branch
from
November 2, 2026 20:38
ba87740 to
e1c3868
Compare
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.
This PR simplifies classpath/source root indexing and improves readability across
IncrementalJavaFileManagerandKotlinSymbolProcessing:IncrementalJavaFileManager)Previously,
IncrementalJavaFileManagerre-resolved binary roots and created a separate package part provider during initialization even thoughKotlinSymbolProcessingalready computed both during session setup. It also set up aCliJavaModuleFinderwithjdkHome = nullwhose JDK root lookup was a no-op because SDK roots are already included inlibraryRoots. Passing the precomputedlibraryRootsandcreatePackagePartProviderdirectly allows binary roots to be indexed upfront during construction and lets initial and incremental Java source files share a singleaddcode path (skipping empty sub-index additions when no new source files are present).KSFilesetup (KotlinSymbolProcessing)Extracts a shared
prepareKSFileshelper forprepareAllKSFilesandprepareNewKSFilesto avoid duplicating Java PSI file creation and incremental Java source indexing between initial setup and subsequent processing rounds.KotlinSymbolProcessing.executeinto focused helper methods (KotlinSymbolProcessing)Splits error tracking, code generator setup, incremental context initialization, processor instantiation, processing round execution, finalization, and cache clearing out of
executeso the top-level processing flow is concise and easier to follow.