Commit Graph

1226 Commits

Author SHA1 Message Date
Alexander Udalov 0f003802fe Introduce -Xcommon-sources and pass it correctly from build tool plugins
#KT-25196 In Progress
2018-08-21 12:49:10 +02:00
Alexey Tsvetkov d09629972a Use same system property to avoid deleting module file in JPS and Gradle 2018-08-20 23:41:11 +03:00
Alexey Tsvetkov 3b4a49eebf Add test for KT-26064 2018-08-17 15:27:00 +03:00
Sergey Rostov 839a6b5e60 JPS: Support new MPP model. 2018-08-07 15:59:43 +03:00
Vyacheslav Gerasimov 8fc0c1d7b0 as33: Add AS 3.3 bunchset built with AS 3.3 C4 2018-08-02 20:53:17 +03:00
Vyacheslav Gerasimov a2bf417d75 Remove 172 bunchset 2018-08-02 19:32:18 +03:00
Alexey Tsvetkov 76b9b579bc Minor: fix 172 patchset 2018-07-23 23:10:14 +03:00
Alexey Tsvetkov ff35d509e6 Add test for KT-25540 2018-07-23 15:43:17 +03:00
Alexey Tsvetkov 11977cc1c1 Add multi-module JS IC tests with JPS 2018-07-23 15:43:17 +03:00
Alexey Tsvetkov 3227300f18 Minor: rename setIsEnabled->setIsEnabledForJvm 2018-07-23 15:43:17 +03:00
Alexey Tsvetkov 8f002fdb43 JS IC: track lookups from libraries
Otherwise we don't track lookups from other modules

    #KT-25540 fixed
2018-07-23 15:43:17 +03:00
Alexey Tsvetkov c8c0c773fb Report info message when JS IC is enabled in JPS 2018-07-23 15:43:17 +03:00
Alexey Tsvetkov 0b18380770 Use separate system properties to control IC for JVM and JS
Also this commit effectively disables JS IC by default

     #KT-25563 fixed
2018-07-23 15:43:16 +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
Alexander Udalov 1f0fb4823f Simplify DefaultImportProvider, introduce "low priority imports"
Previously, packages `java.lang` and `kotlin.jvm` were imported on JVM
by default on the same rights, causing problems when the same classifier
existed both in `java.lang` and `kotlin.jvm`. Since the only known case
of such conflict were type aliases to JVM classes, the corresponding
classes (expansions of those type aliases) were manually excluded from
default imports. This made the code in DefaultImportProvider complicated
and resulted in multiple problems, regarding both correctness and
performance (see 82364ad3e5, a9f2f5c7d0, dd3dbda719).

This change adds a new concept, a "low priority import", and treats
`java.lang` as such. Since these imports are now separated from the rest
of default imports in LazyImportScope via secondaryClassImportResolver,
conflicts between classifiers are handled naturally: the one from
`kotlin.jvm` always wins (unless the one from `java.lang` is imported
explicitly, of course). This approach is simpler, safer and does not
require any memory to cache anything.

Skip ResolveToJava.kt test for javac-based resolve; it now fails because
of a weird issue which I didn't have time to investigate (this is OK
because it's a corner case of an experimental functionality)
2018-07-16 13:45:11 +02:00
Ilya Chernikov 563e4c9e57 Add kts to supported file extensions to the DirtySourceFilesHolder as well
allows jps to compile scripts along with sources,
finally fixes #KT-22611
2018-07-10 08:43:51 +02:00
Ilya Chernikov 9453834fb1 Create proper constructor in script descriptor
allows to resolve calls to scripts in compiler (but not in the IDE yet)
Some refactorings on the way
2018-07-10 08:43:50 +02:00
Alexey Tsvetkov 5760b8cf8b Register kotlin_module as output of all files
Previously kotlin_module was registered as output
only for files containing top-level declarations
2018-07-09 15:48:11 +03:00
Alexey Tsvetkov f438b7501c Fix compilation of plugin projects in JPS
#KT-25218 fixed
2018-07-04 14:54:07 +03:00
Alexey Tsvetkov 1dea01a479 Build: remove testRuntime dependency on ":kotlin-compiler:dist" 2018-07-02 22:36:35 +03:00
Alexey Tsvetkov ece991639e Do not compile jps tests for android studio
I accidentally enabled compilation in one of my previous commits
2018-06-29 20:16:53 +03:00
Alexey Tsvetkov 3a7c674957 Fix test dependencies in jps-plugin
Otherwise tests fail on clean checkout
2018-06-28 22:03:10 +03:00
Alexey Tsvetkov cdfcedb897 Minor: reword progress message
#KT-24936 fixed
2018-06-19 15:43:24 +03:00
Vyacheslav Gerasimov 020d941c27 Fix test compilation for AS branches
There is no devkit is AS
2018-06-08 15:26:47 +03:00
Sergey Rostov c71357dd76 173: jps, mpp: fix AbstractIncrementalJpsTest.kt.173 2018-06-08 13:50:05 +03:00
Sergey Rostov 5455b6c0c0 jps: add common source roots to the final platform modules as a workaround for absence of incremental k2metadata compiler 2018-06-08 09:46:56 +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 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 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 098e51d104 jps: support dev kit module types (and all other ModuleBasedBuildTargetType). fix brunch 172 2018-05-24 14:59:46 +03:00
Sergey Rostov ec5110e1f4 jps: support dev kit module types (and all other ModuleBasedBuildTargetType)
#KT-24500 fixed
2018-05-24 11:12:01 +03:00
Alexey Tsvetkov 7f865565a6 Improve JPS progress messages
#KT-9218 fixed
2018-05-18 23:50:08 +03:00
Alexey Sedunov 9fa26c83b6 Configuration: Introduce special source roots for non-JVM Kotlin modules
#KT-5948 Fixed
 #KT-23672 Fixed
2018-05-18 12:09:40 +03:00
Vyacheslav Gerasimov 4adc0a94ab as32: Update to 181 platform api 2018-05-10 23:28:41 +03:00
Sergey Rostov 9fafe0473c jps (refactor): reimplement KotlinModuleBuildTarget data binding using CompileContext 2018-05-04 11:14:45 +03:00
Sergey Rostov 91b703d529 jps: common modules metadata compiler
(cherry picked from commit cde333d)
2018-05-04 11:05:13 +03:00
Sergey Rostov 41dcc9ad4d jps: minor: refine kotlin.jps.model package
(cherry picked from commit 2a31e78)
2018-05-04 11:05:12 +03:00
Sergey Rostov a390fc36e2 jps: Refactor module/project settings getters/setters
(cherry picked from commit d29ffa0)
2018-05-04 11:05:12 +03:00
Sergey Rostov 75e6be7802 jps(refactor): Extract platform related code
#KT-23656 Fixed

(cherry picked from commit 18a751d)
2018-05-04 11:05:12 +03:00
Nikolay Krasko c83ff5e75f Remove files introduced in 181 from 173 branch 2018-04-27 19:45:23 +03:00