383 Commits

Author SHA1 Message Date
Mikhail Zarechenskiy 76674906e5 Revert "Add option to enable new inference only for IDE analysis"
This reverts commit 36580d46da.

 #KT-37378 Fixed

Original commit: c01a171d4c
2020-05-04 15:14:43 +03:00
Dmitriy Dolovov 382884f273 HMPP: Parameterize NativePlatform with KonanTarget
Original commit: 8d2e999776
2020-04-14 21:06:48 +07:00
Alexey Tsvetkov da1c48254d Add tests for lookup tracker with JS KLIB compiler
Original commit: 6acf9385bd
2020-04-10 05:35:45 +03:00
Dmitriy Dolovov be8edcdb19 Rename: KonanPlatform, KonanPlatforms -> NativePlatform, NativePlatforms
Original commit: 9bbfe9c1ac
2020-03-29 23:20:52 +07:00
Nikolay Krasko 561395d62e Enable mute test with database in BaseKotlinJpsBuildTestCase
Original commit: 26df2a5c68
2020-02-28 11:36:34 +03:00
Pavel Kirpichenkov 35d8adcc68 [JPS-TEST] Update test checking JPS build with NI in IDE
Set explicit 1.3 version to disable NI during compilation

Original commit: 64590cc56b
2020-02-18 11:19:19 +03:00
Pavel Kirpichenkov ce680b3c68 [JPS-TEST] Update deprecated language version in test
Original commit: 05b00a1302
2020-02-17 10:56:46 +03:00
Alexander Udalov 6ba4a7710f Regenerate tests
Original commit: 8a4510c21b
2020-01-02 10:31:00 +01:00
Dmitriy Novozhilov 3a4e06af13 [TEST] Regenerate tests after previous commit
Original commit: e7f8c8e155
2019-12-12 16:11:45 +03:00
Alexey Tsvetkov 81d78949c3 Fix proto comparison for fields mapped to type table
Original commit: 28e6219b0b
2019-11-08 14:14:58 +03:00
Nikolay Krasko d7f92f56ff Regenerate tests with TargetBackend.ANY remove and using runTest with this
Original commit: 4ed64b0283
2019-10-23 12:49:48 +03:00
Roman Artemev 17650d1396 [JS KLIB IC] Implement incremental cache for IR
Original commit: 3753b75609
2019-09-03 14:21:32 +03:00
Alexey Tsvetkov 7752cdf972 Make KotlinJpsBuildTestBase abstract
Otherwise TeamCity warns that it does not contain any tests

Original commit: aff66b6a29
2019-07-26 15:09:47 +03:00
Alexey Tsvetkov f224628451 Rewrite test of relocatable JPS IC caches
* Caches are compared as files now. It is a more robust approach
than comparing strings with dumped contents. E.g previous test
ignored differences in keys ordering, because dumping caches to string
was added for comparing caches after incremental and non-incremental builds,
which cannot be compared without sorting keys (see KT-32674).
* Calling setUp/tearDown twice within the same test instance was
relatively hacky and fragile. Also it complicated adding new test cases.

Original commit: afa10cc125
2019-07-25 20:30:56 +03:00
Alexey Tsvetkov d4b7a7d12a Extract EnableICFixture
Original commit: 98aad3e00c
2019-07-25 20:30:56 +03:00
Andrey Uskov 8bb347a0ee Import of middle HMPP target platforms is supported
Original commit: c0bf5a6566
2019-06-13 18:30:01 +03:00
Alexey Tsvetkov 4beeb8d657 Add test for KT-31131
Original commit: 56d5846ef1
2019-05-29 10:23:18 +02:00
Anton Bannykh e5df6447cb JS: cache metadata, grouped by package FQN
Original commit: c3170d1908
2019-05-28 23:33:17 +03:00
Dmitry Savvinov c1eb93ba14 Rename platform to targetPlatform in KotlinFacetSettings to avoid ambiguity in Java
Original commit: aeb7f8400a
2019-05-28 16:03:05 +03:00
Dmitry Savvinov 8112f3be71 [Platform API] Remove IdePlatform, use TargetPlatform instead
Original commit: 2d528c6396
2019-05-28 13:08:07 +03:00
Alexey Tsvetkov b5741d3120 Do not expose paths with placeholders in JS IC caches
#KT-31310 Fixed

Original commit: 209a5d8464
2019-05-16 04:01:26 +03:00
Mikhail Zarechenskiy 36580d46da Add option to enable new inference only for IDE analysis
#KT-30453 Fixed

