Commit Graph

998 Commits

Author SHA1 Message Date
Alexey Tsvetkov bf01fa4729 Use connect-and-lease when using daemon in JPS & Gradle
Relates to KT-15562 "Service is dying".

This commit includes multiple changes:
 1. JPS & Gradle daemon clients are refactored to use `connectAndLease` from `KotlinCompilerClient`.
 `connectAndLease` was introduced in previous commits
 2. `withKotlin` was removed because `connectAndLease` already covers retrying on connection error
 3. Gradle flag files creation is changed:
   * client-alive flag file lives as long as Gradle instance lives,
   * session-alive flag file lives until the end of a build.

Original commit: 9d95c841a6
2017-03-24 19:03:36 +03:00
Alexey Tsvetkov a4cffe9b9e Improve daemon client debug reports
Before this change a daemon client debug messages were printed
only when the client could not connect and the 'kotlin.daemon.verbose'
system property was set up.

Now messages are printed if the debug logging is enabled and
the 'kotlin.daemon.verbose' is set up.

Original commit: 9819de1abd
2017-03-24 19:03:32 +03:00
Alexey Sedunov 645820bde2 Kotlin Facet: Fix argument merging
#KT-16982 Fixed

Original commit: 38f9e99d91
2017-03-22 13:36:06 +03:00
Alexey Sedunov ba816e92d0 Kotlin Facet: KT-16980
Avoid reinitialization of module-level settings on each run of
the analyzer in the absence of Kotlin facet

 #KT-16980 Fixed

Original commit: 7c7e41592a
2017-03-22 13:36:05 +03:00
Alexey Tsvetkov 22d420ce13 JPS tests: avoid using deprecated API
Original commit: 40574d31ac
2017-03-20 18:46:00 +01:00
Dmitry Jemerov 263004959a Update to 171.SNAPSHOT to pick up fix for IDEA-169570; fix compilation
Original commit: 12fc89f35d
2017-03-20 18:45:41 +01:00
Nikolay Krasko 0548ec683d ! (TODO) Update build test data in 171
Original commit: 1d29c81346
2017-03-20 18:45:40 +01:00
Nikolay Krasko 55e551c03a Update after separating JPS builders into two modules
Original commit: 95061885b0
2017-03-20 18:45:35 +01:00
Alexey Tsvetkov efc1164489 JPS: implement tracking of null annotations
#KT-12933 fixed
    #KT-14266 fixed

Original commit: 05f278ce20
2017-03-20 18:45:21 +01:00
Dmitry Jemerov efd8357035 fix compilation against branch 163
Original commit: a2b0b3d6eb
2017-03-20 18:45:15 +01:00
Alexander Udalov ff0438b38a JS: support -Xskip-metadata-version-check for incompatible ABI libraries
Allow the compiler to read such libraries without any errors, at the
risk of crashing with an exception.

Also fix a minor bug in the diagnostic message in LibrarySourcesConfig
and in the corresponding test in KotlinJpsBuildTest

Original commit: bf90cb5cc0
2017-03-20 17:22:29 +03:00
Alexey Sedunov 7841af6c57 JPS: Copy project-level settings before use
Sharing these settings for reading/writing
between different module during JPS build
may lead to compiler settings
(plugionOptions, in particular) of several
modules to be mixed

 #KT-16888 Fixed

Original commit: 505a6bcbf2
2017-03-19 17:19:40 +03:00
Alexey Sedunov fcd77261d0 Kotlin Facet: Fix reading of v1 configuration
Favor language/api version specified in <versionInfo> element
in case it differs from the one in
<option name="_commonCompilerArguments">

#KT-16861 Fixed

Original commit: 2bb7bdfc3f
2017-03-19 17:19:26 +03:00
Alexey Sedunov 416a5027df Kotlin Facet: Validate "additional arguments"
Validate consistency of "additional arguments" with respect to settings specified in other UI controls

Original commit: 88a394e892
2017-03-16 03:14:40 +03:00
Mikhail Glukhikh 61934ff4b3 Cleanup: apply "Convert lambda to reference"
Original commit: 045a23ae10
2017-03-15 17:36:02 +03:00
Mikhail Glukhikh f307821704 Cleanup: fix some compiler warnings (mostly deprecations, javaClass)
Original commit: b121bf8802
2017-03-15 17:35:31 +03:00
Alexander Udalov 2c4f3c059d Use LanguageFeature.State enum instead of CoroutineSupport
Original commit: 7a240b63c7
2017-03-15 11:03:03 +03:00
Alexander Udalov d74d508525 Introduce LanguageFeature.State, drop coroutines-related pseudofeatures
Previously there were three LanguageFeature instances -- Coroutines,
DoNotWarnOnCoroutines and ErrorOnCoroutines -- which were handled very
awkwardly in the compiler and in the IDE to basically support a language
feature with a more complex state: not just enabled/disabled, but also
enabled with warning and enabled with error. Introduce a new enum
LanguageFeature.State for this and allow LanguageVersionSettings to get
the state of any language feature with 'getFeatureSupport'.

