Commit Graph

106135 Commits

Author SHA1 Message Date
Nikolay Lunyak 008703c1dc [FIR] Fix parameters constraints in FirDeclarationCollector<D>.collect 2023-11-15 07:56:32 +00:00
Nikolay Lunyak 44d6d10233 [FIR] Only check conflicting callables that may clash with declared ones
This change improves performance, as
checking callables via scopes in
`4e587157` turns out to be quite
slow, and it also prevents some redundant
diagnostics.
2023-11-15 07:56:32 +00:00
Nikolay Lunyak 9e57aba448 [FIR] Add a test for KT-26045
^KT-26045 Fixed

Merge-request: KT-MR-13023
Merged-by: Nikolay Lunyak <Nikolay.Lunyak@jetbrains.com>
2023-11-15 07:52:11 +00:00
Anton Lakotka 951830fcef [Gradle] Use source set name for Cinterop configurations
This will ensure that source set have isolated Cinterop configurations.
With proper extendsFrom relations.
And prevent from dependencies i.e. from linuxMain to nativeMain if they
both have the same set of underlying targets.

^KT-63338 Verification Pending
2023-11-14 22:26:27 +00:00
Anton Lakotka 645d263474 [Gradle] Test that source set have own Cinterop configurations
It is necessary to prevent leaking dependencies in source set hierarchy
i.e. if linuxMain depends on some project with cinterops and
nativeMain also have the same set of underlying targets it is important
that nativeMain should not see any dependencies from linuxMain!

And vice versa, if linuxMain should see own + parents dependencies.

^KT-63338
2023-11-14 22:26:26 +00:00
Roman Golyshev d865a44c94 KT-61890 [AA] Add test for ContextCollector at loop variable position
This turns out to be important for conflict resolution in
postfix completion in K2 IDE (see `KotlinDeclarationNameValidator`)
2023-11-14 22:15:05 +00:00
Roman Golyshev 47a00bf97e KT-61890 [AA] Use ContextCollector in KtFirScopeProvider
^KT-61890 Fixed
2023-11-14 22:15:04 +00:00
Roman Golyshev 4f136cde31 KT-61890 [AA] Add testdata to ensure KDoc completion support in IDE
Completion in the IDE relies on correct scopes for KDoc positions.
So we add testData for `KtScopeProvider` and `ContextCollector`
to ensure that there are no regressions
2023-11-14 22:15:04 +00:00
Vladimir Sukharev 1b1df9f0db [K/N] Create test model for building/executing C-Interop tests
^KT-63287 Fixed
2023-11-14 19:35:52 +00:00
Svyatoslav Scherbina 8d20d5b16c Native: support objcExportReportNameCollisions=true binary option
This binary option makes the compiler emit a warning whenever it mangles
a name emitted by ObjCExport.

^KT-63153 Fixed
2023-11-14 19:24:43 +00:00
Yahor Berdnikau 656b61b945 [Gradle] Restore writing errors into <project_dir>/.gradle directory
This is required for compatibility with older IDEA releases where it
expects errors only in <project_dir>/.gradle/kotlin/errors directory.

It is possible to disable such behaviour via
"kotlin.project.persistent.dir.gradle.disableWrite" property.

^KT-58223 Fixed
2023-11-14 18:38:12 +00:00
Yahor Berdnikau 070de9cc85 [Gradle] Split global and project persistent caches
Now for project persistent caches plugin will use '<rootDir>/.kotlin'
directory. Global persistent cache has stayed in the
'<user.home>/.kotlin' directory.

^KT-58223 Fixed
2023-11-14 18:38:12 +00:00
Yahor Berdnikau 5413973891 [Gradle] Add integration test checking 'kotlin.user.home' is possible to change
^KT-58223 In Progress
2023-11-14 18:38:12 +00:00
Yahor Berdnikau e8a7c53dde [Gradle] Use for Gradle IT tests custom location for kotlin.user.home
Such way, we could easily clean all persistent storage produced by
test runs.

^KT-58223 In Progress
2023-11-14 18:38:12 +00:00
Yahor Berdnikau 3d94679db4 [Gradle] Migrate errors collector to new persistent storage
^KT-58223 In Progress
2023-11-14 18:38:12 +00:00
Yahor Berdnikau cf44bff164 [Gradle] Change property name to 'kotlin.user.home'
To be analogous to GRADLE_USER_HOME as they serve almost the same
purpose.

^KT-58223 In Progress
2023-11-14 18:38:12 +00:00
Yahor Berdnikau ce695de84d [Gradle] Migrate metadata caches to new persistent location
^KT-58223 In Progress
2023-11-14 18:38:12 +00:00
Yahor Berdnikau 0d57436bce [Gradle] Introduce persistent storage dir in 'user.home/.kotlin'
This storage directory should be used for:
- files that should live between builds
- files that should stay after calling 'clean' task
- some persistent caches that are usually better to keep around

In this commit, we are introducing the first cache type - for session
flag files. Such files should be unique per-project. To distinguish
between different projects, md5 hash of the project root dir absolute
path is used.

^KT-58223 In Progress
2023-11-14 18:38:12 +00:00
Anton Lakotka 73c76c5b2d [Gradle] Add KOTLIN_PERSISTENT_GRADLE_DATA_DIR with .kotlin/ as default
Don't store data in `.gradle` as it treated specially by gradle i.e.
they are exclude this dir from UP-TO-DATE checks. This can lead into
broken IDE import state which is not fixable by re-importing.

Move CInterop Commonized libraries and Metadata Transformation results
to new KOTLIN_PERSISTENT_GRADLE_DATA_DIR to avoid IDE import issues.

