Files
kotlin-fork/analysis
Marco Pennekamp a61c6f6502 [LL FIR] Fix KtNotUnderContentRootModuleForTest requesting sessions too early
- `KtNotUnderContentRootModuleForTest.directRegularDependencies` is
  called during project structure creation, which led to builtins
  session creation during that period. This in turn led to the creation
  of `JvmStubBasedFirDeserializedSymbolProvider`, which failed upon the
  initialization of `declarationProvider` because
  `KotlinDeclarationProviderFactory` wasn't registered yet. This is
  precisely why `declarationProvider` was made lazy.
- However, with the new `FirSymbolNamesProvider`, keeping
  `declarationProvider` lazy is harder, because `symbolNamesProvider`
  (if also made lazy) is requested during composite symbol provider
  creation in `createBuiltinsAndCloneableSession`.
- The solution avoids creating the builtins session entirely. Instead,
  `directRegularDependencies` now gets the `KtBuiltinsModule` directly,
  which is more straight-forward as well.
2023-05-31 18:34:42 +00:00
..