One noticeable drawback of this approach is that looking at the API, one
may assume that any language feature can be in one of the four states
(enabled, warning, error, disabled). This is not true however; there's
only one language feature at the moment (coroutines) for which these
intermediate states (warning, error) are handled in any way. This may be
refactored further by abstracting the logic that checks the language
feature availability so that it would work exactly the same for any
feature.

Another issue is that the difference among ENABLED_WITH_ERROR and
DISABLED is not clear. They are left as separate states because at the
moment, different diagnostics are reported in these two cases and
quick-fixes in IDE rely on that

Original commit: 32826c1686
2017-03-15 11:03:00 +03:00
Alexander Udalov 848d3761d1 Move skipMetadataVersionCheck flag to LanguageVersionSettings
This makes it possible to avoid the CompilerConfiguration instance in
injectors, because CompilerDeserializationConfiguration was the only
left component that required it.

LanguageVersionSettings is not a good name for this entity anymore, it
should be renamed in the future

Original commit: ac530ac49c
2017-03-15 11:02:58 +03:00
Alexander Udalov d01eed9849 Move JvmTarget to frontend.java, introduce TargetPlatformVersion
Previously JvmTarget was declared in module 'util' which is accessible
for example from 'frontend', which is not very good.

Also add a superinterface named TargetPlatformVersion which is going to
be used in platform-independent injectors in 'frontend' in the following
commits. Use it in one place (LanguageVersionSettingsProviderImpl.kt)
instead of DescriptionAware because TargetPlatformVersion sounds like a
better abstraction than DescriptionAware here

Original commit: 573c6ab5d4
2017-03-15 11:02:56 +03:00
Alexey Sedunov 6ea2a6540f Configuration: Don't create kotlinc.xml if the settings don't differ from the defaults
#KT-16647 Fixed

Original commit: 6b6d7a5030
2017-03-14 15:33:11 +03:00
Alexey Sedunov f936dea850 JPS: Parse and merge additional arguments with primary ones instead of
appending them (to avoid duplication)
 #KT-16788 Fixed

Original commit: e5a128ab2e
2017-03-14 15:33:07 +03:00
Alexey Sedunov 8789a40617 Misc: Include cli-parser 1.1.2 sources into the project under different package and drop original library dependency
This would allow building the project with Kotlin JPS plugin on TeamCity where older library takes precendence due to appearing earlier in JPS classpath

Original commit: 73b879ea89
2017-03-14 15:33:06 +03:00
Alexey Sedunov cc7091bb3c JPS: Fix earlier configurations with incorrect combination of language and API version
Original commit: e8640b441d
2017-03-09 23:06:42 +03:00
Alexey Sedunov 9759f1e067 Kotlin Facet: Escape additional compiler arguments when converting them to string and unescape before parsing
#KT-16700 Fixed

Original commit: 811b8978c2
2017-03-09 23:06:38 +03:00
Alexey Sedunov e24fd4e986 Kotlin Facet: Reuse configuration serialization in JPS (previous implementation is not usable after configuration refactoring)
Original commit: 278cc71c4a
2017-03-09 23:06:18 +03:00
Alexey Sedunov fac356c690 Kotlin Facet: Get rid of duplicating data in facet configuration
Original commit: 641a9a7153
2017-03-09 23:06:12 +03:00
Anton Bannykh 07691e369a JPS JS: simplified the code and added tests for the missing meta.js case (e.g. empty sourceroot; fixed by yole in 00ed0248d9a23701dbef52da02259d174a9999e7)
Original commit: 6608e97d35
2017-02-28 16:05:16 +03:00
Dmitry Jemerov 0ca604d743 Don't pass paths to non-existing metadata files from dependent modules
Original commit: 3225c93ce0
2017-02-16 19:16:19 +01:00
Alexey Sedunov 7bc894d0fe Kotlin Facet: Check contradictory values of "coroutine support" option
#KT-16109 Fixed

Original commit: 330beebb2c
2017-02-13 14:53:14 +03:00
Alexander Udalov 9558f5188a Move testable IS_PRE_RELEASE flag to KotlinCompilerVersion
It'll be used in the JS back-end as well soon, so
DeserializedDescriptorResolver is not the best place for it

