Commit Graph

1782 Commits

Author SHA1 Message Date
Nikita Bobko 7bbec26b2d [CHERRY PICKED FROM IJ] Fix compilation with intellij
GitOrigin-RevId: 2fa9aa992b9d4673a641a7e1d06402c78ca29400
Original commit: https://github.com/JetBrains/intellij-community/commit/0f44ee9b644fa98801aec31468edc919c1abbb9f
2022-01-12 15:10:46 +01:00
Yan Zhulanow 4ef18fe036 [CHERRY PICKED FROM IJ] Remove almost all dependencies to dist/ artifacts
'kotlin-coroutines-experimental-compat' is to migrate.

GitOrigin-RevId: 94dd58c1b38e763403b1f4252853b52d3a9d2f98
Original commit: https://github.com/JetBrains/intellij-community/commit/5b3fa35e82fe3e686328ae62d83de99e7be46dc6
2022-01-12 15:10:46 +01:00
Vladimir Dolzhenko 3acd977a36 [CHERRY PICKED FROM IJ] Disable tests those directly use compiler test data
GitOrigin-RevId: 3714ee17fbe02ee8a2809709eeb481ddfa07e086
Original commit: https://github.com/JetBrains/intellij-community/commit/a52130d32ca8dc364912e390dd2747ae1df0aa66
2022-01-12 15:10:45 +01:00
Nikita Bobko ae9d039006 [CHERRY PICKED FROM IJ] Fix compilation
GitOrigin-RevId: e64c89f5224dab28a4782ba42e0d98d102d69855
Original commit: https://github.com/JetBrains/intellij-community/commit/9063fad8cf7f6a1c8f5228288a298fa84cee3e84
2022-01-12 15:10:45 +01:00
Nikita Bobko 7d938590f9 [CHERRY PICKED FROM IJ] No more need for KotlinIdeForTestCompileRuntime use ForTestCompileRuntime instead
`KotlinIdeForTestCompileRuntime` was temp class. We don't need it
anymore because `tests-common` migrated to `kotlin-ide` repo and
`ForTestCompileRuntime` now is under our control

GitOrigin-RevId: f871531fec3aa09ad911d0dc6b9273ab32dbbf23
Original commit: https://github.com/JetBrains/intellij-community/commit/67838fa145c21747d8aa89b728ceb623e27e9676
2022-01-12 15:10:44 +01:00
Nikita Bobko e24deb8b8a [CHERRY PICKED FROM IJ] Use KotlinIdeForTestCompileRuntime instead of ForTestCompileRuntime
GitOrigin-RevId: adc692b40320957c94fd3f619cb764e4ca108419
Original commit: https://github.com/JetBrains/intellij-community/commit/f4114cf684219e95f3e33341c2a2736a94098ed6
2022-01-12 15:10:44 +01:00
Yan Zhulanow 19458f6eb3 [CHERRY PICKED FROM IJ] Remove outdated bunch files
GitOrigin-RevId: e57db32af350993e04232ec7e359ec35a4a5d04c
Original commit: https://github.com/JetBrains/intellij-community/commit/774d4e17ae5abab198730ba9bcee0d554a09c0a4
2022-01-12 15:10:43 +01:00
Yan Zhulanow f2825d56f4 [CHERRY PICKED FROM IJ] Fix compatibility issues with 2020.2
GitOrigin-RevId: a6c350b66e593dbbc9b0d8baa4728b28b65db5c6
Original commit: https://github.com/JetBrains/intellij-community/commit/084a0c5d16fce153c5bd73a8d9761ce47e2e182e
2022-01-12 15:10:43 +01:00
Nikita Bobko 3033cf0a03 [CHERRY PICKED FROM IJ] kotlin-ide migration: Normalization commit
This commit is consequence of not accurate migration to kotlin-ide repo.
These changes appeared as a result of split of big chunk of first
commits in kotlin-ide repo. I don't know where from changes in this
commit come from.

It could be changes of "bunch switch" commit. Or changes of other
accidentally squashed commits

