Commit Graph

119 Commits

Author SHA1 Message Date
Alexander Udalov fe5104b865 Move package org.jetbrains.kotlin.incremental.js to 'js.config'
This allows to replace dependency on 'js.frontend' with 'js.config', in
'kotlin-build-common' and 'daemon-common'. Also simplify some other
dependencies.
2020-03-28 21:30:05 +01:00
Alexey Tsvetkov 317c39f27d Enable assertions in Kotlin Compile Daemon process
#KT-32992 Fixed
2019-07-29 19:40:36 +03:00
Alexey Tsvetkov 560f1483e8 Drop MaxPermSize support from compiler daemon
#KT-17045 Fixed
2019-07-29 19:38:40 +03:00
Alexey Tsvetkov f3112f752d Inherit max metaspace size of client VM for Kotlin compile daemon
#KT-32521 In Progress
    #KT-32950 Fixed
2019-07-25 16:13:47 +03:00
Anton Bannykh c3170d1908 JS: cache metadata, grouped by package FQN 2019-05-28 23:33:17 +03:00
pyos 08ea982688 Remove imports of javafx from Gradle build files 2019-05-20 17:31:28 +02:00
Vadim Brilyantov 01a05a5495 Move daemon jar from compiler 2019-05-17 15:51:52 +03:00
Vadim Brilyantov ced973b707 Introduce new Kotlin Daemon without RMI abstraction 2019-05-17 15:51:51 +03:00
Dmitry Gridin 37c856290f Fix minor compile warnings 2019-04-25 19:47:39 +07:00
nikita.movshin 65244b4bea Update copyright.
Change the copyright from "JetBrains s.r.o." to
"JetBrains s.r.o. and Kotlin Project contributors"
Update only 2 lines copyright.
2019-04-23 20:09:22 +03:00
Ivan Gavrilovic c85e21d43b Incremental KAPT - pass changed classpath entries
Pass computed list of changed classpath names to KAPT instead
of relying on the history files to be computed by stub generation.
Also, stop generating classpath history changes during the stub generation.

This commit does not compute the actual changed classpath entries,
and that will be done in the following commits.

 #KT-23880
2019-04-12 15:01:47 +03:00
Mikhail Zarechenskiy 5fa518fd55 Revert "Temporary fix for NI to compile against bootstrap compiler"
This reverts commit 791ab05e08.

 Problem was fixed in 4a1b9dcc & 1ac35420
2019-04-02 12:21:14 +03:00
Mikhail Zarechenskiy 791ab05e08 Temporary fix for NI to compile against bootstrap compiler 2019-03-26 22:51:20 +03:00
Alexey Tsvetkov 5f54f67f70 Stop using -Xbuild-file in Gradle Plugin
#KT-27640 fixed
    #KT-27778 fixed
    #KT-27638 fixed
2019-03-25 16:39:47 +03:00
Alexey Tsvetkov 28873e61d4 Remove unused IncrementalCompilationServicesFacade 2019-03-22 16:13:45 +03:00
Ivan Gavrilovic 493a2006f1 Remove unused SimpleDirtyData from incremental compilation
This is not used any more and all information about
the changed symbols and fqNames is passed alongside artifacts.
2019-03-22 16:13:45 +03:00
Ivan Gavrilovic 9f14daa682 Incremental annotation processing with KAPT
Add support for incremental annotation processors in KAPT. These
processors conform to https://docs.gradle.org/current/userguide/java_plugin.html#sec:incremental_annotation_processing
specification.

Support is provided by using javac compiler APIs and
recording the source file structure. At runtime, processors
are instrumented with custom Filer that is used to keep track of generated
files. In order to support classpath changes, stub generation task is
used to generated a list of changed FQCNs, and this is simply used by KAPT.
Both worker and non-worker mode are supported.

 #KT-23880
2019-03-20 16:43:02 +03:00
Alexey Tsvetkov f38ad0fe8a Fix inter-project IC with new MPP for JS/JVM targets
#KT-26275 Fixed
   #KT-29966 Fixed
2019-02-25 17:12:14 +03:00
Anton Bannykh 4b39e2df12 JS: (review fix) Header -> InlineData 2019-02-14 15:14:28 +03:00
Anton Bannykh 6d26bf9622 JS: don't load binary AST unless required by the inliner 2019-02-14 15:14:28 +03:00
Alexey Tsvetkov dbdc7a5b07 Add verbose mode to build reports
#KT-12700

Verbose mode can be enabled by adding `kotlin.build.report.verbose=true`
to `gradle.properties` file.
2019-02-12 22:10:11 +03:00
Alexey Tsvetkov 98ef00b957 Add build reports for diagnosing build problems in Gradle
#KT-12700 Fixed

To turn build reports, add 'kotlin.build.report.enable=true' to
gradle.properties file
(or pass it in CLI via`-Pkotlin.build.report.enable=true`).
By default build reports are created in
`rootProject/build/reports/kotlin-build`.
Build report dir can be customized via `kotlin.build.report.dir`
property.
2019-02-12 22:10:11 +03:00
Mikhael Bogdanov a122cba862 Switch Kotlin project to jvm-target 1.8
#KT-29405
2019-01-31 07:43:05 +01:00
Sergey Rostov f35185b261 Build: remove explicit dependencies to org.jetbrains.annotations 2019-01-28 13:43:08 +03:00
Alexey Tsvetkov 9176f9b254 Fix clearing IC caches on rebuild
Previously IC caches in Gradle were not cleared correctly on rebuild,
because only `clean` method was called, but `flush` and `close`
were not.
2019-01-23 23:30:28 +03:00
Vyacheslav Gerasimov f58acbeef5 Build: implement useBootstrapStdlib flag
Excludes stdlib projects from build and uses bootstrap stdlib artifacts

 #KT-29205
