Commit Graph

108209 Commits

Author SHA1 Message Date
Anton Lakotka e4b760370f [Gradle] Put stdlib in K/Native classpath in first position
And stop doing so on Compiler Side.

^KT-61430 Verification Pending
^KT-61559 Verification Pending
2024-01-23 22:14:32 +00:00
Anton Lakotka 71a03a7c7d [K/N] Exclude stdlib from icedLibraries cache when passed explicitly
As part of KT-61559 stdlib is intended to be passed explicitly from
Gradle. However, CacheBuilder was not aware of such configuration
and was failing during cache building.

Author of this commit is Igor Chevdar

^KT-61430 Verification Pending
^KT-61559 Verification Pending
2024-01-23 22:14:32 +00:00
Anton Lakotka 9acb9ff2b7 [Gradle] Pass stdlib explicitly as K/native dependency. Keep original...
... platform dependencies while filter out them from actual compiler
invocation. So kotlin native compiler will provide them implicitly
from kotlin native bundle. Since K/Native compiler is not yet
optimised to consume platform dependencies explicitly and simply slow.
More details in related issue: KT-61559

^KT-61430 Verification Pending
^KT-61559 Verification Pending
2024-01-23 22:14:32 +00:00
Anton Lakotka 90a47e0488 [Gradle] Refactor getVisibleSourceSetsFromAssociateCompilations
To highlight the fact that there is an intersection of
visible source sets of compilations where given source set participates
2024-01-23 22:14:32 +00:00
Anton Lakotka f4681fb93a [Gradle] Add SetupKotlinNativePlatformDependenciesForLegacyImport
The code is extracted from SetupKotlinNativePlatformDependenciesAndStdlib
as the latter is applied only to native compilations and
shared native metadata compilations.
For test shared native source sets, such as `nativeTest
no native metadata compilation is created, but for legacy import
intransitive metadata dependencies should contain native platform
dependencies listed. And
SetupKotlinNativePlatformDependenciesForLegacyImport fixes that.

^KT-61559 Verification Pending
2024-01-23 22:14:32 +00:00
Anton Lakotka 721aafc94c [Gradle] Disable stdlib for Kotlin Native Compile and Link tasks
^KT-61559 Verification Pending
2024-01-23 22:14:32 +00:00
Anton Lakotka 4a0bfcd842 [Gradle] Add AddKotlinPlatformIntegersSupportLibrary
Move code from KotlinNativePlatformDependencies.kt

^KT-61559
2024-01-23 22:14:32 +00:00
Anton Lakotka 1604ab1e0b [Gradle] Add SetupKotlinNativePlatformDependenciesAndStdlib
This extension point adds NativePlatformDependencies And Stdlib to
compileFiles of Native Compilations.

^KT-61559 Verification Pending
2024-01-23 22:14:32 +00:00
Anton Lakotka 32de4a6b2c [Gradle] test that native compilation has platform dependencies
^KT-61559 Verification Pending
2024-01-23 22:14:32 +00:00
Anton Lakotka 599a6c7d6d [Gradle] Fix Native Linker integration test after adding platform libs
in compiler classpath. Now K/Native compiler doesn't "compress" platform
libraries when printing linker error.

^KT-61559 Verification Pending
2024-01-23 22:14:32 +00:00
Anton Lakotka 639e048438 [Gradle] Include native platform dependencies explicitly
They are now also exposed via KotlinCompilation.compileDependencyFiles
Which is useful for tools like dokka that relies on exhaustive
list of dependencies for given source set/compilation.

^KT-61559 Verification Pending
2024-01-23 22:14:32 +00:00
Jinseong Jeon 43acc6516b SLC: mangle internal accessors
...by honoring accessors' visibility

We need a special handling for backing field visibility,
e.g., lateinit, const, or JvmField, but that's not the case
for accessors' visibility.

^KT-64937 fixed
2024-01-23 21:55:09 +00:00
Marco Pennekamp dcf7b84082 [Test] Reset ApplicationManager.application when shared application environments are disposed
- Shared application environments can be disposed in the middle of test
  plan execution when the project count reaches zero. So resetting
  `ApplicationManager` only on "test plan execution finished" is
  incorrect, because it does not account for that scenario. Instead, we
  should reset `ApplicationManager` every time the application
  environment is disposed.
- We should also keep the manual reset in `testPlanExecutionFinished`
  because `disposeApplicationEnvironment` may not need to dispose
  anything if there isn't a shared application environment, but we
  should still reset `ApplicationManager` if an unshared application
  environment was created.
- This fixes "Some test disposed, but forgot to clear MockApplication"
  exceptions which appeared after KT-64099 because it opened up proper
  disposal of the shared application environment (instead of it being in
  a state of leakage because not all project disposables were properly
  disposed).

^KT-63650
^KT-64099
2024-01-23 21:52:31 +00:00
strangepleasures 85c9c57da4 [KAPT] KT-65006 fix issues when using Kapt+Serialization
This MR fixes two independent issues causing build failures when using Kapt in combination with the Kotlin serialization plugin (and, very likely, with other plugins as well):
Kapt applied compiler plugins twice, causing errors similar to the one described in KT-65006
Kapt failed to generate @Metadata annotations for plugin-generated companion objects because the corresponding SLC missed containingFile needed for generation of method and class signatures

Merge-request: KT-MR-13970
Merged-by: Pavel Mikhailovskii <Pavel.Mikhailovskii@jetbrains.com>
2024-01-23 20:35:32 +00:00
Svyatoslav Scherbina 8e4dc1fc31 Bump Kotlin/Native version in KGP to 2.0.0-dev-13302 2024-01-23 19:29:02 +00:00
Ilya Gorbunov 72528056fb [kotlin-test] Migrate integration tests project from deprecated K/JS plugin 2024-01-23 17:57:48 +00:00
Ilya Gorbunov 000db0bb44 [kotlin-test] Move kotlin-test integration tests project 2024-01-23 17:57:48 +00:00
Alexander Korepanov 0d06efb488 [JS FIR] Fix REIFIED_TYPE_FORBIDDEN_SUBSTITUTION for dynamic types
^KT-59987 Fixed
2024-01-23 17:52:03 +00:00
Andrey Yastrebov 6db22b4975 KT-62493 Add cocoapods custom executable path test 2024-01-23 17:40:33 +00:00
Andrey Yastrebov 7958f77d09 KT-62493 explicit pod executable path in local.properties 2024-01-23 17:40:33 +00:00
Alexander Shabalin ebef991477 [K/N] Workaround hanging during stream draining ^KT-65113 2024-01-23 16:05:34 +00:00
Marco Pennekamp 641cae009e [AA] Remove obsolete KtFirAnalysisSession.mode
- On-air analysis was recently removed.
2024-01-23 16:00:43 +00:00
cristiangarcia daba449390 Update ktor to 2.3.7 2024-01-23 12:12:44 +00:00
Alexander Shabalin d04b3050c0 [K/N] Remove old workaround for osVersionMin on arm macOS 2024-01-23 11:14:38 +00:00
Pavel Punegov cdb6a06e49 [K/N][test] Move ZipTest to compiler/util-io tests
This is the last test in the Klib and was run separately.
Instead, it should be located with 'kotlin-util-io' project which it tests


Merge-request: KT-MR-13978
Merged-by: Pavel Punegov <Pavel.Punegov@jetbrains.com>
2024-01-23 11:01:58 +00:00
Alexander Korepanov 3dd4a0d868 [JS FIR] Add JS_NAME_CLASH tests for constructors
^KT-64867 Related
2024-01-23 10:30:10 +00:00
Alexander Korepanov 5da4d31d37 [JS FIR] Rework JS_NAME_CLASH diagnostic for constructors
- Fix a false positive JS_NAME_CLASH report on constructors
   from different classes but with the same JsName.
 - Allow the same JsName for class constructors and other top-level
   declarations. This behavior differs from K1, but it is correct
   since there is no real name clash in the generated JS code.

^KT-64867 Fixed
2024-01-23 10:30:10 +00:00
Sebastian Sellmair 2708c74d9c [ObjCExport] Fix KT-64952 HasErrorTypesTest 2024-01-23 10:03:15 +00:00
Alexander Korepanov fc584b7c33 [JS FIR] Add non-ASCII JsName tests
^KT-64463 Related
2024-01-23 10:00:18 +00:00
Alexander Korepanov 871f04e08c [JS FIR] Do not verify typealias JS name
Since typealiases are not present in the generated JS code,
there is no need to verify their JS names.

^KT-64463 Fixed
2024-01-23 10:00:18 +00:00
Ilya Kirillov a97518a903 [kapt] fix KAPT tests failing with ClassNotFoundException: com.intellij.openapi.roots.ContentIterator
The failing tests are in  `org.jetbrains.kotlin.kapt.cli.tes.Kapt4ToolIntegrationTestGenerated`
2024-01-23 09:09:37 +00:00
Jinseong Jeon 0dfaa91970 K2 UAST: simplify PSI declaration provider
In addition to class lookup (done at cec299ac), we can use
JavaFileManager to search classes in a certain package too.
2024-01-23 09:09:37 +00:00
Dmitrii Krasnov 6aab336979 [Gradle] Added fix for :kotlin-gradle-plugin:compileFunctionalTestKotlin
^KT-58303
2024-01-23 08:59:16 +00:00
Nikolay Lunyak c55a7dd038 [FIR] Add SAFE_CALLABLE_REFERENCE_CALL
^KT-59835
2024-01-23 08:46:29 +00:00
Nikolay Lunyak 4fed4b6640 [FIR] Add more tests for RESERVED_SYNTAX_IN_CALLABLE_REFERENCE_LHS
It's a bit hard to reason about how different
diagnostics correspond to one another from
the existing tests.

^KT-59835
2024-01-23 08:46:29 +00:00
Nikolay Lunyak c8fb0d4574 [FIR] Drop an obsolete TODO
In K2 we have `EXPLICIT_TYPE_ARGUMENTS_IN_PROPERTY_ACCESS`
and `EXPRESSION_OF_NULLABLE_TYPE_IN_CLASS_LITERAL_LHS`
which seem to cover the same use cases as
`RESERVED_SYNTAX_IN_CALLABLE_REFERENCE_LHS` used to
(at least it seems so, based on the source code of
`resolveReservedExpressionSyntaxOnDoubleColonLHS()`).

^KT-59835 Obsolete
2024-01-23 08:46:28 +00:00
Yahor Berdnikau 207750f6ae [Gradle] Fix warnings in SingleTargetSourceDirConfigurator
^KT-56904 In Progress
2024-01-22 20:50:08 +00:00
Yahor Berdnikau 0a95407209 [Gradle] Fix warnings in MultiplatformLayoutV2SourceDirConfigurator
^KT-56904 In Progress
2024-01-22 20:50:07 +00:00
Yahor Berdnikau 7e7156b49a [Gradle] Fix warnings in MultiplatformLayoutV2DependsOnConfigurator
^KT-56904 In Progress
2024-01-22 20:50:07 +00:00
Yahor Berdnikau 3036b408ff [Gradle] Fix warnings in MultiplatformLayoutV2DefaultManifestLocationConfigurator
^KT-56904 In Progress
2024-01-22 20:50:07 +00:00
Yahor Berdnikau cfc48c6e94 [Gradle] Fix warnings in MultiplatformLayoutV1SourceDirConfigurator
^KT-56904 In Progress
2024-01-22 20:50:07 +00:00
Yahor Berdnikau 8ee9753045 [Gradle] Fix warnings in MultiplatformLayoutV1DependsOnConfigurator
^KT-56904 In Progress
2024-01-22 20:50:07 +00:00
Yahor Berdnikau 17b0ffb208 [Gradle] Fix warnings in MultiplatformAndroidResourceDirConfigurator
^KT-56904 In Progress
2024-01-22 20:50:07 +00:00
Yahor Berdnikau 0e78e98ca0 [Gradle] Fix warnings in KotlinAndroidSourceSetInfoConfigurator
^KT-56904 In Progress
2024-01-22 20:50:07 +00:00
Yahor Berdnikau cbfc2eb9c0 [Gradle] Fix warnings in KotlinAndroidSourceSetConfigurator
^KT-56904 In Progress
2024-01-22 20:50:07 +00:00
Yahor Berdnikau be848cc432 [Gradle] Fix warnings in GradleConventionAddKotlinSourcesToAndroidSourceSetConfigurator
^KT-56904 In Progress
2024-01-22 20:50:07 +00:00
Yahor Berdnikau 8b0c975590 [Gradle] Fix warnings in AndroidKaptSourceSetConfigurator
^KT-56904 In Progress
2024-01-22 20:50:07 +00:00
Yahor Berdnikau 1c7f2b3066 [Gradle] Fix warnings in Agp7AddKotlinSourcesToAndroidSourceSetConfigurator
^KT-56904 In Progress
2024-01-22 20:50:07 +00:00
Dmitrii Krasnov 7165d15d59 [Gradle Native] Added Kotlin Native Provider to all native tasks
This provider is a first step of "Kotlin Native Toolchain".
This solves several problems:
1) Resolving K/N bundle during configuration phase ->
now it happens during execution phase
2) Downloading K/N bundle with internal mechanisms ->
now it uses Gradle dependency resolvers and Transform Artifact

^KT-58303
^KT-52567
^KT-49268
2024-01-22 20:26:24 +00:00
Alexander Shabalin 48f5e1d05c [K/N] Deprecate -Xworker-exception-handling ^KT-65170
Also deprecate legacy option with error (was a warning since 1.9.20-Beta)
2024-01-22 19:22:44 +00:00