Commit Graph

100538 Commits

Author SHA1 Message Date
Mads Ager 1f3b8142a8 [K2] Enable tests for hasConstant field on properties in metadata. 2023-04-21 23:40:40 +02:00
Mads Ager f7171f01ae [K2] Enable tests for metadata for nested types. 2023-04-21 23:40:40 +02:00
Dmitrii Gridin 63e6816a50 [LL FIR] avoid body resolve on attempt to build symbol for type parameters
^KT-57850
2023-04-21 17:21:36 +00:00
Dmitrii Gridin 5a53d796e1 [LL FIR] add more tests on lazy resolve for type parameters
^KT-57850
2023-04-21 17:21:36 +00:00
Dmitrii Gridin 9fe77d6a56 [LL FIR] avoid body resolve on attempt to build symbol for parameters
^KT-57850
2023-04-21 17:21:36 +00:00
Dmitrii Gridin 3394097f47 [LL FIR] run lazy resolve tests by caret
To test production resolveToFirSymbol entry point

^KT-57850
2023-04-21 17:21:36 +00:00
Dmitrii Gridin 6b3e49e824 [AA FIR] correctly restore declaration with annotation with argument inside some type from symbol pointer
ConeAttributes can have some non-stable info, so we shouldn't render it

Also reduce resolve from IMPLICIT_TYPES_BODY_RESOLVE to TYPES where it is possible

^KT-58141 Fixed
2023-04-21 17:21:36 +00:00
Dmitrii Gridin 866e8a26c7 [FIR] set correct resolve phase for default getter, setter and backing field
^KT-58163 Fixed
2023-04-21 17:21:17 +00:00
Pavel Punegov 1703d3a47e [K/N][test] Skip test worker10 with Aggressive GC
Merge-request: KT-MR-9729
Merged-by: Pavel Punegov <Pavel.Punegov@jetbrains.com>
2023-04-21 17:02:32 +00:00
Kirill Rakhman 0a2477585a [FIR] Implement DEFINITELY_NON_NULLABLE_AS_REIFIED diagnostic
#KT-55646 Fixed
2023-04-21 16:23:16 +00:00
Svyatoslav Scherbina 509a97a7b5 Native: add coroutines into buildSrc classpath of performance builds
^KT-58160
2023-04-21 16:19:55 +00:00
Svyatoslav Kuzmich 933f47aaf9 [Wasm] Rename JsHandle to JsReference
Decision to do this was made at Kotlin/Wasm interop design meeting
2023-04-21 15:03:20 +00:00
Svyatoslav Kuzmich 7ba8f7cce2 Revert "[Wasm] Deprecate @JsFun with warning"
Reason: Design of js(code) replacement is still in flux.
        It would be better to delay deprecation until we converge
        to proper solution.

This reverts commit 3566d918d2.
2023-04-21 15:03:20 +00:00
Svyatoslav Kuzmich 7c2fa3290e [Wasm] Revert removal of some Dynamic functions
Deprecate them with ERROR instead to improve compiler messages
2023-04-21 15:03:19 +00:00
Yahor Berdnikau eb4e96a113 Add kotlin-build-tools-enum-compat workaround
It acts as a workaround for the case when build tools or dependencies
are compiled with latest 'kotlin-stdlib' version, but at a runtime older
 'kotlin-stdlib' is provided, which does not know about new
 `EnumEntries`.

 ^KT-57317 Fixed
2023-04-21 14:57:17 +00:00
Pavel Mikhailovskii 1f649b698c [CLI] Get rid of unnecessary type parameters in arguments.kt 2023-04-21 13:21:28 +00:00
Nikolay Krasko 13ce25a85c [213] Update verification for "maven-resolver-impl" and "httpclient"
KTI-1114
2023-04-21 13:19:05 +00:00
Nikolay Krasko 9e00bb8a21 [213] More dependencies aalto + stax2
KTI-1114
2023-04-21 13:19:05 +00:00
Nikolay Krasko a3293452ca [213] Update verification-metadata.xml
KTI-1114
2023-04-21 13:19:05 +00:00
Nikolay Krasko bedea65f00 [213] Unmute tests fixed in 212 platform
KTI-1114
2023-04-21 13:19:05 +00:00
Nikolay Krasko 760a690c01 [213] Remove some old setting in tests with org.jdom.Element
KTI-1114
2023-04-21 13:19:05 +00:00
Nikolay Krasko f9169e8c7c [213] Dummy code style facade for ClsElementImpl.appendMirrorText()
The only test that fails without is FirOldFrontendLightClassesTestGenerated.
While there's no proof that code fails in production, the footprint from
services shouldn't be big, and it's better to have them instead of
failing in runtime.

