Commit Graph

1667 Commits

Author SHA1 Message Date
Dmitry Gridin f33ad62bc2 [CHERRY PICKED FROM IJ] [tests] IncrementalRenameModuleTest: fix path
IncrementalRenameModuleTest.testRenameModule: fixed

GitOrigin-RevId: e0f5c22dcc3b65c7814b6c1382d195aac7a7915c
Original commit: https://github.com/JetBrains/intellij-community/commit/79762233dcdca5d7265df93047a2243615cf5f83
2022-01-12 15:10:52 +01:00
Vladimir Krivosheev 5d0c87e402 [CHERRY PICKED FROM IJ] cleanup - don't use trove
GitOrigin-RevId: 73223d3f587588c7646be1e6d820b75c778c8d37
Original commit: https://github.com/JetBrains/intellij-community/commit/8f93ffade2d275693a1ac868ab14f633dfd600ef
2022-01-12 15:10:51 +01:00
Vladimir Krivosheev 9c0b617c7c [CHERRY PICKED FROM IJ] reduce classloading
GitOrigin-RevId: 6f8d704c8f2638624915b6eef0ed0889b4e5f0c2
Original commit: https://github.com/JetBrains/intellij-community/commit/f0ac55298015b4710ffb2dfbde5cec39235e0223
2022-01-12 15:10:51 +01:00
Yan Zhulanow f780b7b4f7 [CHERRY PICKED FROM IJ] Minor: Change checkIsAndroidStudio() method name so it better says what it does
(cherry picked from commit d1b19564a9873fbdf4818a7ee325c771d0d8db7a)

GitOrigin-RevId: ae00f60d3dfc79aed15814de4e81a93e6a07008d
Original commit: https://github.com/JetBrains/intellij-community/commit/36f66c2a44b2ea42ba796a3a31f63d4751588e99
2022-01-12 15:10:50 +01:00
Yan Zhulanow 24e195d7c1 [CHERRY PICKED FROM IJ] Fix tests with Gradle project importer
Adds explicit 'android.dir' preference to 'local.properties' of a Gradle project so Android components don't get in the way.

(cherry picked from commit 3b83f67587bb04810f5de50d6a29ab7963bd24ec)

GitOrigin-RevId: 6d7063bb8c5253c828f9df22efdfdaf2910b99c3
Original commit: https://github.com/JetBrains/intellij-community/commit/1e326c986175c2bb14ad6711caafb96ff85def4a
2022-01-12 15:10:50 +01:00
Yan Zhulanow 24ab459e3a [CHERRY PICKED FROM IJ] Disable JPS tests when run against Android Studio
(cherry picked from commit 23113fd13f02cac9163a54b0183572e826510366)

GitOrigin-RevId: 259f5ca81c749b71cc81d6c690bb73fe3af0e538
Original commit: https://github.com/JetBrains/intellij-community/commit/aa709349738e2814bf725b294e6c7dca68efd3e7
2022-01-12 15:10:50 +01:00
Dmitry Gridin ef27b134a2 [CHERRY PICKED FROM IJ] [tests] KotlinJpsBuildTest*: cleanup code
GitOrigin-RevId: 626313b2a47cab2f63a721d3de33d97af42b01fb
Original commit: https://github.com/JetBrains/intellij-community/commit/50dbdf9d30afa914978abb97f45b82cf226a5d8d
2022-01-12 15:10:49 +01:00
Dmitry Gridin 8debe8667e [CHERRY PICKED FROM IJ] CacheVersionManager: cleanup code
GitOrigin-RevId: bf6d303235937d7a66a925c2a788919168513b99
Original commit: https://github.com/JetBrains/intellij-community/commit/a170915a47b7e0a72488aa222530ff7ccf32f053
2022-01-12 15:10:49 +01:00
Dmitry Gridin 0ee7187e3e [CHERRY PICKED FROM IJ] KotlinBuilder: cleanup code
GitOrigin-RevId: 156806aed03531438fcafdd8fba325a7101f01d9
Original commit: https://github.com/JetBrains/intellij-community/commit/021d5bc301c91e386ea363389f5d95c25d361531
2022-01-12 15:10:48 +01:00
Dmitry Gridin 1f62859019 [CHERRY PICKED FROM IJ] [tests] fix KotlinModuleXmlGeneratorTest
GitOrigin-RevId: 7a00a761e6294793bff13cc0ea9b84d571fb714a
Original commit: https://github.com/JetBrains/intellij-community/commit/ab3886e11b285975f4e0eb4ea9f67e907de71e3c
2022-01-12 15:10:48 +01:00
Dmitry Gridin bb0b785c59 [CHERRY PICKED FROM IJ] KotlinJpsBuildTest: fix tests
GitOrigin-RevId: 51f9595dfb5f0ba280bab935e5945384dfe7e487
Original commit: https://github.com/JetBrains/intellij-community/commit/18bf77b87f8b89f6a6827176ce61215f2a69f0c4
2022-01-12 15:10:47 +01:00
Dmitry Gridin ba9bcee24d [CHERRY PICKED FROM IJ] pull up addJdk from AbstractKotlinJpsBuildTestCase to BaseKotlinJpsBuildTestCase to fix tests
GitOrigin-RevId: fd76500448ab232b34b5aef3cfa51b75be91803b
Original commit: https://github.com/JetBrains/intellij-community/commit/ad2f48e57191253bcde4b100a4536dbbed990ff1
2022-01-12 15:10:47 +01:00
Yan Zhulanow 58bc5b80a1 [CHERRY PICKED FROM IJ] Use RunAll in all Kotlin tearDown() implementations
GitOrigin-RevId: f9409eb1f5640905f46a0241b5fec9338483f331
Original commit: https://github.com/JetBrains/intellij-community/commit/58982727a601c749187a5946015c8b51b7e7789b
2022-01-12 15:10:46 +01:00
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
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
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
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