Commit Graph

98348 Commits

Author SHA1 Message Date
Ilya Goncharov f16eecb012 [Gradle, JS] Legacy deprecation arguments under ir backend disabled flag 2023-02-01 15:40:52 +00:00
Sergey Bogolepov 02c46d17aa [K/N] Add a trivial test coverage for use Foundation 2023-02-01 15:34:26 +00:00
Mark Mann ba4ba27afd Fix regression where was removed from generated modulemaps 2023-02-01 15:34:25 +00:00
Vladimir Sukharev 26b6c0b310 [K2/N] Unlock old testinfra runs with K2 frontend
Merge-request: KT-MR-8552
Merged-by: Vladimir Sukharev <Vladimir.Sukharev@jetbrains.com>
2023-02-01 15:28:14 +00:00
Aleksei.Glushko b01ef8465a [K/N] Add ring/GenericArrayView bench
also .gitignore cmake-build-debug on all levels

Merge-request: KT-MR-8412
Merged-by: Alexey Glushko <aleksei.glushko@jetbrains.com>
2023-02-01 15:16:09 +00:00
Dmitriy Novozhilov 6a343e7bff [FIR] Resolve forks in constraint system after analysis of postponed lambda
When constraint system has forks in it usually we solve all of them before
  starting full completion of corresponding call. But if some call with
  forks was a last statement of postponed lambda, we will never call
  completion for it with FULL mode. Instead of it we complete it in PARTIAL
  mode and then just merge its constraint storage into storage of outer
  call. So all forks from this inner call just remain unresolved inside
  outer system without this fix

^KT-55966 Fixed
2023-02-01 15:02:02 +00:00
Nikita Bobko 770d6a4708 Bump KotlinAbiVersion for Enum.Entries
^KT-55808 Fixed
Review: https://jetbrains.team/p/kt/reviews/8401

If I don't bump `versions.kotlin-native` then locally
`kotlinx.coroutines` & `kotlinx.atomicfu` user projects compilation
fails with message:
```
w: skipping /home/bobko/jb/kotlinx-atomicfu/atomicfu/build/classes/kotlin/metadata/commonMain. Incompatible abi version. The current default is '1.7.0', found '1.8.0'. The library produced by 1.8.255 compiler
e: Could not find "/home/bobko/jb/kotlinx-atomicfu/atomicfu/build/classes/kotlin/metadata/commonMain" in [/home/bobko/jb/kotlinx-atomicfu, /home/bobko/.konan/klib, /home/bobko/.konan/kotlin-native-prebuilt-linux-x86_64-1.8.20-dev-5812/klib/common, /home/bobko/.konan/kotlin-native-prebuilt-linux-x86_64-1.8.20-dev-5812/klib/platform/linux_x64]
```

It worth noticing that we hardcoded "1.9.0-dev-693" on CI
(kotlin-teamcity-build/6693cb229c7485e07241fbc28322344774bcc3e0) to
workaround KTI-1107. 1.9.0-dev-693 also bumps KotlinAbiVersion
2023-02-01 15:13:34 +01:00
Nikita Bobko 711f36675c CompatibilityMode cleanup
Review: https://jetbrains.team/p/kt/reviews/8401

- Drop unused variables
- Replace `assert` with `require` because `assert` isn't reliable which
  makes hard to do any judgements about the code (`-ea` flag must be
  passed to the VM for the `assert` to be active. And it's hard to know
  when we the flag is passed). If `assert` was here for the performance
  reasons then a comment should have been left.
- Add the assert message for clearity

Because I'm evaluating what will break if KotlinAbiVersion is bumped.
And when the code around KotlinAbiVersion is clean it's easier to do the
evaluation.
2023-02-01 15:13:34 +01:00
Nikita Bobko 44b1cf6c46 Add docs for different metadata versions and proto files
Review: https://jetbrains.team/p/kt/reviews/8401
In scope of KT-55082
2023-02-01 15:13:34 +01:00
Nikita Bobko 62b27b4613 Cleanup: drop KlibIrVersion
Review: https://jetbrains.team/p/kt/reviews/8401
In scope of: KT-55082

Because this version isn't used for anything. We have KotlinAbiVersion
to version the IR format.
2023-02-01 15:13:34 +01:00
Nikita Bobko dff13ec584 Minor klib cleanups
Review: https://jetbrains.team/p/kt/reviews/8401

- Code style
- Drop unused properties in kotlin-native/build.gradle
- kotlin-native/build.gradle: drop unused import
- use final instead of open when possible

This is just a cleanup commit. It neither fixes any issue/bug, nor
introduces new behaviour.

