Commit Graph

108695 Commits

Author SHA1 Message Date
Denis.Zharkov cabf7e4fae Introduce documentation for PCLA implementation
^KT-65637 Fixed
2024-02-09 19:47:35 +00:00
Denis.Zharkov 41cc926953 Minor. Reorder some methods in FirInferenceSession
Put them in the order in which they are assumed to be called
2024-02-09 19:47:35 +00:00
Denis.Zharkov b86c0d990e Minor. Reformat PCLA related part at ResultTypeResolver 2024-02-09 19:47:35 +00:00
Denis.Zharkov 05b5cdc918 Minor. Rename and add kdoc for Candidate::onCompletionResultsWritingCallbacks 2024-02-09 19:47:35 +00:00
cristiangarcia 4a74498be7 Outputs are not serializable, FileCollection is
Required for KTI-1553
2024-02-09 19:10:03 +00:00
Mikhail Glukhikh 8f906ca669 K2: refactor/simplify/comment processOverridesForFunctionsWithDifferentJvmName 2024-02-09 19:04:42 +00:00
Mikhail Glukhikh a189509353 K2: build override structure for Java renamed builtins more precisely
#KT-65410 Fixed
2024-02-09 19:04:42 +00:00
Mikhail Glukhikh c6f5e5f297 Add Kdoc to processOverridesForFunctionsWithDifferentJvmName 2024-02-09 19:04:42 +00:00
Mikhail Glukhikh ba374a3978 K2: reproduce KT-65410 in diagnostic/BB tests 2024-02-09 19:04:42 +00:00
Artem Olkov b6c805bbb6 Remove KotlinSirOrigin hierarchy in favour of direct AA usage #KT-65335 Fixed
Merge-request: KT-MR-14229
Merged-by: Artem Olkov <artem.olkov@jetbrains.com>
2024-02-09 18:34:52 +00:00
Alexander.Likhachev c2e0c8b2e9 [Gradle] Introduce KotlinToolingDiagnostics.DependencyDoesNotPhysicallyExist
Instead of silently ignoring the non-existing classpath entries, emit a warning to indicate possible project misconfiguration.
^KT-62101 Fixed
2024-02-09 18:33:30 +00:00
Alexander.Likhachev 5d98758645 [BTA] Add KDoc for CompilationService.calculateClasspathSnapshot 2024-02-09 18:33:30 +00:00
Alexander.Likhachev de04c62df5 [Gradle] Do not try snapshotting non-existent classpath entries
The fix changes only Gradle's side of the transformation to be consistent with general Gradle behaviour for non-existent dependencies in classpath
^KT-62101 In Progress
2024-02-09 18:33:30 +00:00
Alexander.Likhachev c5138b781f [Gradle] Remove senseless try-catch in BuildToolsApiClasspathEntrySnapshotTransform 2024-02-09 18:33:30 +00:00
Alexander.Likhachev 75df4869cc [Gradle] Add test for KT-62101 2024-02-09 18:33:30 +00:00
Dmitriy Dolovov 21afa19fc1 CODEOWNERS: Update ownership under KLIB tool 2024-02-09 18:31:59 +00:00
Ilya Goncharov 12cd9c4530 [Gradle, JS] Deprecate only deprecated properties in compiler arguments copy 2024-02-09 18:20:08 +00:00
Ilya Goncharov d02be30e3b [Gradle, JS] Return back deprecated options noStdlib and metaInfo 2024-02-09 18:20:08 +00:00
Ilya Goncharov 2340d59f40 [JS] Get rid of outputFile in compiler args (KT-61116)
^KT-56753 fixed
2024-02-09 18:20:08 +00:00
Alexander Udalov 9fcf6c5f89 JVM: add tests on some JPMS-related diagnostics
Somehow we ended up in the state where we have two diagnostics which are
not covered by any tests in the project. This commit adds simple tests
for them.

 #KT-60797
