Commit Graph

103756 Commits

Author SHA1 Message Date
Dmitriy Dolovov ec9370c30b [KLIB][tests] Reorganize "klib dump-ir" tests
- Keep the test data under "native/native.tests/testData/klib/" dir
- Rename tests from "klib ir" to "klib dump-ir"
2023-08-16 19:11:35 +00:00
Dmitriy Dolovov a8034b6baa [CODEOWNERS] Make K/N Team to be responsible for "compiler/testData/klib/" dir 2023-08-16 19:11:35 +00:00
Dmitriy Dolovov 60b950b9bd [KLIB][tests] Keep "klib evolution" test data under "testData/klib/" dir 2023-08-16 19:11:34 +00:00
Dmitriy Dolovov d7e9fcea04 [PL][JS] Add missing PL test to the IDEA run configuration 2023-08-16 19:11:34 +00:00
Dmitriy Dolovov 5c3e63e19a [PL][tests] Keep PL test data under "testData/klib/" dir 2023-08-16 19:11:34 +00:00
Dmitriy Novozhilov 9e3afe7a1f [Build] Add utility function to opt-in to ObsoleteDescriptorBasedAPI 2023-08-16 17:47:29 +00:00
Dmitriy Novozhilov 697d0d5638 [IR] Mark IrSymbol.owner with OptIn annotation
^KT-60923 Fixed
2023-08-16 17:47:29 +00:00
Simon Ogorodnik 20da554443 [FP/MT Test] Document and extract CPU isolation logic to a separate file 2023-08-16 16:46:23 +00:00
Simon Ogorodnik 3636f9dd71 [FP/MT Test] Fix CPU affinity for thread isolation on hardware agents
In some builds on hardware agents, we use a linux container without `ps`
command; it causes isolation logic to execute partially.
This change removes the usage of `ps` and replaces it with a direct
listing of the procfs.
2023-08-16 16:46:23 +00:00
Brian Norman dfa7c8c51d [FIR] Make sure not to leak alternate flows outside finally blocks
Instead of trying to use node and edge information to determine when an
alternate flow no longer needs to be propagated, ask the CFG builder if
the node is still within the `finally` blocks of the paths being
propagated. This makes the checks simpler and more sound, avoiding leaks
of alternate flows beyond their needed scope.