KTI-1114
2023-04-21 13:19:05 +00:00
Roman Golyshev 31482fbb8b [213] Try removing jna from kotlin-compiler-embeddable
KTI-1114
2023-04-21 13:19:04 +00:00
Roman Golyshev 83f9e0f87e [213] Add more missing runtime dependencies
KTI-1114
2023-04-21 13:19:04 +00:00
Roman Golyshev b62b21dd67 [213] Adapt to DebugUtil.psiToString semantics change
See 83990991cd17c661bf6ea85b54125c09741d90ec commit in intellij

KTI-1114
2023-04-21 13:19:04 +00:00
Roman Golyshev ac388010b1 [213] Add missing test runtime dependencies
KTI-1114
2023-04-21 13:19:04 +00:00
Roman Golyshev e388b1df36 [213] Ignore proguard warning about com.intellij.util.io.WalRecord$Companion
KTI-1114
2023-04-21 13:19:04 +00:00
Roman Golyshev fb9de6ba45 [213] Avoid using ConcurrentCollectionFactory.createConcurrentIdentityMap
The `ConcurrentCollectionFactory` class was moved to the module
which is no longer available in the 213 platform distribution

`MapMaker().weakKeys().makeMap()` is used as drop-in replacement of
concurrent hash map with identity-based equals strategy

The new implementation stores keys on weak references, which should not
change the behavior of the `ModuleFileCacheImpl`.

1. If someone still has a strong reference to the `ktFile`, then the
cache will also keep it.

2. If there are no more strong references to the `ktFile`, then the
cache will not hold it from being garbage-collected. However, since
nobody  has a strong reference to the `ktFile` anymore, nobody can call
 `fileCached` or `getCachedFirFile` with it, and it will never be
 requested from the cache.

KTI-1114
2023-04-21 13:19:04 +00:00
Roman Golyshev d4cffb8a5a [213] Switch to 213 platform
KTI-1114
2023-04-21 13:19:04 +00:00
Dmitriy Novozhilov 7f07b2a82c Revert "Advance bootstrap to 1.9.0-dev-6379"
This reverts commit fe44727f97.

Revert is needed because of KT-58160
2023-04-21 13:15:45 +00:00
Yan Zhulanow c9c6508b03 [LL API] Fix declaration mapping for library dependencies
As there is no accurate way to figure out exact dependencies for each
library JAR, all project libraries but the current one are added as
dependencies. However, for performance reasons, each library is not
treated as an individual 'LLFirLibrarySession', instead a scope-based
'JvmClassFileBasedSymbolProvider' is used.

Although code analysis is correct with this setup, navigation between
libraries was broken. The reason is that source declarations were only
queried inside the library itself.

After the fix, declarations are first queried in the library,
and if there are no good candidates, all other libraries are scanned.
The same way things work in the Java plugin.

^KTIJ-23073 Fixed
2023-04-21 12:49:43 +00:00
Sergey.Shanshin d8d643b7d7 [KxSerialization] Fix "IllegalAccessError: Update to static final field"
Fixes #KT-57647

For value classes, if you add code to companion anonymous init block in IR, it will be executed in the instance constructor. This causes an error when initializing static fields, because writing to them can only occur from the <clinit> method.

The solution is to transfer the static field initialization code from an anonymous init block to the IR initializer of this field

Merge-request: KT-MR-9633
Merged-by: Sergey Shanshin <Sergey.Shanshin@jetbrains.com>
2023-04-21 12:37:32 +00:00
Aleksei.Cherepanov 803a11003f [Maven] Filter duplicated source roots to avoid multiple module declarations exception
After fixing of KT-13995 (99de93bb) there is a case when several maven plugins register the same source roots twice, which leads to the Kotlin compiler exception "Too many source module declarations found". kotlin-maven-plugin should take care of what it passes to the Kotlin compiler to avoid it

