Commit Graph

100980 Commits

Author SHA1 Message Date
Yahor Berdnikau 1860683a71 Fix explicit api issues in kotlin-build-tools-api
Explicit api mode was not working due to the bug.

^KT-57653
2023-05-08 19:43:43 +00:00
Yahor Berdnikau 2ea65bd658 Fix explicitApiMode could be overwritten by freeCompilerArgs
Now tasks has a separate task input for 'explicitApiMode' which is
passed to Kotlin compiler via arg, rather than free compiler args.

^KT-57653 Fixed
2023-05-08 19:43:43 +00:00
Dmitrii Gridin d3043b6f1c [LL FIR] do not treat declarations from object literal as non-local
^KTIJ-25437 Fixed
2023-05-08 16:08:26 +00:00
Mikhail Zarechenskiy 6d7dc45ce6 K1: Add test for compatibility check of Enum.entries
Basically, the test checks that adding Enum.entries feature doesn't
break the existing code where it clashes with the user-defined "entries"
declaration; it's better to have a black-box test to be sure
that the compiler doesn't invoke something different at runtime

 The test covers KT-53153 and KT-56587

Merge-request: KT-MR-9798
Merged-by: Michail Zarečenskij <Mikhail.Zarechenskiy@jetbrains.com>
2023-05-08 15:35:25 +00:00
Dmitrii Gridin 25f2c513f6 [LL FIR] drop global phase lock for super types phase
^KT-56551
2023-05-08 14:42:10 +00:00
Dmitrii Gridin 13dc4c8014 [LL FIR] split LLFirLockProvider on read and write API
^KT-56550
2023-05-08 14:42:10 +00:00
Nikolay Lunyak 76df0f9ad1 [FIR] KT-48870: Allow resolution to InaccessibleImplicitReceiverValue
^KT-48870 Fixed
2023-05-08 14:25:54 +00:00
Mikhail Glukhikh f472f68dc5 SymbolTable: replace assert with require in createOwnerSafe
Related to KT-57049
2023-05-08 13:32:18 +00:00
Mikhail Glukhikh dbdefe90a3 FIR2IR: add workaround for SymbolTable conflicts in property/field situation
Related to KT-57049
2023-05-08 13:32:18 +00:00
Mikhail Glukhikh 6c5afa4b87 SymbolTable: unmute the symbol comparison condition
#KT-57049 Fixed
2023-05-08 13:32:18 +00:00
Mikhail Glukhikh e92cb49b24 K2: fix SymbolTable accessing in getIrClassSymbolForNotFoundClass
Related to KT-57049
2023-05-08 13:32:18 +00:00
Mikhail Glukhikh db45f5f7db FIR2IR: drop unused members from Fir2IrBindableSymbol & its inheritors 2023-05-08 13:32:18 +00:00
Dmitrii Krasnov af4ef048be migrated NativeIrLinkerIssuesIT to junit 5 and gradle TestKit
#KT-51553 In Progress

Merge-request: KT-MR-9921
Merged-by: Dmitrii Krasnov <Dmitrii.Krasnov@jetbrains.com>
2023-05-08 13:22:36 +00:00
Ilya Goncharov cbcd68cd85 [Gradle, JS] Upgrade NPM versions
^KT-58522 fixed
2023-05-08 13:21:39 +00:00
Ilya Goncharov f204a34909 [Gradle, JS] Add Gradle integration tests with language version 2.0
^KT-56740 fixed
2023-05-08 12:30:57 +00:00
Ilya Goncharov 7a4c688b5c [Gradle, JS] Upgrade yarn.lock 2023-05-08 12:10:36 +00:00
Dmitrii Gridin b9dd2f736a [LL FIR] avoid redundant recursive type resolve for type aliases
In LL FIR we will do this by crawlSupertype

^KT-56550
2023-05-08 12:06:55 +00:00
Dmitrii Gridin 46f987ba79 [LL FIR] do not try to access supertypeRefs for classes during super types phase
We should try to find supe type refs in a session firstly, otherwise
we can try to access by getResolvedSuperTypeRefsForOutOfSessionDeclaration

