Commit Graph

46466 Commits

Author SHA1 Message Date
Sergey Rostov f86c6db4bf Idea gradle: proper support for composite MPP projects
(cherry picked from commit ca841f0)

#KT-24748 fixed
2018-06-08 09:46:54 +03:00
Sergey Rostov 80ed963f97 jps, daemon: (minor) formatting 2018-06-08 09:46:53 +03:00
Sergey Rostov e831964871 jps, daemon: pass incremental compilation flag from jps process to daemon 2018-06-08 09:46:52 +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 5a2ed364fe jps: checkCachesVersions for js and common (BuildMetaInfo save/check) 2018-06-08 09:46:49 +03:00
Sergey Rostov 3cfb200e07 jps: improve KotlinDirtySourceFilesHolder 2018-06-08 09:46:48 +03:00
Sergey Rostov b5acb83325 jps: (minor) fix java module detection 2018-06-08 09:46:47 +03:00
Sergey Rostov 5478a552ed jps, js: Fix exception on rebuild js module 2018-06-08 09:46:46 +03:00
Sergey Rostov d75a2be31b jps: Don't create cache for common modules (KOTLIN-CR-2028) 2018-06-08 09:46:45 +03:00
Sergey Rostov c24aa13f12 jps: fixes for KOTLIN-CR-2028 2018-06-08 09:46:44 +03:00
Sergey Rostov c2d87140ec jps, daemon: fix JsFunction.toString() serialization 2018-06-08 09:46:43 +03:00
Sergey Rostov 40b9fa88b7 jps: fix mergedCompilerArguments getter (mergedCompilerArguments) 2018-06-08 09:46:42 +03:00
Sergey Rostov 1cbef873ec jps: implement mpp and js daemon compiler services
#KT-24635 fixed
2018-06-08 09:46:41 +03:00
Sergey Rostov b2fedd7b1e jps, mpp: fix marking expect/actual complementary files as dirty
This files should be marked as dirty for current round, not next
2018-06-08 09:46:40 +03:00
Sergey Rostov 65bdfa72c1 jps: support KotlinSourceRootType
KotlinSourceRootType will added with KotlinSourceRootProvider (ex KotlinMppCommonSourceRootProvider).
New target type (with computeAllTargets) is not possible because ModuleBuildTarget is final.

#KT-24506 fixed
2018-06-08 09:46:39 +03:00
Sergey Rostov b2f58ad9c3 jps, mpp: temporary disable mpp tests 2018-06-08 09:46:38 +03:00
Sergey Rostov 0eee2729cd jps: support multiplatform incremental compilation for jvm and js
- support common modules metadata compilation under flag (it is not required since all common source roots are included transitively for now)
- introduce expect actual tracker in jps: move implementation from gradle to build-common
- support js incremental compilation: move implementation from gradle to build-common
2018-06-08 09:46:37 +03:00
Sergey Rostov 4a6554a36d multiplatform: remove MultiplatformGradleProjectTaskRunner
JPS is now able to build multiplatform projects, so build/run actions should be delegated to gradle only with "Delegate IDE build/run action actions" setting enabled.
2018-06-08 09:46:36 +03:00
Sergey Rostov f7695dd039 mpp: Run tests from common modules should recompile correspond JVM implementation module
#KT-23722 Fixed
2018-06-08 09:46:35 +03:00
Ivan Gavrilovic 44482dbe90 Revert access modifier change in android history 2018-06-07 19:10:09 +03:00
Ivan Gavrilovic 728508e0ae Return an error when build history for dir does not exist 2018-06-07 19:10:04 +03:00
Ivan Gavrilovic 6bb54fd9a3 Support fetching build history files from directories for Android
Android Gradle plugin will start publishing clases in directories.
This commit adds support to find build history files when changed
files come from directories. It is similar to existing implementation
for jars i.e. it looks for .kotlin_module file under META-INF.

Test: ModulesApiHistoryAndroidTest
2018-06-07 19:10:00 +03:00
Mikhail Zarechenskiy b2d9015723 Prohibit identity equals on inline class types 2018-06-07 18:22:05 +03:00
Mikhail Zarechenskiy 9891f562cc [NI] Make subtyping algorithm more robust to error types
During subtyping/incorporation we transform types (e.g. changing nullability,
 form of the type) and, basically, we're doing this to some FIXPOINT.
 It's important that we use `KotlinType.hashCode()` to compare types, but
 for error types hashCode is a hashCode of its supertype and, for example,
 `makeNullableAsSpecified` method recreate type every time. So, we continue
 to generate new constraints and we'll never stop incorporation algorithm
