Commit Graph

107387 Commits

Author SHA1 Message Date
Dmitrii Gridin 4a87ae9e04 [LL FIR] fix type annotations resolution for fake override declarations
Fake overrides have annotations from a class from which type parameters
were substituted, so we have to resolve them before the declaration.
It worked before in most cases as an original containing class is a part
of the designation path, so we considered annotations from such classes
as our and just resolved them in the wrong scope without right locks

^KT-64243
2023-12-19 16:21:57 +00:00
Dmitrii Gridin b6f0571f0b [LL FIR] introduce lazy resolution tests for fake overrides
^KT-64243
2023-12-19 16:21:57 +00:00
Dmitrii Gridin 6ffa8e6e98 [LL FIR] LLFirResolveTarget: make firFile property optional
Not all targets belonged to any files (e.g., fake overrides),
so we should be able to resolve them without a provided file

^KT-64243
2023-12-19 16:21:57 +00:00
Dmitrii Gridin a7cfbe6d50 [LL FIR] drop redundant usages of LLFirResolveTarget.firFile
After 6893c44a 'target' can be used in many cases

^KT-64243
2023-12-19 16:21:57 +00:00
Sergej Jaskiewicz 1b557c1657 [IR] Mark IrExpressionBodyImpl with an opt-in annotation
KT-59318
2023-12-19 16:20:02 +00:00
Sergej Jaskiewicz 2096d22e18 [IR] Mark IrBlockBodyImpl with an opt-in annotation
KT-59318
2023-12-19 16:20:02 +00:00
Sergej Jaskiewicz f482b6a458 [IR] Mark IrValueParameterImpl with an opt-in annotation
KT-59318
2023-12-19 16:20:02 +00:00
Sergej Jaskiewicz b56a04e796 [IR] Mark IrTypeParameterImpl with an opt-in annotation
KT-59318
2023-12-19 16:20:02 +00:00
Sergej Jaskiewicz 8f2201b7a8 [IR] Mark IrTypeAliasImpl with an opt-in annotation
KT-59318
2023-12-19 16:20:02 +00:00
Sergej Jaskiewicz 9845ca801e [IR] Mark IrPropertyWithLateBindingImpl with an opt-in annotation
KT-59318
2023-12-19 16:20:02 +00:00
Sergej Jaskiewicz c393736473 [IR] Mark IrPropertyImpl with an opt-in annotation
KT-59318
2023-12-19 16:20:02 +00:00
Sergej Jaskiewicz 2953d9ec90 [IR] Mark IrLocalDelegatedPropertyImpl with an opt-in annotation
KT-59318
2023-12-19 16:20:02 +00:00
Sergej Jaskiewicz d493d76dc7 [IR] Mark IrFunctionWithLateBindingImpl with an opt-in annotation
KT-59318
2023-12-19 16:20:02 +00:00
Sergej Jaskiewicz 41197392f9 [IR] Mark IrFunctionImpl with an opt-in annotation
KT-59318
2023-12-19 16:20:01 +00:00
Sergej Jaskiewicz e1d03f6540 [IR] Mark IrFieldImpl with an opt-in annotation
KT-59318
2023-12-19 16:20:01 +00:00
Sergej Jaskiewicz cd014c57a5 [IR] Mark IrErrorDeclarationImpl with an opt-in annotation
KT-59318
2023-12-19 16:20:01 +00:00
Sergej Jaskiewicz 28a0d0c6aa [IR] Mark IrEnumEntryImpl with an opt-in annotation
KT-59318
2023-12-19 16:20:01 +00:00
Sergej Jaskiewicz 444dcae93d [IR] Mark IrConstructorImpl with an opt-in annotation
KT-59318
2023-12-19 16:20:01 +00:00
Sergej Jaskiewicz 2fab853700 [IR] Mark IrClassImpl with an opt-in annotation
KT-59318
2023-12-19 16:20:01 +00:00
Sergej Jaskiewicz 8aacb59aec [IR] Mark IrAnonymousInitializerImpl with an opt-in annotation
KT-59318
2023-12-19 16:20:01 +00:00
Leonid Startsev 22709bcb18 Add missing documentation to KmVersionRequirement.toString
so the documentation publishing to website will not fail.
2023-12-19 15:42:55 +00:00
Leonid Startsev 2405d644a3 Raise all deprecations in kotlinx-metadata-jvm to ERROR
as 0.8.0 had them as WARNINGs.

#KT-63157 Fixed
2023-12-19 15:39:14 +00:00
Sergej Jaskiewicz a1970d3d57 [K/N] Move KonanIrModuleSerializer to serialization.native
KT-64392
2023-12-19 15:20:01 +00:00
Sergej Jaskiewicz 199d9d4880 [K/N] Move KonanDeclarationTable to the serialization.native module
KT-64392
2023-12-19 15:20:01 +00:00
Sergej Jaskiewicz 3f9de91bec [K/N] Move KonanIrFileSerializer to the serialization.native module
KT-64392
2023-12-19 15:20:01 +00:00
Sergej Jaskiewicz a032db500c [K/N] Move KonanFakeOverrideClassFilter to serialization.native
KT-64392
2023-12-19 15:20:01 +00:00
Sergej Jaskiewicz ff1b618dfd [K/N] Move KonanIdSignaturer to the serialization.native module
KT-64392
2023-12-19 15:20:01 +00:00
Sergej Jaskiewicz 7e3b909394 [K/N] Move some utils to the serialization.native module
KT-64392
2023-12-19 15:20:01 +00:00
Sergej Jaskiewicz 69cdf2d3ea [K/N] Move ModuleDescriptor#isFromInteropLibrary to util-klib-metadata
KT-64392
2023-12-19 15:20:01 +00:00
Sergej Jaskiewicz e521ed9dc3 [K/N] De-duplicate BaseKotlinLibrary#isInteropLibrary
KT-64392
2023-12-19 15:20:00 +00:00
Dmitriy Dolovov 61282fcaeb IR text tests: New tests specifically for main functions mangling
^KT-57755
2023-12-19 14:24:16 +00:00
Dmitriy Dolovov af247c3344 IR text tests: Unmute tests that have main function
Don't use `main` function in these tests, because `main` function
has specific mangling rules in JVM. Use other function name.