2024-02-09 18:06:02 +00:00
wrongwrong a5bf8787a1 Reflection: exclude DEFAULT_CONSTRUCTOR_MARKER when calculating mask size
#KT-65156 Fixed
2024-02-09 17:54:16 +00:00
Abduqodiri Qurbonzoda 0033c9c23a Unmute unsafeAssignmentExtra test #KT-65218
As the result of the latest changes to stdlib, the muted test succeeds.
Thus "java.lang.AssertionError: Test contains MUTE_LL_FIR directive but
no errors was reported. Please remove directive".
It was decided to unmute the test for now until the compiler team
fixes the issue. See KT-65218
2024-02-09 17:20:15 +00:00
Abduqodiri Qurbonzoda ae3c9dd9b9 Improve Path.walk/delete/copyToRecursively documentation 2024-02-09 17:20:15 +00:00
Abduqodiri Qurbonzoda f8c587ddcf Fix security vulnerability in Path recursive functions #KT-63103
* Prohibit files with name "." or ".."
* Detect cycles caused by files with name "/"
* Prohibit copy outside the target directory

The commit also moves zip-related tests to PathRecursiveFunctionsZipTest.
2024-02-09 17:20:15 +00:00
Sergej Jaskiewicz 4c06673483 [klib] Add a test for clashing signatures in property delegates 2024-02-09 16:45:34 +00:00
Sergej Jaskiewicz 0c0943a880 [klib] Add a test for KT-65551 2024-02-09 16:45:34 +00:00
Sergej Jaskiewicz 03ca64c954 [klib] Make CONFLICTING_KLIB_SIGNATURES_DATA diagnostic more precise
Show what kind of declarations exactly are clashing: functions,
properties, or fields.

This is so that diagnostics about clashing properties and fields are
distinguishable from one another, since properties and fields
are rendered the same way in those diagnostics:
2024-02-09 16:45:34 +00:00
Sergej Jaskiewicz d80a67652f [klib] Fix NIE when showing signature clash diagnostics on properties
The issue was that when rendering declarations in
the `CONFLICTING_KLIB_SIGNATURES_DATA` diagnostics, we sort them using
`MemberComparator`. That comparator falls back to comparing
declarations' renders if all previous checks were unsuccessful
(and in case of almost identical properties they are). The renderer that
the comparator uses also renders the properties' backing field
annotations, for which it calls `PropertyDescriptor#getBackingField`.
That method wasn't implemented in IR-based descriptors.

This is fixed by returning an instance of the new
`IrBasedBackingFieldDescriptor` class from that method.

^KT-65551 Fixed
2024-02-09 16:45:34 +00:00
strangepleasures 9688c3e761 [KAPT] Improve stub formatting; check raw stubs in tests
Merge-request: KT-MR-14244
Merged-by: Pavel Mikhailovskii <Pavel.Mikhailovskii@jetbrains.com>
2024-02-09 15:41:37 +00:00
cristiangarcia c5e6197690 Dokka 1.9.10
Required for KTI-1553
2024-02-09 15:21:45 +00:00
Pavel Kunyavskiy b4062c8974 [Fir2IR] Fix fake override generation for lazy accessors
^KT-65595 Fixed
2024-02-09 13:27:15 +00:00
Marco Pennekamp d121b529b5 [IR] Remove strong references to IR entities in CompilationException
- `CompilationException` should not strongly reference `IrFile`s and
  other IR elements, which in turn reference FIR elements strongly. It
  can lead to a memory leak in the IDE as the exception is held
  statically in the IDE's `MessagePool`.
- I considered fixing this on the level of `KtCodeCompilationException`
  from the Analysis API, but:
  1. `KtCodeCompilationException` can wrap many kinds of exceptions.
     Snapshotting the cause only for `CompilationException` (somewhere
     down the cause chain) would be messy, as it'd require traversing
     the cause chain and referencing `CompilationException` directly,
     breaking API boundaries.
  2. Keeping the same level of report quality while snapshotting a cause
     is not trivial.
  3. Exceptions in general should be as lean as possible, so it makes
     sense to fix `CompilationException` itself.