2019-01-21 21:09:40 +03:00
Sergey Rostov 883970fadb Add explicit dependencies to nullable annotations 2018-12-26 09:07:06 +03:00
Sergey Rostov 0c39358b5f 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 220fab0d3f.
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.
2018-11-28 10:46:57 +03:00
Alexey Tsvetkov ba5795519b Minor: move compile iteration result to daemon common
The class is used on both server and client, but it was defined in
server module.
Gradle plugin worked, because all classes are present in kotlin compiler
embeddable, but the code was red in IDE (which is correct because
Gradle plugin does not depend on daemon server module).
2018-11-14 11:41:43 +03:00
Sergey Rostov d91f6f8c43 IC: move CacheVersionManager from build_common to jps plugin 2018-10-16 12:29:58 +03:00
Ilya Gorbunov a18770fbbb Remove projectDist dependency helper usages
Use default configuration dependencies instead of projectDist ones.
2018-09-12 06:05:05 +03:00
Alexey Tsvetkov 30f3622b27 Implement inter-project JS IC with Gradle
#KT-25025 fixed
2018-08-21 04:32:31 +03:00
Alexander Udalov 4122021090 Add BinaryVersion to DeserializationContext
This will be useful to implement version-dependent deserialization,
which is needed for gradual fixes of issues in metadata

 #KT-25120 In Progress
2018-07-18 17:58:46 +02:00
Sergey Rostov 80ed963f97 jps, daemon: (minor) formatting 2018-06-08 09:46:53 +03:00
Sergey Rostov ce96c1b9a8 jps, daemon: fix javascript inline functions tracking
inline function hash should computed after compilation
2018-06-08 09:46:50 +03:00
Sergey Rostov 1cbef873ec jps: implement mpp and js daemon compiler services
#KT-24635 fixed
2018-06-08 09:46:41 +03:00
Yan Zhulanow 662b79780d Kapt: Remove kapt1 support from Gradle and incremental compilation 2018-05-24 01:01:51 +03:00
Alexey Tsvetkov 53266300d4 Implement module detection for Gradle IC with Android
#KT-22431 fixed
2018-05-17 20:55:26 +03:00
Alexey Tsvetkov e5cdc64f4f Track changes for jar files for non-Android Gradle projects 2018-05-17 20:55:26 +03:00
Alexey Tsvetkov 6a45310830 Remove global artifact history cache in Gradle
Each Kotlin task now writes build history to separate file.
A map of output directories to history files is used to get changes for
modified files.

    #KT-22623 fixed
2018-05-17 20:46:52 +03:00
Denis Zharkov 003f381fcd Replace default-type dependencies to :kotlin-stdlib with distJar
Use distJar configuration instead.
It's necessary because currently when using default-type, subproject
starts having a transitive dependency to :kotlin-stdlib-common
and that leads to exception from KT-20897 when building light classes

This change might be reverted once KT-23942 is fixed

 #KT-23942 Submitted
2018-04-26 16:11:27 +03:00
Alexey Tsvetkov 13ac64b84a Move parseFileUtils to incremental-compilation-impl 2018-04-11 19:56:15 +03:00
Alexey Tsvetkov 6f59b6da8e Use daemon if available for parsing files in JPS 2018-04-03 21:11:12 +03:00
Alexey Tsvetkov 8a82c1618c Use Plugins DSL in Kotlin Gradle scripts
When plugins DSL is used, there is no need to
manually generate typesafe accessors for extensions and
conventions (by running `./gradlew kotlinDslAccessorsSnapshot`).
2018-03-26 16:09:29 +03:00
Alexey Tsvetkov 30d0cc3a34 Ensure all output directories are cleared on IC rebuild
In some cases IC needs to perform a rebuild.
Before this change IC was not clearing output directories
besides destination dir for classes, so for example
kapt stubs were not cleared.

Stalled stubs might lead to compile errors.
For example:
1. foo/XGen.java is generated from annotated class foo/X (XGen also
references X).
2. foo/X is moved to bar/X and some other change forces IC to rebuild.
3. kapt generates bar/X stub, but foo/X stub
was not removed because stubs dir is not cleared.
4. kapt runs annotation processors, foo/XGen.java is generated from
foo/X stub, bar/XGen.java is generated from bar/X stub.
5. kotlinc rebuilds. Since destination dir is cleared properly,
only bar/X.class exists.
6. javac tries to compile foo/XGen and fails, because it
compiles against actual Kotlin classes, not stubs.

This commit fixes the issue by passing all output directories
of a task from Gradle to Kotlin IC.

   #KT-21735 fixed
2018-03-19 17:39:47 +03:00
Yan Zhulanow 34d1611ed4 Add Pill support to compiler and IDE modules 2018-03-02 03:15:17 +03:00
Ilya Chernikov 4eb557724c Convert compiler projects to the new intellij deps 2018-01-30 17:06:13 +03:00
Ilya Chernikov a4f28cd94f Make all dependencies to idea sdk intransitive 2018-01-30 17:06:11 +03:00
Ilya Chernikov 74411d9b9c Convert all compiler modules to intellij plugin 2018-01-30 17:06:06 +03:00
Alexey Tsvetkov 220fab0d3f Test JPS with Daemon and IC 2018-01-16 21:09:57 +03:00