811 Commits

Author SHA1 Message Date
Alexey Tsvetkov 6f7fffbffc JPS: remove outputs for additional dirty files for current iteration
JPS does not remove output files for files marked as dirty
for current iteration. This is a problem for adding complementary files
during JPS MPP IC.
If output files are not removed, the compiler might raise an error
for duplicated actual declarations.

Original commit: 06275a201c
2020-04-18 06:05:44 +03:00
Sergey Rostov 24a2194a77 JPS: provide SourcesPreprocessor extension point
Original commit: fd9bec81cf
2020-04-13 18:02:08 +03:00
Ilya Gorbunov e1a6bef0ec Make use of contracts of time measurement functions
Original commit: fcada0a5e3
2020-04-03 19:36:36 +03:00
Alexander Udalov be41b87602 Minor, fix typo in KotlinChunk.kt
#KT-37159 Fixed

Original commit: 43d6ddd405
2020-03-13 11:06:46 +01:00
Vyacheslav Gerasimov 948885e4dc as40: Upgrade to AS 4.0 C7
Original commit: 68f1d91e1b
2019-12-25 20:19:36 +03:00
Michael Kuzmin 2b4a170517 Build: Drop IntelliJ 2018.3 and Android Studio 3.4 support
Delete *.183 and *.as34 bunch-files

Original commit: 254dc8f71c
2019-12-19 18:31:07 +03:00
Alexey Tsvetkov 28df6e463b Use Klib JS serializer protocol for IC
Original commit: d776e92111
2019-11-08 14:14:58 +03:00
Alexey Tsvetkov ba810b8098 Ensure all output roots exist after Kotlin is compiled in JPS
Original commit: 6c90279694
2019-09-30 09:03:49 +03:00
Roman Artemev 17650d1396 [JS KLIB IC] Implement incremental cache for IR
Original commit: 3753b75609
2019-09-03 14:21:32 +03:00
Vyacheslav Gerasimov bb57ff70dc as36: Add bunches for AS 3.6 C6 based on 192 platform
Original commit: 3b78ef9cb2
2019-07-25 20:50:02 +03:00
Alexey Tsvetkov 8b242465d5 Sort source to output mapping before writing to caches
#KT-32902 Fixed

Original commit: 4b9a852745
2019-07-25 20:30:56 +03:00
Alexey Tsvetkov b767adc66d Make lookup storage addAll order independent
Lookup storage output files could differ for projects
with different absolute paths.
This happened because, paths for lookups were
relativized only before writing to the underlying storage.
Storing absolute paths in a hash table could
result in different order of adding files to the lookup storage.
This commit fixes the issue by sorting lookups and files in
LookupStorage#addAll

    #KT-32674 Fixed

Original commit: a4c62d156f
2019-07-25 20:30:56 +03:00
Alexey Tsvetkov 093d14bd2f Add experimental support for bytecode instrumentation with JPS
#KT-13563 Fixed

Original commit: 38a692abcf
2019-06-07 21:06:25 +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
Vadim Brilyantov 1b322bfdeb Move daemon jar from compiler
Original commit: 01a05a5495
2019-05-17 15:51:52 +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 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
Vyacheslav Gerasimov 7c8d217ce2 as35: Upgrade to AS 3.5 C10
Original commit: 83764c113f
2019-04-09 15:06:22 +03: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
Anton Bannykh 8cc75f360c JS: advance IC version
Original commit: 0fa87e3baa
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
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 729bf6dc3d JPS: Use module name from compiler arguments (JVM)
Original commit: 74271cfecd
2018-12-26 08:43:00 +03:00
Alexey Tsvetkov 885f673d20 Enable JS IC by default
#KT-28842 Fixed

Original commit: 2196d81322
2018-12-17 15:46:11 +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 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 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 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 87bc221012 JPS, minor: formatting
Original commit: 63c6e3e1b4
2018-11-26 09:29:38 +03:00
Sergey Rostov f21aa7687d JPS: clear target local cache version file when caches are not required anymore
Makes changeIncrementalOption/incrementalOff test green

Original commit: 7cdd5257c8
2018-11-26 09:29:38 +03:00
Sergey Rostov a9ce3284a4 JPS, minor: remove unused parameter
Original commit: dfe662364d
2018-11-22 08:40:32 +03:00
Sergey Rostov 36b8b9fbdb Fix updating complementary files map in case of compilation errors
#KT-27868 Fixed

Previously given dirtyFiles was removed from complementaryFilesMap
exactly on call of clearComplementaryFilesMapping. This causes fail
of next build in case of compilation error of previous build on JPS
(since complementary files not known on second build). The right way
to do it is removing (replacing) them only after successful
build.

This was working on Gradle since Gradle rebuilds whole module (project)
in case of build error.

Original commit: f70d01f657
2018-11-22 08:40:32 +03:00
Sergey Rostov 63e3b273de Add assertion for overwriting common sources flag
Wrong flag state causes compilation errors for optional expectation
(this flag is used to pass -Xcommon-sources)

Original commit: 84d6c1df5a
2018-11-22 08:40:32 +03:00
Sergey Rostov c6379aa533 Workaround for KT-28099 Duplicated dependency to common module
Duplicated dependencies causes duplicated source roots which in turns
causes duplicated files dirty state tracking.

Original commit: 5a25d3ef58
2018-11-22 08:40:31 +03:00
Alexey Tsvetkov a1881a7251 Avoid catching exceptions from workers in GradleKotlinCompilerRunner
Exceptions were catched in `KotlinCompilerRunner.runCompiler`.
When the method from superclass is not used in
`GradleKotlinCompilerRunner`, the superclass does not make much sense
anymore, so I turned it into util object.

Original commit: a41c2d759a
2018-11-14 11:41:43 +03:00
Alexey Tsvetkov 554e2bb7ad Use Workers API for NMPP tasks
This change enables parallel execution of compile tasks in NMPP projects
within a subproject.

    #KT-28155 In Progress

Original commit: 37dfe2b608
2018-11-14 11:41:43 +03:00