Commit Graph

1560 Commits

Author SHA1 Message Date
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
Dmitriy Novozhilov 6dfc26f4ab Build: remove useless .as40 files
Original commit: 986ab9cb54
2020-11-28 14:25:54 +03:00
Dmitriy Novozhilov 5cf686b1a5 Switch to 202 platform
Original commit: eeb9b3214c
2020-11-28 14:25:19 +03:00
Ilya Gorbunov f9b0bd4792 Use new kotlin.io.path API in tests
Original commit: b2b2629e79
2020-11-20 09:03:25 +03:00
Ilya Gorbunov 2746242fbc Use NIO Files for creating temp files: build tools
Original commit: c9bbdf6575
2020-11-20 06:09:36 +03:00
Vyacheslav Gerasimov ac5da46004 Cleanup 193 compatibility fixes
Original commit: 3feff16a77
2020-11-11 14:28:54 +03:00
Alexey Tsvetkov 132538e017 Add IC metrics reporting
Original commit: 36387d97ad
2020-11-05 23:26:46 +03:00
nataliya.valtman 514a792e75 KT-34862 use relative path for incremental build cache
Original commit: e1a380ec95
2020-10-27 10:45:06 +03:00
Nikolay Krasko 6bf31a7ac9 as42: Apply 201 <-> AS41 diff
Original commit: 2df030f583
2020-09-29 15:32:32 +03:00
Dmitriy Dolovov 3f401214cd HMPP: Avoid NPE during Kotlin facet serialization
^KT-42029

Original commit: f0cbd6b1a5
2020-09-23 10:39:11 +03:00
Dmitriy Novozhilov c62a04d277 Move BuiltinSpecialProperties and JvmAbi to :core:compiler.common.jvm
Original commit: 64ec3fc42b
2020-09-04 11:07:41 +03:00
Georgy Bronnikov b154f74b99 JVM_IR: avoid descriptors when tracking inline properties
Preparing to use wrapped properties in InlineCodegen.

Original commit: 8e24256f95
2020-07-02 12:46:58 +03:00
Nikita Bobko c818141d15 202: Fix KotlinJpsBuildTest tests
Test failure was caused by "replace custom source root types to a special
'unknown' type and back on plugin unload/load (IDEA-235292)" in intellij.

We override `getModuleSourceRootPropertiesSerializers` in `KotlinModelSerializerService`
by inheriting from `KotlinCommonJpsModelSerializerExtension`

Original commit: 6985c5fd2a
2020-07-01 11:31:23 +03:00
Nikita Bobko 0344ff9da7 Refactoring: mark const strings with const keyword
Original commit: 4e65b2fb9e
2020-07-01 11:31:23 +03:00
Denis Zharkov 50725dcde2 Fix incremental compilation for calls to inner classes from supertypes
The problem became actual after bba1c88c8e634b707bb39522129d226add3fa90d

Original commit: 3ce980fd88
2020-07-01 06:55:52 +03:00
Dmitry Petrov e9abd4dbf7 JVM: Generate object and companion object INSTANCE fields as @NotNull
Original commit: e9231b5624
2020-06-22 16:28:00 +03:00
Roman Artemev b11a0d3fc6 [KLIB IC] Add test about incremental kotlin-js-stdlib-klib recompliation
Original commit: cc818025df
2020-06-22 11:30:40 +03:00
Dmitry Savvinov 62a9ad7218 Check for native-shared source-sets properly during facet import
Otherwise they are detected as common source-sets, thus getting
K2MetadataCompilerArguments (instead of FakeK2NativeCompilerArguments),
and the 'applyCompilerArgumentsToFacets' will fail due to check on
javaClass equality

^KT-39657 Fixed

Original commit: 5b48845dfa
2020-06-19 12:15:50 +03:00
Ilya Muradyan 68619252a8 Compare lookups without respect to their order
Original commit: 7526ff9484
2020-06-18 09:51:16 +02:00
Nikita Bobko 68fbddd3d7 202: Fix NPE in BaseKotlinJpsBuildTestCase.tearDown()
Original commit: cb8addc4cd
2020-06-15 23:22:20 +03:00
Alexander Udalov f3efd88bb9 Replace appendln with appendLine in project
Original commit: 6e67e1e78d
2020-06-11 13:01:30 +02:00
Nikita Bobko ff2c453732 202: Fix compilation
Original commit: ff7576f8e4
2020-06-10 12:39:29 +03:00
Ilya Chernikov 7accbf7e28 Extract interface from CompilerMessageLocation to ease extension
The CompilerMessageLocation is an implicit part of the binary daemon
protocol so changing it breaks compatibility with older daemons.
This change allows to extend location for non-daemon uses without
breaking the binary protocol.

Original commit: 5e33612238
2020-06-05 21:58:27 +02:00
Yunir Salimzyanov 19cf915c2d Cleanup 191 extension files (KTI-240)
Original commit: 3b9000cc0c
2020-06-01 18:43:10 +03:00
Yunir Salimzyanov 9381493cff Add annotation to prevent test invocation twice
Cause: it helps to fix double inversion of muted non-flaky tests result
(KTI-216).

Original commit: 8d51b027ed
2020-05-30 22:50:34 +03:00
Andrey Uskov 9ef5970f92 Fixed KNPE when serialized Kotlin Facet is broken
#KT-37428 Fixed

Original commit: 104eeb9ffd
2020-05-28 22:07:44 +03:00
Vyacheslav Gerasimov dd02c526ad as41: Build against AS 4.1 C10
Original commit: af2dce0549
2020-05-27 18:46:57 +03:00