Commit Graph

100618 Commits

Author SHA1 Message Date
Sebastian Sellmair 55cc2e5e42 [Gradle] ExternalTargetApi: Check-in/Document ExternalKotlinTargetDescriptor
KT-55524
2023-04-25 12:49:51 +00:00
Sebastian Sellmair 0191368f1f [Gradle] IdeMultiplatformImportImpl: Remove unnecessary ExternalTargetApi annotations
KT-55524
2023-04-25 12:49:51 +00:00
Sebastian Sellmair 403a4b48fa [Gradle] ExternalTargetApi: Check-in/Document IdeMultiplatformImport
KT-55524
2023-04-25 12:49:51 +00:00
Sebastian Sellmair 127f3e55e8 [Gradle] ExternalTargetApi: Check-in/Document IdeDependencyResolver
KT-55524
2023-04-25 12:49:51 +00:00
Sebastian Sellmair 63f8cf2237 [Gradle] ExternalTargetApi: Check-in/Document IdeBinaryDependencyResolver
KT-55524
2023-04-25 12:49:51 +00:00
Sebastian Sellmair b32cae293b [Gradle] Add documentation to ExternalKotlinTargetApi
KT-55524
2023-04-25 12:49:51 +00:00
Sebastian Sellmair 9f003328cf [Gradle] Setup initial api validation for ExternalTargetApi
KT-55524
2023-04-25 12:49:50 +00:00
Sebastian Sellmair 628fa919dd [kotlin-tooling-core] Document IdeaKotlinExtrasSerializationExtension
KT-55524
2023-04-25 12:49:50 +00:00
Sebastian Sellmair 425c7c738e Update kotlin binary compatibility validator to v0.13.1
KT-55524
2023-04-25 12:49:50 +00:00
Jinseong Jeon 5298abf2d6 AA/LC: introduce an API to find script files 2023-04-25 14:49:03 +02:00
Jinseong Jeon f9086daf4d SLC: add support for .kts
^KTIJ-21108
^KT-50241
^KT-55626 Fixed
2023-04-25 14:49:03 +02:00
Artem Kobzar 4327c6645a [K/JS] Save order for modulesWithReachableTopLevels and deserializersForModules to make partial linkage work again 2023-04-25 12:20:14 +00:00
Mikhail Glukhikh 4589463e92 FirBasedSymbol: call lazyResolveToPhase directly on a backing field 2023-04-25 12:18:27 +00:00
Mikhail Glukhikh 156be26982 AA: use full rendering of backing field symbols 2023-04-25 12:18:27 +00:00
Mikhail Glukhikh 1f05ce2e01 AA/LC: Support annotation property->backing field move
#KT-57462 Fixed
2023-04-25 12:18:27 +00:00
Mikhail Glukhikh f6bf7560a6 K2: fix field annotation handling around serialization
#KT-57135 Fixed
2023-04-25 12:18:27 +00:00
Mikhail Glukhikh dc38ce24f7 K2: fix field annotation splitting and frontend checks
Related to KT-57135
2023-04-25 12:18:26 +00:00
Pavel Mikhailovskii 37ed7beda0 KT-57135 Take into account annotations' allowed targets
- Check allowed targets
- Attach field annotations to the backing field
2023-04-25 12:18:26 +00:00
Margarita Bobova ea2145415d Move ChangeLog for 1.7.X to a separate file 2023-04-25 13:37:32 +02:00
Margarita Bobova 9d1ae63b41 Add Changelog for 1.8.20 and 1.8.21 2023-04-25 13:37:32 +02:00
Nikolay Lunyak e3d313dd02 [FIR] Introduce the proper Fir2IrResultsConverter
Sometimes when running MPP tests we may
observe js-specific modules running with
the jvm-specific fir2ir converter
(probably because the name didn't contain
the JVM affix).
2023-04-25 11:29:34 +00:00
Nikolay Lunyak e1158b1cb2 [FIR] Don't load unneeded things
It's confusing to stop at breakpoints
related to these loadings when they aren't
actually used.
2023-04-25 11:29:34 +00:00
Nikolay Lunyak 360d236b7e [FIR JS] KT-57601: Get rid of the builtin provider
In this example we get 2 variants of `kotlin/toString()`:
one coming from the KLib provider, and the
other coming from the builtins provider.
These are identical deserialized functions.