#KT-58048 Fixed

Merge-request: KT-MR-9716
Merged-by: Aleksei Cherepanov <aleksei.cherepanov@jetbrains.com>
2023-04-21 12:07:30 +00:00
Dmitrii Gridin f85dc95b66 [SLC] SymbolLightAccessorMethod: reduce number of requests on symbol restoring
We can avoid extra restoring of property accessors
if the corresponding property is already restored

^KT-57850
2023-04-21 11:10:20 +00:00
Dmitrii Gridin 5d1c853adf [AA FIR] fix contract violation for java Target annotation
^KT-57849 Fixed
2023-04-21 10:14:05 +00:00
Dmitrii Gridin f540826207 [AA FIR] add tests on java target annotation stability
^KT-57849
2023-04-21 10:14:05 +00:00
Dmitrii Gridin 7b91cd0ff3 [FIR] calculate java Target annotation on COMPILER_REQUIRED_ANNOTATIONS phase
^KT-57849
^KT-57949
2023-04-21 10:14:05 +00:00
Dmitrii Gridin 1c456b216b [AA FIR] add lazy resolve test on java target
^KT-57849
2023-04-21 10:14:05 +00:00
Dmitrii Gridin 0caaca45ae [AA FIR] fix contract violation for Target annotation
^KT-57849
2023-04-21 10:14:05 +00:00
Dmitrii Gridin d66b919c12 [AA] introduce tests on annotation stability
^KT-57849
2023-04-21 10:14:05 +00:00
Ilya Chernikov 5f6d8c9030 Fix maven script executor after changes in the jdk path processing
#KT-58101 fixed
2023-04-21 09:40:19 +00:00
Anton Lakotka 877c1b1742 [Gradle] Clean up ConfigurationCacheIT tests 2023-04-21 06:41:45 +00:00
Anton Lakotka 40d29d13bf [Gradle] Don't use project in gradle task's input properties
With Gradle 8.1 it is now unsupported with Configuration Cache

^KT-58062 Verification Pending
^KT-58063 Verification Pending
2023-04-21 06:41:45 +00:00
Anton Lakotka ab82027f86 [Gradle] Test that multiplatform tasks can work with Gradle 8.1 GCC
^KT-58062
^KT-58063
2023-04-21 06:41:45 +00:00
Egor Kulikov c46c922841 [ClsStubs] Add context receivers on function types 2023-04-20 18:57:51 +00:00
Dmitriy Novozhilov 6b41c5a969 [Build] Temporary exclude modules which uses serialization plugin from JPS build
KT-58111
2023-04-20 18:37:30 +00:00
Dmitriy Novozhilov fe44727f97 Advance bootstrap to 1.9.0-dev-6379 2023-04-20 18:37:29 +00:00
Ivan Kochurkin b72dcf8b37 [K2, MPP] Fix actualization of nullability-based overloads
^KT-58043 Fixed
2023-04-20 17:22:45 +00:00
Artem Kobzar c5b60a16bb [K/JS TESTS] Remove .ts files genereting from generateTests command to enable Gradle execution optimizations
Warning Context:
> Task :js:js.tests:generate-ts-for-regular-classes-in-exported-file
Execution optimizations have been disabled for task ':js:js.tests:generate-ts-for-regular-classes-in-exported-file' to ensure correctness due to the following reasons:
  - Gradle detected a problem with the following location: './js/js.translator/testData/typescript-export/regular-classes-in-exported-file'. Reason: Task ':js:js.tests:generate-ts-for-regular-classes-in-exported-file' uses this output of task ':js:js.tests:generate-js-export-on-file-for-regular-classes' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed. Please refer to https://docs.gradle.org/7.6.1/userguide/validation_problems.html#implicit_dependency for more details about this problem.

> generateTypeScriptTests
> tsc --build ./typescript-export/regular-classes-in-exported-file/tsconfig.json
2023-04-20 16:13:40 +00:00
Dmitry Savvinov da073c9cc3 [mpp] Warn about using pre-HMPP dependencies
^KT-58086 Fixed
2023-04-20 15:35:05 +00:00