KT-56888
2023-08-16 15:08:52 +00:00
Ilya Gorbunov c98377af7b Add js compiler disambiguation attribute to fix errors on project import
There were remaining configurations in legacy JS projects with amiguous attributes requesting kotlin-stdlib. They are not used in build, but resolved on import.
2023-08-16 14:25:54 +00:00
Alexander Shabalin e380610ab0 [K/N] Add a note to identityHashCode() 2023-08-16 14:23:07 +00:00
Hung Nguyen 894ba9ab80 [IC] Relocatable IC caches for projects with custom buildDir
IC caches often contain file paths. To make them relocatable, we need
to convert these file paths into relative paths, relative to a base
directory.
  - If the file paths are source files, we can use the root project
    directory as base.
  - If the file paths are class files, we should use the classes
    directory as base (before this commit, we used the root project
    directory in both cases, that's why we hit KT-58547).

The key changes in this commit include:
  - RelocatableFileToPathConverter: converts paths to relative paths
  - IncrementalCompilationContext: contains 2 different path converters,
    one for source files and one for class files
  - SourceToOutputFilesMap: maps source files to class files using the
    above path converters
  - IncrementalCompilerRunner: creates the path converters based on file
    locations

Test: RelocatableFileToPathConverterTest unit test
      SourceToOutputFilesMapTest unit test
      BuildCacheRelocationIT.testCustomBuildDirectory integration test
^KT-58547 Fixed
2023-08-16 13:40:19 +00:00
Svyatoslav Kuzmich 432c9fe592 [Wasm] Fix SuspendFunctionKind.DELEGATING bug (KT-60700)
When detecting function delegation at the last statement position we
need to make sure that delegating call has unit return type, otherwise
we would try to return non-Unit value from a parent function returning
 Unit

^KT-60700 Fixed
2023-08-16 12:47:22 +00:00
Bogdan Mukvich ecd06ac47b [Build] Fix usage of --scan parameter with test retry
Gradle fails to configure test retry when `--scan` parameter is present
It happens due to some race in plugin application
and creation of a test extension

^KTI-1339
2023-08-16 12:36:28 +00:00
Bogdan Mukvich e89334e5ba [Build] Update gradle enterprise 2023-08-16 12:36:28 +00:00
Nataliya.Valtman 6263b67643 Remove gson from compiler fat jar
KT-56438: Fixed
2023-08-16 11:34:49 +00:00
Dmitrii Gridin e05cb49671 [SLC] invalidate local class members cache on any file changes
We should track the containing file modifications to avoid PIEAE by
changes in members

^KTIJ-26661 Fixed
2023-08-16 10:22:13 +00:00
Alexander.Likhachev 765a8bdd7c [Gradle] Fix JsIrConfigurationCacheIT was disabled by a mistake
It was marked as an abstract class and thus wasn't executed
2023-08-16 09:48:48 +00:00
mvicsokolova 9ff0e0b046 [atomicfu-K/N] Tests for K/N atomicfu-compiler-plugin
* `nativeTest` task now allows to provide compiler plugins that may be enabled during test compilation
* test sets for JVM and K/N backends are equal

KT-60800 describes all the issues with native tests that were solved in this commit.

Co-authored-by: Dmitriy Dolovov <Dmitriy.Dolovov@jetbrains.com>

Merge-request: KT-MR-11401
Merged-by: Maria Sokolova <maria.sokolova@jetbrains.com>
2023-08-16 09:41:29 +00:00
Vladimir Sukharev 8f03eb9314 [K/N] Fix stdlib import in DiagnosticsNativeTests
Merge-request: KT-MR-11635
Merged-by: Vladimir Sukharev <Vladimir.Sukharev@jetbrains.com>
2023-08-16 08:27:16 +00:00
Nikolay Lunyak 97bbf69bdc [FIR] Don't ignore annotations on when subjects
^KT-53565 Fixed
2023-08-16 08:09:14 +00:00
Artem Kobzar 05ed134fbb [K/Wasm] Introduce stepping tests for Wasm 2023-08-15 17:03:11 +00:00
Nikita Bobko 577d0db3f1 [FE] Skip delegation descriptors during default params matching
^KT-61163 Fixed
Review: https://jetbrains.team/p/kt/reviews/11599/timeline

They can be safely skiped because we check overridden descriptors
anyway.

IMO, it's a bug that delegated descriptors are copied with default
params. But it's much harder problem, and my IMO can easily be wrong for
some weird reason.
2023-08-15 16:34:23 +00:00
Dmitrii Krasnov 8a576438ce Turned off KotlinNativeLinkIT.defaultValueForPartialLinkage on Windows, caches are not supported there yet
KT-60839
2023-08-15 16:10:22 +00:00
Alexander Shabalin 431cc9e672 [K/N] Add division to kotlin::saturating
Additionally refactor unit tests.
2023-08-15 13:33:37 +00:00
Dmitry Savvinov c359f684cd [Gradle] Don't print stacktraces in IDEA sync
IDEA sync is always launched with equivalent of `--stacktrace`, so
checking startParameter.showStacktrace is unreliable.

This commit instead mutes printing of stacktraces in sync unless the
internal property is specified. If users want stacktraces, they're
expected to launch Gradle task with `--stacktrace`.

In the extremely rare cases where the stacktrace is needed
*specifically* during IDE sync,
`kotlin.internal.diagnostics.showStacktrace=true` can be used

^KT-61172
2023-08-15 10:11:45 +00:00
Pavel Punegov f727934f6b [K/N] Test framework implementation refactoring
* Extract argument processor and settings out of TestRunner.
This makes it possible to add external runners to the framework.
* Add methods and docs to TestCase and TestSuite classes that
describe Kotlin test methods.
2023-08-15 10:05:09 +00:00
Ilya Goncharov a5893d4bee [Gradle, JS] Build service npm resolution manager does not contain packageJsonHandlers
^KT-60469 fixed
2023-08-15 09:10:10 +00:00
Kirill Rakhman 80200fc3c5 [FIR] Replace type variable types with error types in lambda completion
#KT-54568 Fixed
#KT-59882
2023-08-15 08:04:19 +00:00
Roman Golyshev 48433bf9fd [Analysis API] Unwrap anonymous function expressions in reference shortener
Anonymous functions are additionally wrapped into an expression

^KTIJ-26629 Fixed
^KTIJ-26597 Fixed
2023-08-14 18:03:12 +00:00
Alexander Udalov bddc18e463 K2: do not run compilation if Java module graph setup failed
#KT-61156 Fixed
2023-08-14 16:32:15 +00:00
Alexander Udalov 4e706ba93e K2: add JavaModulesIntegrationTest
#KT-60797
2023-08-14 16:32:15 +00:00
Alexander Udalov b1fb5bdde1 Minor, rename JavaModulesIntegrationTest and move to separate package 2023-08-14 16:32:15 +00:00
Alexey Merkulov 3d92d0d05f [LL API] Fix value capturing for multiple receivers
There were problem when 'this' bound symbol was used twice for a call

KT-61144
2023-08-14 15:22:43 +00:00
Alexey Merkulov 35eca56d32 [fir2ir] Fix field-receiver extracting for evaluator
KT-61144
2023-08-14 15:22:43 +00:00
Alexey Merkulov c520aeb5aa [fir2ir] Just refactoring before classes receiver fix for evaluator
KT-61144
2023-08-14 15:22:43 +00:00
Dmitriy Dolovov 7be877ce74 [IR][JVM] Drop JvmIrSerializerSession.skipExpects parameter
^KT-61136
2023-08-14 15:21:04 +00:00
Dmitriy Dolovov 6c12556c41 [IR][JVM] Drop JvmIrSerializerSession.expectDescriptorToSymbol parameter
^KT-61136
2023-08-14 15:21:04 +00:00
Dmitriy Dolovov b7211c171f [IR][JS] Drop JsIrFileSerializer.expectDescriptorToSymbol parameter
^KT-61136
2023-08-14 15:20:28 +00:00
Dmitriy Dolovov 5991364028 [IR][JS] Drop JsIrFileSerializer.skipExpects parameter
^KT-61136
2023-08-14 15:20:28 +00:00
Dmitriy Dolovov b37bb0be16 [IR][Native] Drop KonanIrFileSerializer.expectDescriptorToSymbol parameter
^KT-61136
2023-08-14 15:13:44 +00:00
Dmitriy Dolovov f3c58bcfb3 [IR][Native] Drop KonanIrFileSerializer.skipExpects parameter
^KT-61136
2023-08-14 15:13:44 +00:00
Vladimir Sukharev 5b825282a4 [IR] Render type abbreviations by default, and not render in irText tests
^KT-60248


Merge-request: KT-MR-11510
Merged-by: Vladimir Sukharev <Vladimir.Sukharev@jetbrains.com>
2023-08-14 15:08:45 +00:00
Nikolay Lunyak ef338865c7 [FIR] Ignore inaccessible members in FirImplementationMismatchChecker
^KT-61076 Fixed
2023-08-14 14:55:26 +00:00
Aleksei.Glushko 00d6ced263 [K/N] Add the license file for BoundedQueue.hpp
Merge-request: KT-MR-11619
Merged-by: Alexey Glushko <aleksei.glushko@jetbrains.com>
2023-08-14 14:47:07 +00:00
Leonid Startsev 8b821e1feb Deprecate KmProperty.hasGetter(hasSetter) in favor of KmProperty.getter(setter)
as a follow-up of flag deprecation.

#KT-59440
2023-08-14 12:36:34 +00:00
Nikolay Lunyak 389632ed53 [FIR] Don't forget about annotations when resolving qualifiers 2023-08-14 12:01:53 +00:00
Sebastian Sellmair 1c2eab39d2 [Gradle][Minor]: Update comment on 'shouldUseOldKtorAndCoroutinesExternalDependencies'
KT-60901
2023-08-14 11:28:21 +00:00
Roman Golyshev b52d3c114f KTIJ-26627 [AA] Correctly handle object receivers of property accesses
Also remove redundant code from `canBePossibleToDropReceiver`

^KTIJ-26627 Fixed
2023-08-13 22:20:19 +02:00