Feel free to revert this commit if you find out that it breaks something
2023-02-01 15:13:34 +01:00
Nikita Bobko 73149fdf0b Cleanup: Use concrete subclass instead of BinaryVersion when possible
Review: https://jetbrains.team/p/kt/reviews/8401

BinaryVersion is a problematic class, because it doesn't represent any
logical entity in the codebase, it's just a way to reuse common logic
for Kotlin versions. But unfortunately, BinaryVersion is used in a lot
of API definitions, which makes code hard to read because it's not
obvious which subclasses are supposed to be passed in the particular
API.
2023-02-01 15:13:34 +01:00
Alexander.Likhachev ca60a4fcf9 [Build] Add a temporary workaround for KT-56357 2023-02-01 14:56:07 +01:00
Vladimir Sukharev 08489c5734 [K2/N] KT-56218 Serialize receiver annotations
Merge-request: KT-MR-8624
Merged-by: Vladimir Sukharev <Vladimir.Sukharev@jetbrains.com>
2023-02-01 13:33:55 +00:00
Kirill Rakhman 0af3a54950 [FIR] Add explanations for ResolutionMode.AssignmentLValue 2023-02-01 13:00:20 +00:00
Dmitrii Gridin 0aa50a559f [AA LL] FileBasedKotlinDeclarationProvider: add missing facade name check to findFilesForFacade 2023-02-01 12:51:32 +00:00
Dmitrii Gridin 11c228327e [LC] drop redundant testData with .compiled.java extension
^KTIJ-24067
2023-02-01 12:51:32 +00:00
Dmitrii Gridin 6fd79f4e2e [SLC] AbstractSymbolLightClassesByFqNameTest: do not generate local declarations for libraries
^KTIJ-24067
2023-02-01 12:51:31 +00:00
Dmitrii Gridin f9d5534689 [SLC] SymbolKotlinAsJavaSupport: implement getKotlinInternalClasses
^KTIJ-24067
2023-02-01 12:51:31 +00:00
Kirill Rakhman e81f34d4b0 [FIR2IR] Generate fake overrides for synthetic properties
This fixes "IllegalStateException: Fir2IrSimpleFunctionSymbol for
<paramName> is already bound" when creating a callable reference to a
synthetic property

^KT-56072 Fixed
2023-02-01 11:56:26 +00:00
Ivan Kochurkin b25e460beb [FIR2IR] Minor: simplify code 2023-02-01 11:42:46 +00:00
Ivan Kochurkin 6bdd0edd6c [FIR2IR] Add Fir2IrCommonMemberStorage, get rid of merge in Fir2Ir storages
Extract DescriptorSignatureComposerStub and WrappedDescriptorSignatureComposer to separate classes
2023-02-01 11:42:46 +00:00
Ivan Kochurkin c89770c450 [IR] Consider extension receivers during expect functions actualization
^KT-56199 Fixed
2023-02-01 11:42:45 +00:00
Ivan Kochurkin 0f9107c153 [FIR2IR] Remove passing excess arguments to jvm backend functions and classes
generateModuleInFrontendIRMode, runBackend