GitOrigin-RevId: 6d1e18c36e02a4ad228fe7ddc5bd056e98e1be36
Original commit: https://github.com/JetBrains/intellij-community/commit/c490f5864de6ef36964aa4ee34cdf7b3f35db384
2022-01-12 15:10:43 +01:00
Yan Zhulanow 3a21275306 [CHERRY PICKED FROM IJ] Remove as36 bunch
GitOrigin-RevId: 65d06150b5f4cd4d94a28ab8066e4441a8145c02
Original commit: https://github.com/JetBrains/intellij-community/commit/6f91376c537c1790b652a039f43911d75c1ce41f
2022-01-12 15:10:42 +01:00
Nikita Bobko c06fc28930 Remove as42 bunch from JPS plugin 2022-01-12 15:10:42 +01:00
Nikita Bobko d9a752f823 Remove as41 bunch 2022-01-12 15:10:41 +01:00
Yan Zhulanow 17e336ea44 [CHERRY PICKED FROM IJ] Move the withIC() function to the test itself
GitOrigin-RevId: 196571333c115c1f24eebc048dbfcca5c2189dfa
Original commit: https://github.com/JetBrains/intellij-community/commit/1a521c2ee63b3e777b1f955b2f4cb91c28a158be
2022-01-12 15:10:41 +01:00
Dmitry Gridin 46cad3efe0 [CHERRY PICKED FROM IJ] [jps] convert KotlinBuilderService to Kotlin
GitOrigin-RevId: e0bf79e6e00f5c6826c1338bcf99e50e536c9f52
Original commit: https://github.com/JetBrains/intellij-community/commit/948a7546bf9eafadab9a46f45189101e9f960b9b
2022-01-12 15:10:40 +01:00
Dmitry Gridin af17b2d412 [CHERRY PICKED FROM IJ] Rename .java to .kt
GitOrigin-RevId: c8b1b3c8d3a58b6858041235d6bb7bfa541e3a6c
Original commit: https://github.com/JetBrains/intellij-community/commit/23fbf46777007e8515591a5d65516d26e9812239
2022-01-12 15:10:40 +01:00
Dmitry Gridin f66b2b2899 [CHERRY PICKED FROM IJ] [jps] convert SettingConstants to Kotlin
GitOrigin-RevId: 664d09dd6abbf39624013cd1009f662efe7f4c0e
Original commit: https://github.com/JetBrains/intellij-community/commit/42811eb72492032ed25dd52cd7aa25511b4bdf90
2022-01-12 15:10:40 +01:00
Dmitry Gridin 2f67e58d64 [CHERRY PICKED FROM IJ] Rename .java to .kt
GitOrigin-RevId: 2d4e1a1b6e31f591b2ef420fe248605da4cdfd5a
Original commit: https://github.com/JetBrains/intellij-community/commit/b328bd7b76f3d73769274fadecf0e58bbe778613
2022-01-12 15:10:39 +01:00
Dmitry Gridin 5141524603 [CHERRY PICKED FROM IJ] [jps] convert KotlinCommonJpsModelSerializerExtension to Kotlin
GitOrigin-RevId: 437f6d66690434a9853d544015d93b17448f8f7c
Original commit: https://github.com/JetBrains/intellij-community/commit/2b8032aafcf561c7d834bb857eb5b3d32eff8317
2022-01-12 15:10:39 +01:00
Dmitry Gridin f62b39f0e4 [CHERRY PICKED FROM IJ] Rename .java to .kt
GitOrigin-RevId: e7d264797023a87cbbea90746bcf2959220bf046
Original commit: https://github.com/JetBrains/intellij-community/commit/f8c480074ada550f0cf4c36373218eee9fb2bfff
2022-01-12 15:10:38 +01:00
Dmitry Gridin f74f613bc1 [CHERRY PICKED FROM IJ] [jps] convert CompilerRunnerConstants to Kotlin
GitOrigin-RevId: 72575637ea72a14f25bdf9b25ae44255a9c40018
Original commit: https://github.com/JetBrains/intellij-community/commit/8ac14f4734d1c6d60f5b3874bacf54224abcf757
2022-01-12 15:10:38 +01:00
Dmitry Gridin f801bce8a9 [CHERRY PICKED FROM IJ] Rename .java to .kt
GitOrigin-RevId: 801635ed9cd9824365ee2b7969c6f822c7e37869
Original commit: https://github.com/JetBrains/intellij-community/commit/5f0b44bd74a8cc346f1536e310d84e3d70d2e73a
2022-01-12 15:10:37 +01:00
Nikita Bobko 5d91e54f41 Merge Kotlin JPS plugin
Kotlin JPS plugin existed in Kotlin repo before but was migrated to
intellij-community together with entire Kotlin plugin.
Now I return Kotlin JPS plugin back because it turned out that it's
easier to develop JPS in KT release cycle. Also I need to
unbundle Kotlin JPS plugin in scope of KTIJ-11633
2022-01-12 15:10:21 +01:00
Nikita Bobko db7472a376 Rename: jps-plugin -> jps/jps-plugin 2022-01-12 15:09:45 +01:00
Alexander Udalov 46196dc1a3 Restore writing bytecode version to metadata for LV < 1.5
#KT-45323 Fixed

