Commit Graph

104271 Commits

Author SHA1 Message Date
Ilya Gorbunov 60bbd08569 [Generator] Rename additionalDoc, put its content before annotations 2023-09-04 11:32:39 +00:00
Nikolay Lunyak cd392ebe69 [FIR] Don't miss RETURN_NOT_ALLOWED
^KT-59914 Fixed
2023-09-04 10:19:11 +00:00
Vyacheslav Gerasimov 009cda0c60 Build: Make robolectric tests run offline without downloading artifacts
#KTI-1367
2023-09-04 08:57:19 +00:00
Nikolay Lunyak bb8d3a0f80 [FIR] Don't recalculate argumentVariables for the same node
`knownVariables` can't be moved to the outer
function, because it's specific to the current
path: we want to check that the contract
condition is approved along the current path.

For example, in the
`FirPsiDiagnosticTestGenerated.testPropertyGetter`
test when analyzing the function, we want
 to check if we can derive the `d1 == Any`
 type statement (where `d1` is the receiver).
 If we can't, the flow won't contain `d1`
 among `knownVariables`
2023-09-04 08:13:00 +00:00
Kirill Rakhman 1c446151e7 [FIR] Skip resolvable package names in front of UNRESOLVED_REFERENCE
#KT-55471
2023-09-04 08:05:08 +00:00
Kirill Rakhman 10f7989af6 [FIR] Report UNRESOLVED_REFERENCE on the first unresolved qualifier
#KT-55471 Fixed
2023-09-04 08:05:07 +00:00
Kirill Rakhman 40fadac060 [FIR] Remove incorrect code generation comment 2023-09-04 08:05:07 +00:00
Dmitrii Gridin 420b6d48c3 [LL FIR] FileStructure: avoid redundant bodies visiting
We shouldn't try to find structure elements inside non-local declarations
Only classes and scripts can have an inner structure

^KT-60611
2023-09-03 11:44:00 +00:00
Dmitrii Gridin 8832865e9a [LL FIR] simplify FileStructureElement invalidation
We can avoid complex reanalyze-base logic and just directly
drop outdated data from FileStructureCache

^KT-60611
2023-09-03 11:44:00 +00:00
Dmitrii Gridin 89c186c496 [LL FIR] move part of in-block modification logic into service
^KT-60611
2023-09-03 11:44:00 +00:00
Marco Pennekamp 6b0333d74c [FIR] Avoid AST loading in KtPrimaryConstructor.toFirConstructor
- `getConstructorKeyword` forces an AST load due to a child search. In
  most cases, we don't need to check the constructor keyword in primary
  constructors at all (e.g. `class ABC()` with an implicit primary
  constructor). The keyword check is only needed when there are primary
  constructor modifiers (e.g. `class ABC constructor()`).

Thanks to Dima Gridin for the suggested fix.

^KT-61635 fixed
2023-09-02 12:59:24 +02:00
Alexander Udalov 761221904c K2 kapt: add kapt.use.k2 Gradle property
... and `-Kapt-use-k2` CLI flag to enable K2 kapt.

 #KT-61114 Fixed
2023-09-01 22:51:19 +00:00
Iaroslav Postovalov 059046a2b1 [JVM] Micro-optimize method signature mapping
This commit optimizes functions related to method signature mapping on
the JVM backend. The most significant change is avoiding re-allocations
in StringBuilder when building internal names. The commit also includes
minor optimizations, such as removing redundant allocations of strings
and other objects.
2023-09-01 20:26:17 +00:00
Alexander Shabalin 70996035fc [K/N] Move AllocatorImpl.hpp into alloc/ ^KT-60928
- Hide allocator-specific data into Allocator::*::Impl
  like with gc and gcScheduler modules.
- These *::Impl are still owned by specific GCs
- Additionally moved "stateless" allocator APIs into Allocator.hpp
2023-09-01 17:00:59 +00:00
Nikolay Krasko 3d4afb8994 Be more precise in the trusted section with using '.' in regex
KTI-1359
2023-09-01 16:52:07 +00:00
Nikolay Krasko b781ba77d0 Remove too wide ranges for kotlin trusted libraries
Leave only bootstrap range again

This commits reverts da267ba2c8. It looks
like JPS import is possible without additional regular expressions. Also,
origin commit added too wide range of trusted versions.

KTI-1359
2023-09-01 16:52:07 +00:00
Nikolay Krasko 405fb1085a Don't trust any native prebuilt version
KTI-1359
2023-09-01 16:52:06 +00:00
Nikolay Krasko 4396505c8c Remove strange exclusions from verification-metadata
KTI-1359
2023-09-01 16:52:06 +00:00
Nikolay Krasko 49c2bc18f2 Remove old intellij ivy exclusions in trust artifacts
KTI-1359
2023-09-01 16:52:06 +00:00
Dmitrii Krasnov e1c770eecb Remove checking userHomeDir/.konan/dependencie in NativeDownloadAndPlatformLibsIT. In teamcity someone creates this dir. 2023-09-01 16:04:59 +00:00
Egor Kulikov 2f893017ee [FIR] Fix incorrect psi provided to checker
^KT-60343 fixed
2023-09-01 16:00:06 +00:00
Alexander Shabalin cb25ef80a9 [K/N] Reenable disabled FirStdlibTest 2023-09-01 14:45:05 +00:00
Nataliya.Valtman f46245621f Log created error file in debug log
KT-59451 Fixed
2023-09-01 14:26:09 +00:00
Roman Golyshev 496e4dd0e3 KTIJ-26867 [AA] Allow resolve from write action in KtFirReferenceResolver
`KtReference` might be resolved from anywhere, even
from the write action - the call site might not know
anything about Kotlin, and might not be able to
somehow prevent the `inaccessible analysis session`
exception from being thrown. That's why we
have to be permissive here.