^KT-56550
2023-05-08 12:06:55 +00:00
Dmitrii Gridin 873c7d63ed [LL FIR] avoid redundant pass through the entire super type hierarchy for nested classes
We can omit this step in LL FIR because, according to the contract,
an outer class must be resolved before nested class
Also, it drops unsafe access to superTypeRefs from FIR transformer

^KT-56550
2023-05-08 12:06:55 +00:00
Dmitrii Gridin ee74e10f28 [FIR] avoid jumping from super type transformer for local classes to unresolved non-local classes
In the worst case, we will visit the entire hierarchy of a local class,
where non-local classes are not yet resolved

^KT-56550
2023-05-08 12:06:55 +00:00
Dmitry Savvinov 6f584bcbe7 [mpp] Fix reporting of pre-HMPP dependencies from intermediate source sets
It's an unfortunate clash between introduction of KotlinPluginLifecycle
and changes in 'deprecationDiagnostics.kt'. It used 'afterEvaluate',
but with KotlinPluginLifecycle later stages are effectively invoked
in multiple nested afterEvaluate, making them invisible for single
afterEvaluate.

Specifically in this case, configuration of metadata compilations for
intermediate source sets is executed in 'FinaliseCompilations' stage,
which is simply not executed by the time checker runs in its single
afterEvaluate.

The fix is trivial -- wrap diagnostic checks runs into launchInStage

^KT-58470 Fixed
2023-05-08 10:42:11 +00:00
Dmitrii Krasnov 4dd54e4de4 migrated CommonNativeIT to junit 5 and gradle TestKit
#KT-51553 In Progress

Co-authored-by: Alexander Likhachev <Alexander.Likhachev@jetbrains.com>

Merge-request: KT-MR-9750
Merged-by: Dmitrii Krasnov <Dmitrii.Krasnov@jetbrains.com>
2023-05-08 09:38:13 +00:00
Alexander Udalov 530725c6bf Kapt+JVM_IR: do not generate secondary constructor bodies
In addition to ceedad40f3, do not generate bodies of constructors which
delegate to super.

 #KT-58226 Fixed
2023-05-08 09:08:07 +00:00
Dmitrii Gridin ba08f2c08a [FIR] avoid jumping from status transformer for local classes to unresolved non-local classes
We must resolve a non-local declaration before access
if we want to jump from local to it to avoid possible problems
with parallel resolution

^KT-56550
2023-05-08 08:59:07 +00:00
Sergej Jaskiewicz 71c66cdb01 [test] Enable linkViaSignatures based on directive, not target backend
We want to be able to use signature-based linkage in other kinds
of tests.
2023-05-08 08:07:29 +00:00
Pavel Kunyavskiy 68a68b2763 [K/N] Refactor KonanSymbols to avoid descriptors when built over FIR
^KT-58437
2023-05-08 07:51:56 +00:00
Kirill Rakhman 7f9118d0f2 [FIR] Resolve property return type before resolving its annotations
This fixes TYPECHECKER_HAS_RUN_INTO_RECURSIVE_PROBLEM in a declaration
like `@Ann(myConst) const val myConst = ""`.