^KT-57601 Fixed
2023-04-25 11:29:34 +00:00
Nataliya.Valtman 2a391f7330 Move kotlin-build-statistic project to :compiler 2023-04-25 11:29:09 +00:00
nataliya.valtman e34dd043da Add minimal statistic report for JPS build
Fix build stat for gradle 8

#KT-56438 Fixed
2023-04-25 11:29:09 +00:00
Nikolay Lunyak f3ca465647 [FIR] Freeze the current behavior of ImplicitIntegerCoercion+overloads
Adding the tests "just in case", ensuring the
K2 behaves similar to K1.
2023-04-25 10:57:08 +00:00
Nikolay Lunyak 931894ab3c [FIR] KT-57655: Add the missing condition
^KT-57655 Fixed
2023-04-25 10:57:08 +00:00
Nikolay Lunyak c4d5332251 [FIR] KT-57655: Ensure the current IR is incorrect
The
`FirPsiBlackBoxCodegenTestGenerated.testImplicitIntegerCoercionNamedArg`
test fails in K2 with "java.lang.Integer
cannot be cast to kotlin.UInt".
2023-04-25 10:57:07 +00:00
Anna Kozlova 20661d1f95 [cls] more compact representation for contract stubs
distinguish boolean parameters
2023-04-25 10:34:33 +00:00
Yahor Berdnikau 50f5fadfd8 Expose task input to control jvm target validation mode
^KT-56971 Fixed
2023-04-25 10:28:29 +00:00
Yahor Berdnikau 861e9392de Fix JPS import from Gradle in KGP 2023-04-25 10:23:46 +00:00
Kirill Rakhman d96c33e080 [FIR] Add dynamic stages to callable reference resolution
This fixes an overload resolution ambiguity on callable references
in the presence of a dynamic extension receiver.

#KT-58143 Fixed
2023-04-25 10:03:40 +00:00
Anton Lakotka c16f2f1067 [Gradle, Test] remove unnecessary code comment 2023-04-25 09:58:07 +00:00
Dmitriy Novozhilov 903e969598 [FIR2IR] Correctly calculate offsets for implicit toLong() calls during constant evaluation
^KT-58132 Fixed
2023-04-25 09:36:17 +00:00
Anna Kozlova 4fe239375f [cls] write contracts information to cls stubs
^ KTIJ-24665
this information would be used to create resolved FirElements from stubs,
so no ProtoBuf would be kept in memory
2023-04-25 08:34:18 +00:00
Dmitriy Dolovov 9d4db72d72 [PL] Fix: Don't raise an error when external interface inherits from external class
^KT-57378
2023-04-25 08:00:14 +00:00
Dmitriy Dolovov 3bc744af35 [PL] Fix: Don't raise an error for unimplemented callables in external classes
^KT-57378
2023-04-25 08:00:14 +00:00
Dmitriy Dolovov e85406b561 [PL][tests] Learn PL test infra to work with JS files
^KT-57378
2023-04-25 08:00:14 +00:00
Dmitriy Dolovov b5ad5edc08 [PL][JS] Add test for handling external declarations
^KT-57378
2023-04-25 08:00:14 +00:00
Kirill Rakhman 4afc5315ca [FIR] Report missed diagnostics from FirSyntheticCallGenerator
#KT-58207 Fixed
2023-04-25 07:48:24 +00:00
Yan Zhulanow cb825f664f [LL API] Do not throw PCE on invalid sessions, patch specific cases
This is a temporary solution to fix the problem with sessions that
turned to be invalid at the time of analysis.

Currently, 'FirSession's and associated 'FirFile's are reused
between threads. When an exception, which might be an ordinary one
or 'ProcessCancelledException', occurs during an analysis of a module
file, a 'FirSession' for that module becomes invalid.