(cherry picked from commit 9970851684)

Original commit: d8b85debe6afe3af52a234717934aad5289d2b71
2021-03-08 11:19:12 +01:00
Alexander Likhachev d7d64b4cef Update tests after compiler properties rework
#KT-43605 Fixed

(cherry picked from commit 70d434e992)

Original commit: bb558c528239070d82f439c8c797ff38dc655a8d
2021-03-04 19:52:49 +03:00
Alexander Likhachev 1e4ac7714a [Gradle] Read system properties at configuration time using Gradle providers
The change is a step to fully support Gradle configuration cache.
Relates to #KT-43605
Relates to #KT-44611

(cherry picked from commit 3537c699b5)

Original commit: de62c4cde79d606fb3b3a9f63f12f2c387066890
2021-03-04 19:52:44 +03:00
Alexander Udalov 5c6e8fa05d Remove JvmBytecodeBinaryVersion from the compiler code
Move it to build-common where it's still used in incremental compilation
caches, and simplify a bit. In the future, it'll make sense to remove it
completely and to avoid writing it to caches. In this commit, I don't do
that to prevent the IC cache version to be updated, causing rebuilds for
all JPS projects.

 #KT-41758

(cherry picked from commit f63ffc51ae)

Original commit: 15b3f54e666c91aa19255d4887d8916a711b79c4
2021-02-23 14:16:22 +01:00
Aleksei.Cherepanov 8b38a752d8 JPS: Fix JvmMultifileClass processing for IR backend
#KT-44644 Fixed

(cherry picked from commit aa683d3b2a)

Original commit: ef3c73554fc64d9837019ed9cf9e512bbd2b20f3
2021-02-19 23:59:11 +03:00
Alexander Udalov 8a0eda2ca9 Switch default JVM target to 1.8
#KT-29405 Fixed

(cherry picked from commit d022bb0248)

Original commit: bd4d9491ba28eb87e0c2f347823d419eec100ca9
2021-02-01 11:57:02 +01:00
Dmitriy Novozhilov dcf740bc26 [Test] Fix various tests according to switching to kotlin 1.5
Original commit: 4f8b12c96f
2021-01-28 13:19:30 +03:00
Alexander Udalov 382724d5e9 Update and regenerate incremental compilation tests for 1.5
Set TargetBackend.JVM_IR for these tests by default; remove the
generated IR-based test and add a new old-backend-based test. This fixes
the issue where some (3) of these tests were not properly ignored
because of incorrect target backend used in the test generator.

Also update test data for some tests which use local functions, which
are not generated to separate anonymous classes in JVM IR.

Original commit: 1deb317e0d
2021-01-28 13:19:27 +03:00
Roman Artemev 442f384321 [IC KLIB] Replace JS IR build log with KLIB build log for klib compialtion
- fix test data

Original commit: 350ff8033d
2021-01-26 19:23:25 +03:00
Roman Artemev fccfdabfc4 [IC TEST] Fix IC multi module tests for gradle
Original commit: b4ed7110dd
2021-01-26 19:23:24 +03:00
Roman Artemev d6afccfef0 [KLIB IC] Fix klib IC test data
Since neither inline function nor super classes affect klib there is no
need for extra passes so compiler doesn't report any dirty files.
Do not check that.

Original commit: daf1da1c70
2021-01-26 19:23:23 +03:00
Roman Artemev bf3414c491 [IC] Add in-module tests for incremental compilation
Two tests to check recompilation when parameter with default value was
added or removed without changing use-site.

Original commit: 96ba3b873e
2021-01-26 19:23:23 +03:00
Dmitriy Novozhilov 4652312c5e [IDE] Propagate KotlinFacetSettings version and completely drop isReleaseCoroutines flag
Also this commit removes number of tests related to support
  experimental coroutines

Original commit: af94bcebea
2021-01-12 16:47:55 +03:00
Dmitriy Novozhilov 377b78d9e6 [CLI] Drop CommonCompilerArguments.coroutinesState
Original commit: e991c9d476
2021-01-12 16:47:54 +03:00
Dmitriy Novozhilov 14d3667a8e [FE] Drop coroutinesState from build configurations plugins
Original commit: df3b12e13b
2021-01-12 16:47:51 +03:00
Dmitriy Novozhilov 19c559ff2f [IDE] Drop coroutines KotlinFacetSettings.coroutineSupport
Original commit: a8b65bc673
2021-01-12 16:47:48 +03:00
Alexander Udalov d885679e61 Regenerate tests and fir-tree
Original commit: ed9a0e514d
2021-01-03 14:53:41 +01:00
Dmitriy Novozhilov 8bce3f41fb [Test] Extract MockLibraryUtil to :compiler:tests-compiler-utils
Also provide MockLibraryUtilExt with bridges to MockLibraryUtil
  with JUnit4Assertions