2018-06-07 15:45:53 +03:00
Ilya Gorbunov 1ee37b1772 Update ReadMe for stdlib-js 2018-06-07 14:39:48 +03:00
Anton Bannykh 544222167e Update ReadMe.md
js.libraries doesn't exist anymore
2018-06-07 14:11:37 +03:00
Mikhail Zarechenskiy 177d949f75 Advance bootstrap to 1.2.60-dev-544 2018-06-07 13:13:20 +03:00
Svyatoslav Kuzmich 563637548a KJS: Fix loop levels in ContinueReplacingVisitor (KT-24777) 2018-06-07 12:57:36 +03:00
Svyatoslav Kuzmich 2ec8c4aae6 KJS: Label loops in LabeledBlockToDoWhileTransformation
Fix KT-24542: insert labes for affected loops, breaks and continues
statements during LabeledBlockToDoWhileTransformation
2018-06-07 12:57:36 +03:00
Pavel V. Talanov 463d9b690f Minor: rename PsiFile.moduleInfo -> forcedModuleInfo 2018-06-06 21:04:05 +02:00
Pavel V. Talanov 74052542b4 Minor: rename KtFile.targetPlatform -> forcedTargetPlatform
To avoid confusing with platform extension and debugging for 3 hours
2018-06-06 21:04:04 +02:00
Pavel V. Talanov ced3cf0904 Light classes: fix multifile facades for mpp modules with jvm part
When creating multifile facades respect that facade files can be both
    in common and jvm parts

 #KT-23942 Fixed
2018-06-06 21:04:02 +02:00
Pavel V. Talanov a8a490ea5a Test multifile facades in mpp projects 2018-06-06 21:04:00 +02:00
Pavel V. Talanov 8185b1bf02 Test accessing file facades from java in mpp project 2018-06-06 21:03:57 +02:00
Pavel V. Talanov 1be477c816 Fix "add member" quick fix when invoked from java on common class
#KT-24115 Fixed
2018-06-06 21:03:56 +02:00
Pavel V. Talanov 9e493d8b73 Mpp tests: allow to test java code in highlighting and quickfix tests 2018-06-06 21:03:55 +02:00
Pavel V. Talanov 0157d7bd5d Mpp utils: remove erroneous cache
Note: can't use Module.cached to calculate data that depends on input
   other than the module itself (isTests in this case)
2018-06-06 21:03:53 +02:00
Pavel V. Talanov 1f957de9d8 Minor: use utils appropriately 2018-06-06 21:03:52 +02:00
Pavel V. Talanov fa7531f342 Refactor: move and prettify mpp util code 2018-06-06 21:03:51 +02:00
Pavel V. Talanov 05e6c4e0a2 Minor: move utils to more appropriate place 2018-06-06 21:03:50 +02:00
Pavel V. Talanov e67f449476 Fix exception from kotlin bytecode window on common code
Do not show bytecode window for non-jvm platform modules

 #KT-24159 Fixed
2018-06-06 20:48:18 +02:00
Pavel V. Talanov d18846201a JavaElementFinder: avoid returning fake light class in findClass*
findClass* are supposed to return a single visible class
    from given scope with given fqname
After sorting FakeFileForLightClass would sometimes be first in the list
    leading to exceptions like KT-24704

  #KT-24704 Fixed
2018-06-06 20:45:41 +02:00
Pavel V. Talanov 86e52f45b1 J2K JavaElementFinder: prettify code 2018-06-06 20:45:41 +02:00
Pavel V. Talanov 6cea843461 J2K JavaElementFinder: autoconvert and fix compilation errors 2018-06-06 20:45:41 +02:00
Pavel V. Talanov 00b1e9281b J2K JavaElementFinder: rename file 2018-06-06 20:45:41 +02:00
Alexey Tsvetkov 451c732b8f Test: speed up tests by minimizing number of tasks to run
E.g. avoid building release variants for Android
(extremely slow due to proguard minification, optimization)
2018-06-06 17:54:51 +03:00
Alexey Tsvetkov 0383584f33 Test: rename file to match class name 2018-06-06 17:54:51 +03:00
Alexey Tsvetkov 0c12b0e5fb Test: refactor Gradle daemon memory test
Currently the test makes more harm than use:
* It is too slow: two executions (with different Gradle versions)
take 5 minute on CI.
* It is unreliable: the test fails on CI for months
with insignificant violation of the memory growth limit.

After this change:
* the memory growth limit is increased;
* the test run count is decreased;
* changes the test to use separate project with minimal amount of classes
(we're not interested in compiler's memory leaks; only Gradle plugin specific ones);
2018-06-06 17:54:51 +03:00
Alexey Tsvetkov 43e7b0425d Test: move Gradle daemon memory test to separate class 2018-06-06 17:54:50 +03:00
Ilya Gorbunov 0f972f2412 Restore default parameter values in JS collection constructors
Even if they now have overloads that will be selected when these parameters are omitted.
This is to preserve compatibility with the libraries compiled against the older library.

#KT-24782 Fixed
2018-06-06 15:32:34 +03:00