^KT-58223
2023-11-14 18:38:12 +00:00
Ilya Goncharov 405a502675 [Gradle, Wasm] Tests can be up-to-date, and use by default chrome headless
^KT-62633 fixed
2023-11-14 17:58:42 +00:00
Stanislav Ruban b2fb37043d [tests] Regenerate configurations for diagnostic tests 2023-11-14 17:58:21 +00:00
Stanislav Ruban c7caca8ccd [tests] Refactor code examples relevant to exploration of KT-22004 2023-11-14 17:58:20 +00:00
Stanislav Ruban d0958068c9 [tests] Add code examples from exploration of KT-22004 2023-11-14 17:58:20 +00:00
Brian Norman ed4a778aa7 [FIR2IR] Convert data class properties of type dynamic for hashCode
Properties of type dynamic within a data class cause compilation to fail
when converting FIR to IR. This is because dynamic types do not have a
proper backing class for symbol lookup. However, dynamic types can just
be considered of type Any for hashCode calculations.

^KT-63094 Fixed
2023-11-14 17:45:04 +00:00
Denis Lochmelis 4b3dfe6e6e [KT-58995] Fix UPUB bug
Add an explanation comment
2023-11-14 17:34:27 +00:00
Dmitriy Dolovov d8eee222af [KLIB] API 4 ABI: Add information about backing field annotations
^KT-62259
2023-11-14 17:20:45 +00:00
Dmitriy Dolovov 01f072bb7d [KLIB] API 4 ABI: Add tests for public members of EEC 2023-11-14 17:20:45 +00:00
Ilya Goncharov 11b7c35eab All tasks related to typescript generation made configuration avoidance compatible
^KTI-1471 fixed
2023-11-14 16:53:23 +00:00
Igor Chevdar e43b232786 [K/N] Used KlibFingerprint hash instead of slow SHA-256 2023-11-14 16:06:47 +00:00
Igor Chevdar cc69df0de6 [K/N] Optimized libraries hash computation
#KT-63081 Fixed
2023-11-14 16:06:47 +00:00
Yahor Berdnikau ea49a9a292 [Gradle] Limit max heap size for Kotlin daemon in integration tests
This change should further reduce memory pressure on running these tests
on CI agents.

Kapt4 tests require more Kotlin daemon memory than default 1g. It is
a known issue and eventually should be addressed by the compiler team.
2023-11-14 15:40:38 +00:00
Nikolay Lunyak 425d5e808b [FIR] Link some tests with issues
Just in case.

^KT-59874
2023-11-14 15:19:33 +00:00
Nikolay Lunyak 41c5934d4e [FIR] Don't forget to ignore hidden imports
^KT-59874
2023-11-14 15:19:33 +00:00
Nikolay Lunyak c656a83a02 [FIR] Don't miss non-const annotation args
This code with `b()` crashes the JVM
backend.

^KT-59822 Fixed
^KT-59874
2023-11-14 15:19:33 +00:00
Nikolay Lunyak 5a1a23afac [FIR] Don't miss annotations on inits
^KT-59874
2023-11-14 15:19:33 +00:00
Nikolay Lunyak 63f461a6cd [FIR] Don't miss annotations on for loops variables
^KT-59874
2023-11-14 15:19:32 +00:00
Nikolay Lunyak d03039b949 [FIR] Don't generate property fields when context receivers are present
^KT-59874
2023-11-14 15:19:32 +00:00
Nikolay Lunyak 4b67a504be [FIR] Only support @ExtensionFunctionType on true functional types
^KT-59874
2023-11-14 15:19:32 +00:00
Nataliya.Valtman 6210da0c98 Ignore ConcurrencyModificationExceptions at project.tasks.names
#KT-62131: Fixed
2023-11-14 14:39:11 +00:00
Artem Daugel-Dauge 4df73551c7 [Gradle] Don't depend on generated podspec in synthetic podInstall task
^KT-63331 Verification Pending
2023-11-14 14:30:43 +00:00
Mikhail Glukhikh be5a27dd6b K2: add test to confirm KT-56409 now works properly 2023-11-14 14:25:13 +00:00
Artem Daugel-Dauge 104d5e420e [Code Owners] Add Apple Ecosystem team to CODEOWNERS 2023-11-14 13:50:55 +00:00
Aleksei.Glushko f7057edce1 [K/N] Extract common part of gc runtime tests (2/2)
Restore ParallelMarkConcurrentSweepTest.cpp with new content.
2023-11-14 13:39:45 +00:00
Aleksei.Glushko 8180400a36 [K/N] Extract common part of gc runtime tests (1/1)
Move all the tests in a header file
    and make them instantiatable with different tracing GC implementations.
2023-11-14 13:39:45 +00:00
Mikhail Glukhikh cf9bd44cf7 K2: add test to confirm KT-54139 now works properly 2023-11-14 13:33:18 +00:00
Svyatoslav Scherbina bb608740cd Bump Kotlin/Native version in KGP to 2.0.0-dev-7404 2023-11-14 12:47:34 +00:00
Svyatoslav Kuzmich 1c230c8f27 [Wasm] Port WasmImport/WasmExport checker to K2 (KT-56849) 2023-11-14 12:24:10 +00:00
Dmitrii Gridin 28895a2613 [FIR] FirAnnotationArgumentsTransformer: fix scope problem with type parameters
We should wrap outer declaration to avoid FirTowerDataMode.CLASS_HEADER_ANNOTATIONS

^KT-63396 Fixed
2023-11-14 10:46:43 +00:00
Dmitrii Gridin 2ee9fcab9b [FIR] add diagnostic test for annotations inside type parameters
^KT-63396
2023-11-14 10:46:43 +00:00
Artem Kobzar bec434d534 [K/JS] Save nullability from the original type of value parameters ^KT-63013 Fixed 2023-11-14 10:40:07 +00:00