Original commit: cb7b1652e7
2020-12-24 14:58:01 +03:00
Dmitriy Novozhilov deee82073b [TEST] Regenerate tests after previous commit
Original commit: bc7e18fb8a
2020-12-16 19:52:28 +03:00
Dmitriy Novozhilov 5c74168fa4 [TEST] Mute tests in IC JS Klib tests using exclude pattern instead of .mute file
Original commit: f8ad096abb
2020-12-16 19:52:27 +03:00
Dmitriy Novozhilov b39d89fcd5 [TEST] Introduce test-infrastructure-utils module and extract common test utilities here
Original commit: c8f3a4802e
2020-12-16 19:52:22 +03:00
Andrey Uskov 780696565d Add tests for incremental compilation of sealed interfaces
Original commit: 2e607335db
2020-12-13 20:17:18 +03:00
Andrey Uskov c1a9eb9d21 IC of sealed classes
Supported case then children of sealed classes could be declared
anywhere in a module. If list of classes implementing sealing class
changes the sealed class and all its inheritors should be recompiled
(now sealed class should be compiled together with children in order
to calculate all possible inheritors at compile time) and and
invalidated (as they could have when operators).

Original commit: 36f99156fd
2020-12-13 20:17:16 +03:00
Dmitriy Novozhilov f087ba747a [IC] Add ability to pass additional compiler args to IC tests
Additional arguments should be declared in `args.txt` file in test
  directory in common CLI arguments format

Original commit: 3246e6b9ac
2020-12-09 22:54:36 +03:00
Nikolay Krasko 0b5725e656 Revert "Keep application environment alive between JPS tests"
This reverts commit 1f549f32

The revert fixes the flaky behaviour on Windows in jps-plugin tests.

java.lang.RuntimeException: java.nio.file.FileSystemException:
tempdir_path\jps-build\jslib-example.jar:
The process cannot access the file because it is being used by another process.

Can be reproduced when running KotlinJpsBuildTest after IncrementalJsJpsTestGenerated.

1. IncrementalJsJpsTestGenerated sets KOTLIN_COMPILER_ENVIRONMENT_KEEPALIVE_PROPERTY
2. KOTLIN_COMPILER_ENVIRONMENT_KEEPALIVE_PROPERTY disables environment clean-up.
3. No disposeApplicationEnvironment() call also means no ZipHandler.clearFileAccessorCache()
4. There's jslib-example.jar opening in JsConfig.checkLibFilesAndReportErrors()
5. File handler is not closed and tests fails in tearDown()

Affected tests:
KotlinJpsBuildTest.testKotlinJavaScriptProjectWithLibraryCustomOutputDir
KotlinJpsBuildTest.testKotlinJavaScriptProjectWithLibraryAndErrors
KotlinJpsBuildTest.testKotlinJavaScriptProjectWithLibrary
KotlinJpsBuildTest.testKotlinJavaScriptProjectWithLibraryNoCopy
KotlinJpsBuildTest.testKotlinJavaScriptProjectWithTwoModulesAndWithLibrary
KotlinJpsBuildTestIncremental.testKotlinJavaScriptProjectWithLibraryCustomOutputDir
KotlinJpsBuildTestIncremental.testKotlinJavaScriptProjectWithLibraryAndErrors
KotlinJpsBuildTestIncremental.testKotlinJavaScriptProjectWithLibrary
KotlinJpsBuildTestIncremental.testKotlinJavaScriptProjectWithLibraryNoCopy
KotlinJpsBuildTestIncremental.testKotlinJavaScriptProjectWithTwoModulesAndWithLibrary

Original commit: 2bf22caeb7
2020-12-04 14:09:36 +03:00
Nikolay Krasko b7607688fa Minor: use unique temp directories in jps-build tests
Original commit: 2d8bdcbc9b
2020-12-04 14:09:36 +03:00
Nikolay Krasko 44c925f17a Fix Daemon compiler tests on Windows
In 202 platform tearDown tries to remove temporary directory, but this
fails on Windows, because while Daemon is active directory can't be
deleted.

Original commit: 2ffedd2731
2020-12-02 14:23:32 +03:00