Original commit: a3247b1b92
2019-05-06 14:36:05 +03:00
nikita.movshin 5e85ef26ee Update copyright. Fix 2 lines comments after rebase
Change the copyright from "JetBrains s.r.o." to
"JetBrains s.r.o. and Kotlin Project contributors"

Original commit: deb416484c
2019-04-23 20:15:03 +03:00
nikita.movshin 57c71be163 Update copyright.
Change the copyright from "JetBrains s.r.o." to
"JetBrains s.r.o. and Kotlin Project contributors"
Update only 2 lines copyright.

Original commit: 65244b4bea
2019-04-23 20:09:22 +03:00
Alexey Tsvetkov 78ec448ca3 Test JPS Kotlin caches don't change when project root is different
Original commit: f66d95545d
2019-04-22 15:27:57 +03:00
Alexey Tsvetkov 4e36f6ef9f Disable scripting plugin in JPS tests
JVM compiler loads scripting plugin by default,
which in turn performs script template discovery
in compile classpath.

Classloading and template discovery takes noticeable
amount of time in JPS tests, because of
relatively big number of short compilations.

Disabling scripting plugin in most JPS+JVM tests
speeds up JPS tests by ~8% compared to the result before all
optimizations.

Original commit: ea4fc0fb6b
2019-04-22 15:27:56 +03:00
Alexey Tsvetkov 1f549f32db Keep application environment alive between JPS tests
This speeds up JPS tests by ~16% compared to the result before all
optimizations. The speedup comes mostly from avoiding re-reading jar
files (like kotlin-stdlib.jar).

Original commit: 175dd5679c
2019-04-22 15:27:55 +03:00
Alexey Tsvetkov 5ef534b8a5 Rebuild once after each JPS test
After each test we rebuild everything,
then we compare incremental caches and output
with caches and output after rebuild.

For some reason we did rebuild and comparison
twice per test. This seems excessive.

Removing the second rebuild speeds up JPS tests by ~15%
compared to the result before all optimizations

Original commit: 80c99eceff
2019-04-22 15:27:54 +03:00
Alexey Tsvetkov 8a49c29a36 Allow customizing source file path conversion in lookup storage
Original commit: 00de7b6c44
2019-04-22 15:26:34 +03:00
Mikhael Bogdanov 52d7a2a3c7 Get rid of redundant UsefulTestCase
Original commit: 18f76c31ca
2019-04-17 11:22:18 +02:00
Alexey Tsvetkov d7b2901448 Always run codegen when IC is enabled
We may need to run code generation when no source files are specified
for incremental compilation (to update caches & metadata)

Original commit: 97d3d38374
2019-03-25 16:39:47 +03:00
Alexander Udalov cc74d63a98 Rework how built-in types are loaded in compiler for JVM
In TopDownAnalyzerFacadeForJVM, we now always use the "load built-ins
from module dependencies" behavior that was previously only enabled with
the dedicated CLI argument -Xload-builtins-from-dependencies. However,
sometimes we compile code without kotlin-stdlib in the classpath, and we
don't want everything to crash because some standard type like
kotlin.Unit hasn't been found.

To mitigate this, we add another module at the end of the dependencies
list, namely a "fallback built-ins" module. This module loads all
built-in declarations from the compiler's class loader, as was done by
default previously. This prevents the compiler from crashing if any
built-in declaration is not found, but compiling the code against
built-ins found in the compiler is still discouraged, so we report an
error if anything is resolved to a declaration from this module, via a
new checker MissingBuiltInDeclarationChecker.

Also introduce a new CLI argument -Xsuppress-missing-builtins-error
specifically to suppress this error and to allow compiling code against
compiler's own built-ins.

 #KT-19227 Fixed
 #KT-28198 Fixed

Original commit: ed86757817
2019-03-22 14:59:03 +01:00
Alexander Udalov 7d8324063f Remove KotlinTestUtils.replaceHash
Both package parts and SAM wrappers have no hashes in their names for a
long time already

Original commit: b73a927133
2019-03-05 16:28:53 +01:00
Vyacheslav Gerasimov e21fc1a98a Remove 173 bunch files
Original commit: 818910267e
2019-01-14 21:29:02 +03:00
Sergey Rostov e9aeb9459b JPS: exclude source roots from other targets
Previously `findJavaRootDescriptor` was return source root for random
module. This cause build errors for mpp (same file may appear in
multiple source roots of common and platform modules)

#KT-28988 Fixed