^KT-65655 fixed
2024-02-09 13:12:40 +00:00
Denis.Zharkov a4ccb72b94 Add tests making sure that a couple of issues are fixed by PCLA
^KT-49283 Fixed
^KT-64077 Fixed
2024-02-09 13:03:12 +00:00
Denis.Zharkov fb8cc00d1f Minor. Mention KT-49160 in relevant test data 2024-02-09 13:03:12 +00:00
Pavel Mikhailovskii 7ab9e03347 KT-65684: KAPT: (Re)enable fallback to K1 KAPT and make it default
[KAPT] KT-65684 Set languageVersion=1.9 in KaptToolIntegrationTestGenerated

[KAPT] KT-65684 Re-enable a few now-passing tests in Kapt4IT

[KAPT] KT-65684 Fix the logic setting -Xuse-kapt4 flag in Kapt4IT.forceKapt4()

The change is needed to make sure that all the tests have the flag set,
 otherwise some of them would silently switch to the fallback node.
Also disables a few now failing tests.

[KAPT] KT-65684 Revert "KT-64385 Enable K2 KAPT by default"

This reverts commit 7e9d6e60


Merge-request: KT-MR-14291
Merged-by: Pavel Mikhailovskii <Pavel.Mikhailovskii@jetbrains.com>
2024-02-09 12:54:28 +00:00
Mikhail Glukhikh e532220305 K1/K2: add a test fixing behavior of overloadResolutionByLambda/PCLA combo 2024-02-09 11:38:34 +00:00
Mikhail Glukhikh 8217aa9633 K2: introduce fun interface PostponedAtomAnalyzer to make code cleaner 2024-02-09 11:38:34 +00:00
Mikhail Glukhikh 9b2fc061e5 K2: drop unused ConeStubTypeForSyntheticFixation 2024-02-09 11:38:34 +00:00
Mikhail Glukhikh f1aaae9515 K2: reorganize code in ConstraintSystemCompleter around PCLA mode 2024-02-09 11:38:34 +00:00
Mikhail Glukhikh 56475c0a5b Rename: builderInferenceSession -> pclaInferenceSession 2024-02-09 11:38:34 +00:00
Mikhail Glukhikh 195d3604ae Add 'K2Only' OptIn for 'usesOuterCs' 2024-02-09 11:38:34 +00:00
Mikhail Glukhikh e54ed9d470 Cleanup FirPCLAInferenceSession 2024-02-09 11:38:34 +00:00
Mikhail Glukhikh 9743a5b334 K2: drop unused parameter in ConstraintSystemCompleter 2024-02-09 11:38:34 +00:00
Mikhail Glukhikh f0ac963474 K2/PCLA: add explicit withPCLASession: Boolean parameter to analyzeLambda 2024-02-09 11:38:34 +00:00
Mikhail Glukhikh c7bc8547da K2: inline notFixedInputTypeVariables in ConstraintSystemCompleter 2024-02-09 11:38:34 +00:00
Ilya Goncharov b4e1fa8569 [Gradle, Wasm] Standartize binaryen and d8 download instead of download task
^KT-65686 fixed
2024-02-09 11:18:37 +00:00
Alexander Shabalin 5bd0bbb159 [K/N][tests] Regroup runtime tests ^KT-53776 2024-02-09 11:14:56 +00:00
Pavel Punegov fb3bd1c3ef [K/N][test] Synchronized simulator device check
Test infrastructure runs tests in parallel for the same target executor.
Device descriptor should be synchronously checked and set.
Also fix the Xcode version comparison.


Merge-request: KT-MR-14256
Merged-by: Pavel Punegov <Pavel.Punegov@jetbrains.com>
2024-02-09 11:07:25 +00:00
Roman Efremov 1f30d076de [CLI] Introduce compiler argument to suppress error about API version
...greater than language version.

^KT-63712
2024-02-09 11:02:26 +00:00
Sergey Bogolepov 22a6ffab6f [Swift export][KT-65672] Update SwiftTypeCheckBaseTest 2024-02-09 10:15:50 +00:00