^KT-57755
2023-12-19 14:24:16 +00:00
Dmitriy Dolovov 1759b9e3c4 IR text tests: Use suffix 'by Frontend' for FIR & descriptor based signature mangled names
IrMangledNameAndSignatureDumpHandler can dump either signature mangled
names by Fir or by descriptors, but not both at the same time. And
mangled names should be equal to preserve ABI compatibility.

^KT-57788
2023-12-19 14:24:16 +00:00
Yahor Berdnikau c9ad09f4dc [Gradle] Fix deprecated buildDir access in PublicPackageJsonTask
^KT-62527 In Progress
2023-12-19 14:09:55 +00:00
Yahor Berdnikau 28405fceac [Gradle] Suppress unused task input
^KT-56904 In Progress
2023-12-19 14:09:55 +00:00
Yahor Berdnikau f0e6244498 [Gradle] Add suppression for internal deprecation
^KT-56904 In Progress
2023-12-19 14:09:55 +00:00
Yahor Berdnikau f783317dca [Gradle] Slightly update KDoc to fix warning
^KT-56904 In Progress
2023-12-19 14:09:55 +00:00
Yahor Berdnikau 7911cc640b [Gradle] Remove unused variable
^KT-56904 In Progress
2023-12-19 14:09:55 +00:00
strangepleasures b32f408767 [KAPT] KT-64389 Fix stub generation with generic type constraints 2023-12-19 13:33:38 +00:00
Mikhail Glukhikh 4783822fbc K1/K2: add test confirming the work of KT-54487 case
#KT-54487 Obsolete
#KT-63350 Declined
2023-12-19 12:24:37 +00:00
Yahor Berdnikau 601f90917b [Gradle] Don't use reflection to get java compile task provider
^KT-56904 In Progress
2023-12-19 11:51:40 +00:00
Yahor Berdnikau 8fc847fe5c [Gradle] Mark setupDependenciesResolution function as private
^KT-56904 In Progress
2023-12-19 11:51:40 +00:00
Yahor Berdnikau 1b09ca4001 [Gradle] Don't use reflection to get packageTask provider
^KT-56904 In Progress
2023-12-19 11:51:40 +00:00
Yahor Berdnikau 5e2bf34ff7 [Gradle] Migrated from deprecated compileKotlinTaskProvider
^KT-56904 In Progress
2023-12-19 11:51:40 +00:00
Yahor Berdnikau cab734f57e [Gradle] Remove unnecessary cast
^KT-56904 In Progress
2023-12-19 11:51:40 +00:00
Yahor Berdnikau 1ead664f91 [Gradle] Update the usage of defaultSourceSetName
^KT-56904 In Progress
2023-12-19 11:51:40 +00:00
Yahor Berdnikau 3130775a3b [Gradle] Suppress usages of Android deprecated types in AndroidProjectHandler
^KT-56904 In Progress
2023-12-19 11:51:40 +00:00
Marco Pennekamp 145876a235 [K/N] Fix disposable leak in ExtTestCaseGroupProvider.isIgnoredTarget
- `isIgnoredTarget` creates a new `ExtTestDataFileStructureFactory`,
  which requests a shared application environment via
  `createPsiFactory`.

^KT-64099
2023-12-19 11:12:23 +00:00
Marco Pennekamp 24a2f72a6b [Test] ReplCompilerJava8Test: Fix lifetime of setUp environment
- For each test, `ReplCompilerJava8Test` effectively created two
  environments: one in `setUp` for pre-compilation and one in `runTest`
  managed by `GenericReplCompiler`. The `setUp` environment is unshared,
  so it wasn't the same as the one managed by `GenericReplCompiler`.
  Because the `setUp` environment was registered with
  `testRootDisposable`, its application and project were effectively
  disposed at the end of the test, together with the other environment.
- Adding a call to `resetApplicationManager` to
  `KotlinCoreEnvironment.disposeApplicationEnvironment` in a previous
  commit caused `ReplCompilerJava8Test` to fail with the following
  sequence:
  1. At the end of a test, `testRootDisposable` is disposed.
  2. The project count disposable registered in
     `getOrCreateApplicationEnvironment` is disposed first. This causes
     the shared application's project count to go to 0 and triggers its
     disposal via `disposeApplicationEnvironment`.
  3. In `disposeApplicationEnvironment`, the application manager's
     application is reset to `null`.
  4. The disposer continues with disposables which were registered for
     the `setUp` environment initially. One of these is
     `PsiManagerImpl`, which disposes `FileManagerImpl`, during whose
     disposal `ApplicationManager.getApplication()` is called. Since the
     application was reset, it is now `null` and an NPE occurs.
- The solution disposes the `setUp` environment early so that it cannot
  clash with the shared environment from `GenericReplCompiler`.

^KT-64099
2023-12-19 11:12:23 +00:00
Marco Pennekamp 5f6ffc55b8 [Test] Wrap Disposer.dispose calls in finally
- This ensures that disposables are disposed on test failure as well.

^KT-64099
2023-12-19 11:12:23 +00:00