Original commit: 75e59fdc46
2019-01-11 12:53:11 +03:00
Sergey Rostov 269f5e57f1 JPS: Print components of CacheVersion, add tests
Original commit: 5cda676c9f
2019-01-10 08:50:39 +03:00
Sergey Rostov 5af4857473 JPS: remove cache version from test data
Original commit: b3985d2735
2019-01-10 08:50:38 +03:00
Mikhael Bogdanov d212230870 Update copyright in generated non-compiler tests
Original commit: e963c52c80
2019-01-02 13:34:03 +01:00
Mikhael Bogdanov 2efec13176 Use last asm api for visitor construction
Original commit: c19c979b7d
2018-12-20 12:55:09 +01:00
Sergey Rostov 1624559845 JPS: report about unsupported targets once
Report about unsupported targets once per target type, show presentable
chunks list and don't show more then 5 chunks.

Example: "Native is not yet supported in IDEA internal build system.
Please use Gradle to build a, b, c, d, e and 10 other  (enable 'Delegate
IDE build/run actions to Gradle' in Settings)."

#KT-26980 Fixed
#KT-28316 Fixed

Original commit: 62b0b3e4e9
2018-11-28 11:08:57 +03:00
Sergey Rostov 5e68ef4676 JPS: fix SimpleKotlinJpsBuildTest.testDaemon
Make it the same as testJpsDaemonIC

Original commit: ab2b4311fd
2018-11-28 10:46:57 +03:00
Sergey Rostov 3fe93760ee JPS: fix testJpsDaemonIC
1. Checking for COMPILE_DAEMON_CUSTOM_RUN_FILES_PATH_FOR_TESTS was moved to COMPILE_DAEMON_DEFAULT_RUN_DIR_PATH.

Looks like COMPILE_DAEMON_CUSTOM_RUN_FILES_PATH_FOR_TESTS was introduced incorrectly in 28a2d4727a.
Checking of this property was added in DaemonOptions.runFilesPathOrDefault, while DaemonOptions.runFilesPath was internally used in runFilesPathOrDefault and in many other places.
For example DaemonOptions.runFilesPath used to pass this option to daemon server.
So daemon was started with runFilesPath that ignores COMPILE_DAEMON_CUSTOM_RUN_FILES_PATH_FOR_TESTS.

2. JpsKotlinCompilerRunner._jpsCompileServiceSession was leaked between tests.

Fixed by extracting @TestOnly releaseCompileServiceSession() and calling it in tests tearDown()

3. The result of compileWithDaemon was ignored in compileWithDaemonOrFallback.

So, the fallback was never called, and the FAIL_ON_FALLBACK_PROPERTY was actually was never worked.
This was fixed. Also the message was improved to make it easier to find the original fail cause.

Original commit: 0c39358b5f
2018-11-28 10:46:57 +03:00
Sergey Rostov c075d6a911 JPS: Test for "Cyclically dependent modules should have same compiler"
KT-27285

Original commit: c06b000e8d
2018-11-28 10:46:57 +03:00
Sergey Rostov 6f683d5154 JPS, tests: Support multimodule mpp tests without steps
Original commit: ce4422e2ef
2018-11-28 10:46:58 +03:00
Sergey Rostov 37185c22d0 JPS: support KotlinResourceSourceRootType
Implementation is similar to KotlinSourceRootProvider.
This workaround is required since ResourcesTarget.computeRootDescriptors
supports only JavaResourceRoots.

#KT-27622 Fixed

Original commit: dcc47fd8ef
2018-11-26 09:29:49 +03:00
Sergey Rostov a650f09208 JPS, tests: Add docs for incremental/cacheVersionChanged tests
Original commit: 06b908d48f
2018-11-26 09:29:38 +03:00
Sergey Rostov c09054326a JPS: Add tests for mpp complementary files tracking after build error (KT-27868)
Original commit: cc9892a27d
2018-11-22 08:40:32 +03:00
Anton Bannykh a783bf14cb JS: report inline suspend functions to IC
* Also inline suspend lambda'a
* Also use correct JsName's in exported suspend inline fun's
* Also use less unused imports

Original commit: 59009430e5
2018-11-07 12:11:01 +03:00
Sergey Rostov 7801d0e106 IC: move CacheVersionManager from build_common to jps plugin, tests
Original commit: bde6d841c1
2018-10-16 13:33:24 +03:00
Sergey Rostov 085dbb537a IC: move CacheVersionManager from build_common to jps plugin
Original commit: d91f6f8c43
2018-10-16 12:29:58 +03:00