Commit Graph

101660 Commits

Author SHA1 Message Date
Alexander.Likhachev ebef67ea6a [Build] Enable internal Gradle setup plugin by default
Related to KTI-1223
2023-06-07 12:33:10 +00:00
Alexander.Likhachev 04fcffa664 [Build, IGS] Add a consent details document link
Related to KTI-1223
2023-06-07 12:33:10 +00:00
Svyatoslav Scherbina 063e7258ee Native: don't dispatch release for null Obj-C refs to the main thread
Currently, if a Kotlin object happens to have null for an associated
object but FLAGS_RELEASE_ON_MAIN_QUEUE flag set, GC will dispatch
Kotlin_ObjCExport_releaseAssociatedObject(null) to the main thread
anyway.

This couldn't happen before, but can now, with disposeObjCObject.
The commit prevents this, by moving the null check out from
Kotlin_ObjCExport_releaseAssociatedObject to call sites.

^KT-59134
2023-06-07 11:57:54 +00:00
Svyatoslav Scherbina 1bf3d55bdf Native: add detachObjCObject internal function for Obj-C objects
For a Kotlin wrapper of an Objective-C object, this functions zeroes
and releases the strong reference from the Kotlin wrapper to the
Objective-C object.
Usually, such a release happens only when the Kotlin wrapper is GCed.
So using this function can help that happen sooner.

^KT-59134
2023-06-07 11:57:54 +00:00
Dmitriy Novozhilov 6521729466 [Test] Update dumps of fir metadata where it differs on different platforms 2023-06-07 10:58:01 +00:00
Dmitriy Novozhilov 357c552b5f [Test] Set JVM target backend for load compiled tests which use JDK classes 2023-06-07 10:58:01 +00:00
Dmitriy Novozhilov 7eca772ec2 [JS Test] Introduce tests for loading metadata produced by JS compiler 2023-06-07 10:58:01 +00:00
Dmitriy Novozhilov 2290a096d1 [Test] Add JVM platform to name of ..FirLoadCompiledKotlin.. tests
This is needed for further distinguishing them with similar JS tests
2023-06-07 10:58:01 +00:00
Vyacheslav Gerasimov d5831587fb Build: Download jshell using configuration 2023-06-07 10:12:39 +00:00
Vyacheslav Gerasimov 965b00549f Build: Download webassembly wabt and test suite using configuration 2023-06-07 10:12:39 +00:00
Denis.Zharkov 0d070f8ba9 K2: Fix processing inference lower bound NullableType <: T & Any
Previously, it was led to plainly adding NullableType <: T constraint
which silently led to successful call completion.
What is suggested is just marking such initial constraint
as unsuccessful.

In K1, the error was reported just via additional type checking
mechanism being run after call completion.

^KT-58665 Fixed
2023-06-07 09:42:55 +00:00
Dmitrii Gridin 7bc04e2c33 [FIR] do not try to render resolveState for elements that are not supposed to have it
^KTIJ-25584 Fixed
2023-06-07 08:07:01 +00:00
Igor Chevdar 74a97ba730 [K/N][tests] Fixed a filecheck test 2023-06-07 05:22:49 +00:00
Nikolay Lunyak 45bbd432fc [FIR Native] Stop requiring :dist for native diagnostic test
Native uses its own klib stdlib generated
via `:kotlin-native:dist`.
2023-06-07 05:20:01 +00:00
Abduqodiri Qurbonzoda 0f4cca6877 [K/N] Throw OutOfMemoryError when String + String overflows 2023-06-06 18:11:57 +00:00
Abduqodiri Qurbonzoda 3917ec94ab [K/N] Use AbstractList.checkIndex() functions instead of custom check functions 2023-06-06 18:11:57 +00:00
Abduqodiri Qurbonzoda 89d1cfe05b [K/N] ArrayList.ensureCapacity() should ignore negative arguments 2023-06-06 18:11:57 +00:00
Abduqodiri Qurbonzoda ae394caf42 [K/N] Throw OutOfMemoryError when StringBuilder overflows 2023-06-06 18:11:57 +00:00
Abduqodiri Qurbonzoda af7965d996 [K/N] Use AbstractList.newCapacity in HashMap.ensureCapacity 2023-06-06 18:11:57 +00:00
Abduqodiri Qurbonzoda 2ef50f8c34 Move ArrayDeque.newCapacity to AbstractList 2023-06-06 18:11:57 +00:00
Abduqodiri Qurbonzoda d8cfc79d92 [K/N] Fix StringBuilder.setRange capacity expansion 2023-06-06 18:11:57 +00:00
Abduqodiri Qurbonzoda 21636efe38 [K/N] Small refactoring of StringBuilder 2023-06-06 18:11:56 +00:00
Ilmir Usmanov 95662234d0 JVM: Support instantiation of annotations with vararg parameters
when they are instantiated without argument.
 #KT-59033 Fixed
2023-06-06 17:27:52 +00:00
Yahor Berdnikau 67090ff10a [Gradle] Sync ListProperty, SetProperty and MapProperty types as non-convention
Such approach, while does not conform conceptually, ensures
compatibility with existing user build scripts and works more logically
for external users: https://github.com/gradle/gradle/issues/18352

^KT-59056 Fixed
2023-06-06 17:02:06 +00:00
Brian Norman 48484368c7 [Test] Support RENDER_DIAGNOSTICS_FULL_TEXT directive for FIR tests 2023-06-06 15:42:21 +00:00
Pavel Mikhailovskii 22a5dd7f29 Fix signatures of suspend functions with big arity 2023-06-06 15:37:34 +00:00
OliverO2 027593cd78 [KxSerialization] Fix NPE when accessing delegated property
Kotlin 1.7.20 added optimizations for delegated properties on the JVM,
which broke serialization for optimized properties. Commit bfeff81
tried to fix that, but broke non-optimized delegated properties. This
commit restores correct serialization for optimized and non-optimized
properties, also ensuring that it only affects the JVM target.

 #KT-58954 Fixed
 #KT-59113 Fixed