Original commit: 4c9afb9d20
2017-02-13 12:11:15 +03:00
Alexey Andreev b4086fe033 JS: drop support of old library format
Original commit: 7192529733
2017-02-10 21:04:50 +03:00
Stanislav Erokhin 4cb5e8a919 Do not force resolve descriptors for explicit imports. Create lazy scope instead.
Original commit: b616ef0a40
2017-02-09 15:42:30 +03:00
Alexey Sedunov c5ecc540ad Kotlin Facet: Always parse argument string to proper compiler arguments bean
#KT-16137 Fixed
 #KT-16157 Fixed
 #KT-16206 Fixed

Original commit: 4325632b3e
2017-02-08 11:56:59 +03:00
Alexander Udalov d323c39b7d Do not import "kotlin.comparisons" by default for language version 1.0
#KT-16199 Fixed

Original commit: b780e6d374
2017-02-07 10:15:57 +03:00
Anton Bannykh 81ab76ade8 JPS: fixed duplicate meta.js in case of multiple source roots in the same module.
Original commit: f0e3c87b84
2017-02-03 13:03:12 +03:00
Anton Bannykh 36035c789a JS: fixed support for test source roots (KT-6627)
Original commit: 289a7a9cc3
2017-02-03 13:03:12 +03:00
Alexey Tsvetkov 48fdcf9b97 Avoid checking incremental caches versions if corresponding property is set
Original commit: 1818289772
2017-02-01 18:50:06 +03:00
Alexey Tsvetkov 9b1aad0b9f Refactoring: extract checking caches versions to function
Original commit: 2eeb7e36b9
2017-02-01 18:50:06 +03:00
Alexander Udalov 79d67e97c3 JS: rename "-library-files" argument to "-libraries" and change separator
Use the system separator (':' or ';') instead of commas

 #KT-16083 Fixed

Original commit: 464820458e
2017-01-31 16:26:35 +03:00
Alexander Udalov a315b73c91 Promote severity of configuration warnings to STRONG_WARNING
The reason is that these configuration problems may be the reason of
compilation errors, but they were hidden from the output because warnings are
not reported when there's at least one error

Original commit: e9a737b85a
2017-01-30 16:01:29 +03:00
Alexander Udalov 6594285693 Introduce CompilerMessageSeverity.STRONG_WARNING
This is a severity for mandatory warnings, i.e. those which should be reported
in any case, even if there are compilation errors

Original commit: 7ac96163ac
2017-01-30 16:01:27 +03:00
Alexander Udalov 0ac040e130 JS: drop "-kjsm" flag, merge logic with "-meta-info"
#KT-16049 Fixed

Original commit: e5680565b3
2017-01-30 11:31:03 +03:00
Alexander Udalov 98b25d0738 JS: minor, drop obsolete VFS_PROTOCOL
Original commit: 17b0b7704f
2017-01-30 11:31:02 +03:00
Ilya Chernikov ceba0661bc Move daemon session flag files to daemon discovery dir by default + minor fixes:
- Move flag files from the temp dir, because right now JPS cleans temp dir on each build start. Should fix KT-15707, also may affect KT-15562.
- change compiler runner to allow the fix above
- Fix flag file name filtering
- Fix ifAlive handling on the new compile method in the daemon.

Original commit: 7c0cdf90cf
2017-01-28 15:36:06 +01:00
Dmitry Jemerov 77bfa685dd Import new Gradle coroutines DSL setting into Kotlin facet
Original commit: da6640971f
2017-01-28 13:14:39 +01:00
Denis Zharkov 78391cd97c Move coroutine-related runtime parts to kotlin.coroutines.experimental package
#KT-15975 Fixed

Original commit: 8fa8ba7055
2017-01-27 23:24:13 +03:00
Alexey Sedunov 74bd171933 Misc: Reverted e2fff37ccc 'Copy compiler arguments from iml even if "Use project settings" checkbox is checked' as it's rendered obsolete due to "Use project settings" being turned off by default in Gradle/Maven projects
Original commit: deb9258994
2017-01-26 18:06:19 +03:00
Alexey Tsvetkov 9f8ba45853 Rebuild all kotlin files when EAP flag is changed
Original commit: b9dbe69232
2017-01-26 13:38:52 +03:00
Alexey Tsvetkov 84691965cb Save JvmBuildMetaInfo to file after build
Original commit: 4a63e47aa0
2017-01-26 13:38:52 +03:00