1674 Commits

Author SHA1 Message Date
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
Vyacheslav Gerasimov 591730b799 Remove as32 bunch files
Original commit: 2bc11cbd58
2019-04-23 17:28:41 +03:00
Vyacheslav Gerasimov a05f1589d9 Remove 181 bunch files
Original commit: 952d2b6287
2019-04-23 17:28:41 +03:00
Alexey Tsvetkov bf6a8abc0e Rename SourceFileToPathConverter->FileToPathConverter
Original commit: 77d74a261d
2019-04-22 15:27:58 +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 321abd7180 Store relative paths in JPS caches if possible
So caches can be relocated from one machine to another

Original commit: 61fbe43a3f
2019-04-22 15:27:53 +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
Alexey Tsvetkov 67c5919029 Allow customizing source file path conversion in local IC caches
Original commit: 79337a6b96
2019-04-22 15:26:34 +03:00
Ilya Chernikov 0baf2dbfc5 Move scripting support classes to the scripting compiler impl module
Original commit: a65dafc37d
2019-04-17 22:03:58 +02:00
Mikhael Bogdanov e6fbfcb35b Support parallelization in another IDE tests
Original commit: 0d3f03a15a
2019-04-17 11:22:18 +02:00
Mikhael Bogdanov 52d7a2a3c7 Get rid of redundant UsefulTestCase
Original commit: 18f76c31ca
2019-04-17 11:22:18 +02:00
Vyacheslav Gerasimov 7c8d217ce2 as35: Upgrade to AS 3.5 C10
Original commit: 83764c113f
2019-04-09 15:06:22 +03: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
Vyacheslav Gerasimov 63f1428139 Build: Improve intellij-sdk repo up-to-date check time & layout
Up-to-date check is very heavy for intellij repo due to artifact size.
If module directory in repo is written only by one task we can assume
that task if up-to-date if target directory exists.

Original commit: fc8be48fa8
2019-03-20 21:29:13 +03: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
Andrey Uskov 7be0178830 Change class hierarchy of KotlinSourceRootType. Deadlock during concurrent classloading fixed
#KT-30137 Fixed

Original commit: 325ed8eb32
2019-03-01 13:12:16 +03:00
Yaroslav Russkih 1a65bb03f7 Use https everywhere - documentation and samples
Original commit: 9ac52fad17
2019-02-19 21:35:36 +01:00
Anton Bannykh 8cc75f360c JS: advance IC version
Original commit: 0fa87e3baa
2019-02-14 15:14:28 +03:00
Anton Bannykh add12dd77f JS: add incremental test for local declarations change
Original commit: 21cbc7b018
2019-02-14 15:14:28 +03:00
Alexey Tsvetkov 5ab885e912 Add verbose mode to build reports
#KT-12700

Verbose mode can be enabled by adding `kotlin.build.report.verbose=true`
to `gradle.properties` file.

Original commit: dbdc7a5b07
2019-02-12 22:10:11 +03:00
Alexey Tsvetkov 78b235d9a5 Print recompilation reasons in build report
Original commit: 01c23510c7
2019-02-12 22:10:11 +03:00
Alexey Tsvetkov bf9b1b028e Adjust build report verbosity
Original commit: 47bb938b94
2019-02-12 22:10:11 +03:00
Sergey Rostov 6a46dddcff Build: remove explicit dependencies to org.jetbrains.annotations
Original commit: f35185b261
2019-01-28 13:43:08 +03:00
Vyacheslav Gerasimov 8b76cb4f07 Remove as31 bunch files
Original commit: 13d87e8eae
2019-01-14 21:29:02 +03: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
Sergey Rostov 729bf6dc3d JPS: Use module name from compiler arguments (JVM)
Original commit: 74271cfecd
2018-12-26 08:43:00 +03:00
Mikhael Bogdanov 2efec13176 Use last asm api for visitor construction
Original commit: c19c979b7d
2018-12-20 12:55:09 +01:00
Alexey Tsvetkov 885f673d20 Enable JS IC by default
#KT-28842 Fixed

Original commit: 2196d81322
2018-12-17 15:46:11 +03:00
Andrey Uskov 43282fae3d Remove some bunches for build scripts.
Original commit: c85f56a0a8
2018-12-06 19:44:09 +03:00
Sergey Rostov b6571cbcf6 Move resources from /src to separate /resources directory.
Previously this files was stored in /src directory and was included in
resources mainly by SourceSet.projectDefault from sourceSets.kt:

val processResources = tasks.getByName(processResourcesTaskName) as ProcessResources
processResources.from("resources") { include("**") }
processResources.from("src") { include("META-INF/**", "**/*.properties") }

Also there are some custom rules like this:

resources.srcDir("../idea-analysis/src").apply { include("**/*.properties") }
resources.srcDirs("idea-repl/src").apply { include("META-INF/**") }

All this rules are synthesized in script
https://github.com/snrostov/kotlin-migrate-resources/blob/master/src/main/kotlin/main.kt

This commit created using that script. See README.md for more details on
 script.

Original commit: df2e4524d7
2018-11-30 15:01:01 +03: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 ea4256088a JPS: Report "Cyclically dependent modules should have same compiler" as build error rather than exception
#KT-27285 Fixed

Original commit: 3c8b15ca54
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 cfb54fa15c JPS, tests, minor: rename test files in modules for better readability
Original commit: 1301333e37
2018-11-26 09:29:38 +03:00
Sergey Rostov 87bc221012 JPS, minor: formatting
Original commit: 63c6e3e1b4
2018-11-26 09:29:38 +03:00