As there is currently a single resolution lock in the K2 IDE, other
threads might be waiting for resolution on the same session.
These threads are unaware that the session cannot be safely used
anymore, as it was correct before the lock.

The previous approach with cancelling analysis in all waiting threads
with manual 'ProcessCancelledException' throwing right inside the lock
showed it's incorrect. While some actions might be prepared to sudden
PCEs and can restart themselves, such behavior is not granted
by the platform.

The fix patches a few common places so the diagnostic list and
a file structure tree can be built safely. It is expected that in
some places exceptions caused by an inconsistent FIR tree can revive.

The right, ultimate fix to the problem involves modifying transformers,
so the FIR tree will mutate only when the analysis is complete. Although
it's planned work, it is expected to take quite a time.
2023-04-25 06:03:52 +00:00
Roman Golyshev e4390e47cf [Analysis API] KTIJ-23588 Do not ignore calls qualified with objects
^KTIJ-23588 Fixed
2023-04-24 22:16:55 +00:00
Nikolay Krasko 0aaaa5b4fa [213] Fix 1.5.10-release-949 jdk 8 stdlib requirement in :jps-common:test
ERROR:
:jps:jps-common:test: Could not find org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.5.10-release-949.

The problem is in dependency:
com.jetbrains.intellij.platform:jps-model-serialization:213.7172.25 -- (runtime) ->
com.jetbrains.intellij.platform:util:213.7172.25 -- (runtime) ->
org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.5.10-release-949

Provide a jdk 8 stdlib that should make the resolution of the dependency
redundant.

KTI-1114
2023-04-24 21:58:31 +00:00
Yahor Berdnikau 3ee089bb48 Decouple KaptGenerateStubsTask from related KotlinCompile task configuration
This should simplify setup and remove task circular dependencies.

Generally users should not be affected by it unless they are configuring
 KotlinCompile task explicetly and expect the same configuration will be
  present on KaptGenerateStubsTask.

^KT-54468 In Progress
2023-04-24 18:32:07 +00:00
Yahor Berdnikau ee1517cd6a Decouple Kapt task from KotlinCompile task configuration
This fixes KotlinCompile task instantiation on configuring Kapt tasks
as well Kapt tasks itself eager realization.

Additionally this change removes circular dependency between kapt and
compilation tasks.

^KT-54468 In Progress
2023-04-24 18:32:07 +00:00
Ilya Goncharov e06606aa3f [Gradle, JS] Fix kotlin-gradle-plugin-npm-versions-codegen in codeowners 2023-04-24 17:12:19 +00:00
Dmitrii Gridin cb546926d5 [LL FIR] LLFirLazyResolveContractChecker: drop hack for COMPILER_REQUIRED_ANNOTATIONS phase
This is an obsolete hack

^KT-56543
2023-04-24 16:04:44 +00:00
Sebastian Sellmair 476c209bf4 [Gradle] Remove kotlinx.coroutines from KGP compile classpath
- Replace CompletableDeferred with a simple 'Completable'
- Replace withContext usage for 'withRestrictedStages' with custom
implementation

^KT-58162 Verification Pending
2023-04-24 15:45:24 +00:00
Ilya Goncharov 97d6b71654 [Gradle, JS] Remove unnecessary warning about multiple versions
^KT-56458 fixed

Merge-request: KT-MR-9747
Merged-by: Ilya Goncharov <Ilya.Goncharov@jetbrains.com>
2023-04-24 15:32:15 +00:00
Aleksei.Cherepanov 2e453051f9 Add cache comparator for incremental gradle tests
Add logic that rebuilds all sources after the last incremental round of each Gradle IC test and compares caches. The same was already implemented for JPS, but not for Gradle. After all rounds of incremental compilation are completed, another clean build from scratch is produced. All caches after the rebuild are compared with the caches of the last round of incremental compilation. This check is necessary because incremental compilation artifacts should depend on the state of the project, source files, and configuration, and not the chain of changes and incremental builds that led to this state. After the launch, there were several tests that did not satisfy the above conditions, and were muted  (KT-56681, KT-55195, KT-56242, KT-56698)

#KT-54991 In Progress
2023-04-24 14:54:45 +00:00