2023-06-06 17:17:39 +02:00
Pavel Kunyavskiy 733ca5a358 [K/N] Unmute tests already working on native
Also, add issue references for some tests
2023-06-06 14:29:21 +00:00
cristiangarcia 46d113605b Adopt configuration-avoidance where possible
Before this change `./gradlew help` (with native enabled)
Created immediately: 1322
Created during configuration: 1541

after this change:
Created immediately: 596
Created during configuration: 1509

To know more about configuration avoidance: https://docs.gradle.org/current/userguide/task_configuration_avoidance.html
2023-06-06 14:27:42 +00:00
Bogdan Mukvich ad8909113d Add SBOM for maven plugins 2023-06-06 13:27:26 +00:00
Bogdan Mukvich 303b01b89b Add SBOM configuration for all published artifacts by default 2023-06-06 13:27:26 +00:00
Vyacheslav Gerasimov e0a477f16d Build: Refactor sbom configuration & wire it with main publication 2023-06-06 13:27:25 +00:00
Bogdan Mukvich 18f52832f5 Configure SBOM maven publishing for stdlib 2023-06-06 13:27:25 +00:00
Bogdan Mukvich 02de693a12 Configure SBOM should return artifact 2023-06-06 13:27:25 +00:00
Bogdan Mukvich 1e4f78dcff Update spdx-gradle-plugin 2023-06-06 13:27:25 +00:00
Denis.Zharkov 0775748aa9 Postpone enabling JSpecify annotations by default until 2.0
Thus, KT-55586 is being postponed, too.
The reasoning behind this change is that the language-committee issue
has not been approved yet, so new annotation package can't be enabled
by default, but it seems that it doesn't make sense having
a different behavior for the old one but at least that would make them
work consistently, so we postpone them, too.
2023-06-06 12:45:31 +00:00
Aleksander Kuznetsov 53c488079f [serialization] permit multiple occurrences of lazy function in sources
IDEA projects may have duplicate dependencies on kotlin stdlib. In that case, `IrPluginContext.referenceFunctions` may return more than one copy of each standard function, including three overloads of `kotlin.lazy`. And here's when serialization plugin may fail with an exception.

 It affects Kotlin debugger -- if such a project or module also has serialization plugin enabled, then it completely breaks new evaluation, meaning it's impossible to compute any expression.

Fixes IDEA-314785

Merge-request: KT-MR-10262
Merged-by: Alexander Kuznetsov <Aleksander.Kuznetsov@jetbrains.com>
2023-06-06 12:43:25 +00:00
Dmitrii Krasnov 65aa5fc02e migrated cocoapods test with xcodebuild to new test dsl (junit 5 and gradle test kit)
#KT-51553 In Progress
2023-06-06 11:26:15 +00:00
Alexander Udalov b8785fbd90 K2: do not support disabling NoSourceCodeInNotNullAssertionExceptions
Disabling of this language feature (see KT-57570) was not supported in
the (default) light tree mode, and after this change it will not be
supported in the PSI mode as well. This makes the behavior more
consistent and allows us to remove the directive
IGNORE_BACKEND_K2_LIGHT_TREE in the future (KT-56757).
2023-06-06 10:06:39 +00:00
Alexander Korepanov 82a1242f22 [JS IR] Add tests for JS IR IC + PL
^KT-57347 related
2023-06-06 09:27:57 +00:00
Alexander Korepanov 97620030c6 [JS IR] Rollback PL hacks from JS IR IC infra
^KT-57347 related
2023-06-06 09:27:57 +00:00
Alexander Korepanov fab8a101bb [JS IR] Track PL stubs in IC infra
^KT-57347 fixed
2023-06-06 09:27:57 +00:00
Alexander Korepanov 22dfe07580 [IR BE] Add the ability to collect PL stubbed symbols
^KT-57347 related
2023-06-06 09:27:57 +00:00
Alexander Korepanov aef8ece123 [JS IR] Refactor signature serializer in JS IR IC infra 2023-06-06 09:27:57 +00:00
Alexander Korepanov bb72a8bcb7 [JS IR] Minor style fixes in JS IR IC infra 2023-06-06 09:27:57 +00:00
Nikolay Lunyak 23f87eda1f [FIR] KT-57803: Report the error message for light tree
The renaming prevents the JVM clash.

^KT-57803 Fixed
2023-06-06 07:43:37 +00:00
Vladimir Dolzhenko 7f74950993 Adjust name of IntelliJ Kotlin Plugin team
Merge-request: KT-MR-10425
Merged-by: Vladimir Dolzhenko <Vladimir.Dolzhenko@jetbrains.com>
2023-06-06 07:10:22 +00:00
Dmitrii Krasnov 7f70ac73fd Fixed k/n it tests after removing deprecated targets iosArm32 and watchosX86
^KT-51553
^KT-56533
2023-06-06 06:28:16 +00:00
Vladimir Sukharev 37adc99b9a [K/N] Don't pass -language_version to the second stage of new test system.
^KT-56182
Merge-request: KT-MR-10414
Merged-by: Vladimir Sukharev <Vladimir.Sukharev@jetbrains.com>
2023-06-05 17:59:16 +00:00
Nataliya.Valtman 833b5c12a1 KT-59034 Remove variant factory usage from OperationCompletionListener 2023-06-05 16:25:06 +00:00