Commit Graph

103776 Commits

Author SHA1 Message Date
Alexey Merkulov 73b2ccff76 [Stubs] Refactoring: reduce member visibility in KotlinStubOrigin 2023-08-17 12:35:19 +00:00
Alexey Merkulov 60d5de56cb [Stubs] Fix writing/reading multi file facades
The fixed error leaded to the invalid resolve of methods during
evaluation, e.g. kotlinx.coroutines#runBlocking should be called from
facade BuildersKt instead of BuildersKt__BuildersKt
2023-08-17 12:35:19 +00:00
Dmitrii Gridin a6b3896552 [LL FIR] LLFirTargetResolver: cleanup
Drop redundant extension

^KT-60799
2023-08-17 12:23:23 +00:00
Pavel Kirpichenkov c0c234e1d2 Minor: rename files to source files in configurators for standalone mode
KT-59793
2023-08-17 12:03:10 +00:00
Pavel Kirpichenkov 14eef4c7fe Minor: move lost comment 2023-08-17 12:03:09 +00:00
Pavel Kirpichenkov 6de54ef762 Minor: workaround false positive IDE error KTIJ-21172 2023-08-17 12:03:09 +00:00
Pavel Kirpichenkov ef6375f627 [LL] Use package provider to check for existing package
KT-59793
2023-08-17 12:03:08 +00:00
Dmitrii Gridin 7884b5fecf [LL FIR] lazy resolution for file should process file annotation container
File annotation container is a part of a file,
so we should resolve it before to avoid contact violation

^KT-60799
2023-08-17 11:05:23 +00:00
Dmitrii Gridin b92303d36f [LL FIR] update test data for file lazy resolution
^KT-60799
2023-08-17 11:05:23 +00:00
Dmitrii Gridin 17d0017fbf [LL FIR] do not treat content of script initializers as non-local
^KT-61260 Fixed
2023-08-17 11:02:03 +00:00
Dmitrii Gridin 1a21affe1d [LL FIR] add test for 'for' on top level in script
^KT-61260
2023-08-17 11:02:03 +00:00
Egor Kulikov ae85c7bfe3 [FIR] Add missing tests to resolve
Merge-request: KT-MR-11666
Merged-by: Egor Kulikov <Egor.Kulikov@jetbrains.com>
2023-08-17 10:54:39 +00:00
Svyatoslav Kuzmich 833c8b2cd4 [Wasm] Fix transforming setField in an inline class constructor body
IrSetField was transformed to its value to preserve side effects
This transformation produced invalid IR in cases where
IrSetField used in Unit-returning expression context.

This commit fixes it by producing Unit-typed expression

^KT-59084 Fixed
2023-08-17 10:35:00 +00:00
Kirill Rakhman 6fba6a2e3c [FIR2IR] Don't add synthetic propertiy fake overrides to parent class
This fixes a KMP issue where IrActualizer would add duplicate
fake overrides because the parent class would have both the getter
and the synthetic property in its list of declarations.
Now, the synthetic property fake overrides are still generated and
cached in the Fir2IrDeclarationStorage, but not added to the class.

#KT-60854 Fixed
2023-08-17 07:34:04 +00:00
Alexander Shabalin f459a6f6b5 [K/N] Configure runtime tests compilation parallelism 2023-08-16 22:02:02 +00:00
Roman Golyshev ef6e8ebb9b KTIJ-26672 [AA] Correctly handle ConeAmbiguityError in KtFirImportOptimizer
Add a test case for missing call diagnostic just in case

^KTIJ-26672 Fixed
2023-08-16 19:25:59 +00:00
Dmitriy Dolovov 033bb385b9 [IR] Drop expectDescriptorToSymbol completely
^KT-61136
2023-08-16 19:17:17 +00:00
Dmitriy Dolovov 9eb5b41ed8 [IR] Drop skipExpects & expectDescriptorToSymbol in IrFileSerializer
^KT-61136
2023-08-16 19:17:17 +00:00
Dmitriy Dolovov d691ab61d7 [KLIB] Keep "API for KLIB ABI" test data under "compiler/testData/klib/" dir
The test data is used both in ":kotlin-util-klib-abi" and
":native:native.tests" modules. It's better to keep it together with
the test data for other KLIB tests which are also used in more than one
module, i.e. in "compiler/testData/klib/" dir.
2023-08-16 19:11:35 +00:00
Dmitriy Dolovov cb92990ed6 [KLIB][tests] Reorganize "klib dump-metadata" tests
- Keep the test data under "native/native.tests/testData/klib/" dir
- Rename tests from "klib contents" to "klib dump-metadata"
2023-08-16 19:11:35 +00:00
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