FirJvmBackendExtension, ModuleCompilerIrBackendInput
2023-02-01 11:42:45 +00:00
Ivan Kochurkin e601b01be2 [FIR2IR] Use single IrBuiltInsOverFir for all MPP source modules
^KT-56229 Fixed
2023-02-01 11:42:45 +00:00
Ivan Kochurkin 001b11f285 [FIR2IR] Use single SymbolTable and SignatureComposer for all MPP modules
Merge createModuleFragmentWithSignaturesIfNeeded and createModuleFragmentWithoutSignatures
into the createModuleFragmentWithSignaturesIfNeeded
2023-02-01 11:42:44 +00:00
aleksandrina-streltsova a5d8429515 [FIR] fix implementation status for Java fields and synthetic properties
^KTIJ-23963 Fixed
2023-02-01 11:33:01 +00:00
Dmitriy Novozhilov a5f48e295e [Build] Add configuration cache compatibility workaround for MetadataDependencyTransformationTask 2023-02-01 11:31:45 +00:00
Dmitriy Novozhilov 4e04a8bc69 Advance bootstrap to 1.9.0-dev-877 2023-02-01 11:31:44 +00:00
Vladimir Sukharev fbcb07d375 [K2/N] KT-55828 Enable already fixed and accidentally disabled tests
Merge-request: KT-MR-8605
Merged-by: Vladimir Sukharev <Vladimir.Sukharev@jetbrains.com>
2023-02-01 10:44:26 +00:00
Mikhail Glukhikh 1d309cbbb2 Fix test data accidentally broken in cab03404 (commit clash) 2023-02-01 10:18:19 +01:00
Zalim Bashorov 95a1218996 [CODEOWNERS] Change owner of wasm intrinsics to "Kotlin Wasm"
And make "Kotlin Wasm" co-owner of /js/js.translator/testData/
2023-02-01 00:36:11 +01:00
Zalim Bashorov 58e523b890 [Wasm] Change target directory for wasm intrinsics for finer tuning code owners
Also, minor cleanup in the generator.
2023-02-01 00:35:49 +01:00
Mikhail Glukhikh cab0340497 K1: report also TYPE_MISMATCH_WARNING in JvmSyntheticAssignmentChecker
#KT-56061 Fixed
2023-01-31 22:05:18 +00:00
Mikhail Glukhikh f14effa8e8 K1: extract isAssignmentCorrectWithDataFlowInfo 2023-01-31 22:05:17 +00:00
Mikhail Glukhikh 7cc3f7de62 K1: introduce assignment checkers and convert JvmSyntheticAssignmentChecker
Related to KT-56061
2023-01-31 22:05:16 +00:00
Mikhail Glukhikh 5fc0aa769b FE: add more tests around KT-56061 2023-01-31 22:05:16 +00:00
Marco Pennekamp 17500b225d [LL FIR] Remove FIR_IDE_IGNORE test directive
^KT-50732 fixed
2023-01-31 20:28:46 +00:00
Sebastian Sellmair 06a2069d6b Bump Kotlin/Native version to 1.9.0-dev-886
^KT-56205 Verification Pending
2023-01-31 16:15:20 +00:00
Sebastian Sellmair b6ea04d789 [K/N] Don't add linkDependencies when serializing a metadata klib
^KT-56205 Verification Pending
2023-01-31 16:15:19 +00:00
Sebastian Sellmair 1978566fee [K/N] SearchPathResolver: Do not emit warning for LenientUnresolvedLibrary
^KT-56205 Verification Pending
2023-01-31 16:15:19 +00:00
Anna Kozlova 48b1456290 [CLI] create ArgumentParseErrors instances on request
spare memory for projects with big number of modules
currently 500kb for IJ monorepo of mostly empty errors
2023-01-31 16:08:23 +00:00
Kirill Rakhman f7f50ca842 [FIR2IR] Use cached IrEnumEntry when available in Fir2IrConverter
Calling createIrEnumEntry lead to "IllegalStateException:
Fir2IrEnumEntrySymbol for [declaration] is already bound" when the
IrEnumEntry was already created previously, e.g. by an annotation call
referencing it.

^KT-54079 Fixed
2023-01-31 15:40:25 +00:00
Kirill Rakhman feb6fd0e0d Revert "[FIR2IR] Temporary fix of createIrEnumEntry"
This reverts commit c9a8f433fb.

KT-54079
2023-01-31 15:40:24 +00:00
Vsevolod Tolstopyatov 79f6d4b590 Address classloader leak in a recently-introduced ClassValueCache
Root cause:
Cached in ClassValue values are prohibited to reference any java.lang.Class or ClassValue instances as they are considered as strong roots that prevent Class and ClassValue garbage collection,
creating effectively unloadable cycle.
This problem is also known as JDK-8136353.

Actions taken:
* Extract anonymous ClassValue instance into a separate static class that does not capture anything implicitly
* Wrap cached values in ClassValue into SoftReference to avoid unloadable cycles

^KT-56093 Fixed
2023-01-31 16:22:03 +01:00
Yahor Berdnikau 752de6c622 Don't override compilation freeCompilerArgs in link task
Calling '.addAll()' was replacing convention value leading for inability
to add/modify Kotlin/Native link task freeCompilerArgs via
KotlinCompilation.options.freeCompilerArgs. For now convention
was replaced by normal value.

^KT-56280 Fixed
2023-01-31 15:01:10 +00:00
Vyacheslav Gerasimov ff2db23c11 Build: Set kotlin.daemon.jvmargs in buildSrc to the same value as in the root project
#KTI-915

Merge-request: KT-MR-8589
Merged-by: Vyacheslav Gerasimov <Vyacheslav.Gerasimov@jetbrains.com>
2023-01-31 13:57:27 +00:00
Alexander Udalov 2849e45111 Kapt tests: change _ir.txt to .ir.txt
To be consistent with test data of other compiler tests.
2023-01-31 13:49:44 +00:00
Mikhail Glukhikh f0ea8ab81b FIR2IR: make IrGetValue type consistent with IrVariable type
#KT-55458 Fixed
2023-01-31 13:43:26 +00:00
Mikhail Glukhikh 1c4d9175e7 FIR2IR: add test for KT-55458 2023-01-31 13:43:26 +00:00