^KTIJ-26867 Fixed
2023-09-01 14:20:03 +02:00
Ilya Goncharov 0f40b2adce [Gradle, wasm] Hack for mixed mode with js, wasmJs and wasmWasi
^KT-61623 fixed
2023-09-01 11:53:04 +00:00
strangepleasures cc60618e86 KGP IT: do not run a failing test with class loader cache 2023-09-01 11:26:17 +00:00
Alexander Shabalin 958d613911 [K/N] Remove code for deprecated targets from runtime ^KT-59008 2023-09-01 10:48:07 +00:00
Dmitriy Novozhilov e4a51dfa1b [Serialization] Don't report errors on properties from supertypes
^KT-53926 Fixed
2023-09-01 09:35:43 +00:00
Dmitriy Novozhilov b4bc659008 [FIR] Update documentation of AbstractPredicate about matching local declarations
^KT-52449 Obsolete
2023-09-01 09:35:43 +00:00
Nikolay Lunyak b25a67a50e [FIR] Prohibit statement-like expressions in expression context
^KT-61067 Fixed
2023-09-01 09:30:28 +03:00
Alexander Udalov 5c19cb3fcb [KAPT4] KT-51982 Implement Kapt4AnalysisHandlerExtension, add KAPT CLI and Gradle IT
Co-authored-by: Alexander Udalov <Alexander.Udalov@jetbrains.com>
2023-08-31 22:19:13 +00:00
Alexander Udalov d50d36f16c Kapt+JVM_IR: add regression test for KT-61212
#KT-61212
2023-08-31 17:58:04 +00:00
Dmitrii Krasnov 1af7aba26e Bump Kotlin/Native version in KGP to 1.9.30-dev-1903 2023-08-31 17:39:47 +00:00
Dmitrii Krasnov 0191a15d96 migrated NativeDownloadAndPlatformLibsIT to junit 5 and gradle TestKit 2023-08-31 17:39:47 +00:00
Ilmir Usmanov 168076766f Minor. Fix test 2023-08-31 15:55:06 +00:00
Ilmir Usmanov 6c13250a08 KAPT3: Use another class in com.sun.tools.javac.main
Instead of CommandLine use Option, since CommandLine was moved or
removed from JDK 21.

 #KT-60507 Fixed
2023-08-31 15:55:06 +00:00
Ilmir Usmanov 62effc49fa KAPT3: Suppress useless cast, since it is not useless on JDK 21 2023-08-31 15:55:06 +00:00
Donald Duo Zhao a8fcdddf24 Move to use reflection to access JDK8 APIs
Currently, KAPT3 uses JDK internal API to build Java AST.
Since the API is internal, it has changed in newer JDKs.
So, for them, use reflection to access new API.
 #KT-59349 Fixed
2023-08-31 15:55:06 +00:00
Ilya Kirillov 56910b70a3 [Analysis API] fix "KotlinIllegalStateExceptionWithAttachments: expected as maximum one expect for the actual"
^KT-61597 fixed
2023-08-31 15:19:29 +00:00
Roman Golyshev f39153b6e6 KT-61568 [FIR][AA] Add one more testcase for AllCandidatesResolver 2023-08-31 14:59:53 +00:00
Abduqodiri Qurbonzoda 9352e40d54 Wasm Enum.hashCode() is not final #KT-61614
Merge-request: KT-MR-11938
Merged-by: Abduqodiri Qurbonzoda <abduqodiri.qurbonzoda@jetbrains.com>
2023-08-31 14:31:56 +00:00
Mikhail Glukhikh 3ff2c7d6f7 K2: introduce custom Enum.entries migration checkers
Related to KT-56623, KT-56587
#KT-59344 Fixed
2023-08-31 13:29:02 +00:00
Mikhail Glukhikh e0d68fc93e K2: introduce FirEnumEntriesRedeclarationChecker (KT-59344) 2023-08-31 13:29:01 +00:00
Mikhail Glukhikh d028f9ec95 K2: add stubs for enum entries deprecation diagnostics (KT-59344) 2023-08-31 13:29:01 +00:00
Alexander.Likhachev 652ff54835 [Gradle] Print kapt worker classpath properly 2023-08-31 13:14:49 +00:00
Alexander.Likhachev 77b9860021 [Gradle] Make KaptTask.kaptPluginOptions an input of the task
#KT-58326 Fixed
2023-08-31 13:14:49 +00:00
Alexander.Likhachev 3a246d3a1d [Gradle] Add an integration test for KT-58326 2023-08-31 13:14:49 +00:00
Pavel Kunyavskiy 91e96e9f31 [Fir2Ir] Introduce testing with IrFakeOverrideBuilder
^KT-61514
2023-08-31 13:12:15 +00:00
Pavel Kunyavskiy bf9cae6410 [Fir2Ir] Support rebuilding fake overrides over IR
^KT-61514
2023-08-31 13:12:15 +00:00
Pavel Kunyavskiy 44c2a749c9 [Ir common] Introduce symbol table api to remove entries
^KT-61514
2023-08-31 13:12:15 +00:00