#KT-58080 Fixed
2023-05-08 07:45:57 +00:00
Mikhail Glukhikh 1c7ffb3276 ResultTypeResolver: don't allow Nothing as ILT subtype
#KT-58379 Fixed
2023-05-08 07:43:55 +00:00
Mikhail Glukhikh 6ae648f6f6 K2: reproduce KT-58379 2023-05-08 07:43:54 +00:00
Alexander Shabalin 142e2b4b2a [K/N] Add RosettaExecutor
Merge-request: KT-MR-9986
Merged-by: Alexander Shabalin <Alexander.Shabalin@jetbrains.com>
2023-05-06 13:44:25 +00:00
Alexander Shabalin 917f64c893 [K/N] Fix ObjCAction, ObjCOutlet not switching state. ^KT-58441 2023-05-05 19:02:34 +00:00
Alexander Shabalin 860d0e32f7 [K/N] Add tests on ObjCAction and ObjCOutlet. ^KT-58441 2023-05-05 19:02:34 +00:00
Artem Daugel-Dauge 927db1bb56 [Gradle] Try to fix flaky testSyntheticProjectPodfilePostprocessin 2023-05-05 18:04:18 +00:00
Sebastian Sellmair 543ab6c390 [Gradle] Implement test - multiplatform - with K2 - source filter on compile task is respected
KT-58466
2023-05-05 16:30:00 +00:00
Sebastian Sellmair 86b54fadcc [Gradle] Remove unused 'buildKotlinNativeKlibCompilerArgs' as it cannot satisfy correct sourceFileFiltering
^KT-58466 Verification Pending
2023-05-05 16:30:00 +00:00
Sebastian Sellmair 75d771fc39 [Gradle][K2] Respect compile task's sourceFileFilter when building -Xfragment-sources
^KT-58466 Verification Pending
2023-05-05 16:30:00 +00:00
Yahor Berdnikau 82786fe6bf On OOM in Kotlin daemon also show message how to increase heap size
^KT-58320 Fixed
2023-05-05 16:25:52 +00:00
Ivan Kylchik 73cc73115e [FIR2IR] Simplify logic around annotationMode
#KT-58005 Fixed
2023-05-05 16:15:00 +00:00
Alexander Udalov 59ea7717dd Codeowners: add JVM team to kapt tests 2023-05-05 13:51:25 +00:00
Dmitrii Gridin c2b09d3b1e [LL FIR] rewrite LLFirSuperTypeTargetResolver
The previous implementation had issues with
locks, publication and performance

Also, this change fixed a problem with mixed cycle inheritance

^KT-56550
^KTIJ-25430 Fixed
^KTIJ-23520 Fixed
^KT-57623 Fixed
^KTIJ-25372 Fixed
^KT-58357 Fixed
2023-05-05 12:35:46 +00:00
Ilya Goncharov 09d17d88d7 [Gradle, JS] Add printing of build output to composite build test 2023-05-05 12:27:42 +00:00
Vladimir Sukharev 98be76295f [K2/N] Insert asserts to reveal wrongly recursive Fir2IrLazy*.overriddenSymbols
^KT-58459
[Merge-request: KT-MR-9962
Merged-by: Vladimir Sukharev <Vladimir.Sukharev@jetbrains.com>
2023-05-05 12:06:22 +00:00
Stanislav Ruban 47c32ef37f KT-52671: Add CLI test
The issue in question was obsoleted by development of K2/MPP.

^KT-52671
2023-05-05 11:58:22 +00:00
Sergej Jaskiewicz bfa2c92c7f [IR] Support stable ordering in Kotlin-like IR dump
This is needed for signature tests to work with the same golden data
on both K1 and K2, since sometimes K1 and K2 produce IR with different
order of declarations and supertypes.
2023-05-05 11:12:37 +00:00
Nataliya.Valtman 71e81aa30e Fix build reports when no kotlin task is executed
#KT-58313: Fixed
2023-05-05 10:48:11 +00:00
Nataliya.Valtman 750ff32241 Avoid using project.getProperties() for customSessionLoggerRootPath 2023-05-05 10:48:11 +00:00
Kirill Rakhman 3c66ae0f8b [FIR, LT] Report syntax error by traversing LT after parsing
#KT-57756 Fixed
2023-05-05 09:34:24 +00:00
Kirill Rakhman b07e4f26ef [LT, Parsing] Parse blocks and lambdas eagerly for Light Tree 2023-05-05 09:34:23 +00:00
Kirill Rakhman 6119606cb6 [FIR LT] Make syntax error reporting in tests consistent with cli 2023-05-05 09:34:23 +00:00
Kirill Rakhman bdf0b41026 [FIR] Consolidate SYNTAX and SYNTAX_WITH_MESSAGE diagnostics 2023-05-05 09:34:23 +00:00