Commit Graph

38182 Commits

Author SHA1 Message Date
Ilya Chernikov dfdce5ff58 Publish to custom local repo, add copy-only reflect and js-lib
Add artifact signing
2017-04-06 20:32:37 +03:00
Ilya Chernikov 35a135cbf6 Add builds for main stdlib, stdlib jre7/8, kotlin.test 2017-04-06 20:32:37 +03:00
Ilya Chernikov ed9221cb7d Add script runtime, refactorings 2017-04-06 20:32:37 +03:00
Ilya Chernikov c2c051cfe8 Prepare gradle config for building libs - bootstrap and runtime
Use external gradle plugin (1.1-M04) with compiler.jar from dist
Add empty build scripts for other projects that needs to be built with gradle
2017-04-06 20:32:37 +03:00
Ilya Chernikov 8e3453f0eb Add gradle wrapper (3.2) to the libraries dir, add appropriate gradle stuff into gitignore 2017-04-06 20:32:37 +03:00
Dmitry Jemerov 9a215bfec6 Show idea.log when running IDEA from IDEA 2017-04-06 19:00:32 +02:00
Ilya Chernikov a19303e121 Fix environment arg parsing regex - avoid SO on the long strings 2017-04-06 18:49:58 +02:00
Alexey Sedunov 3552b94cdc Kotlin Facet: Avoid excessive validation
#KT-17293 Fixed
2017-04-06 18:54:07 +03:00
Alexey Sedunov c1066b98f0 Move: Fix warning on companion used as implicit dispatch receiver
Do not report conflict if target class is a sublcass of
companion object's containing class
2017-04-06 18:54:02 +03:00
Alexey Sedunov 5c35061afa Move: Make minor improvements and refactorings 2017-04-06 18:52:45 +03:00
Alexey Sedunov 97789d4a32 Move: Show progress indicator when updating usages 2017-04-06 18:18:34 +03:00
Alexey Sedunov 4a168ff780 Move: Process internal usages after all declarations are moved 2017-04-06 18:18:33 +03:00
Alexey Sedunov a9e7d3d5cf Move: Support test data with multiple carets 2017-04-06 18:18:32 +03:00
Alexey Sedunov 18632c3200 Kotlin Facet: Fix facet creation with non-default JVM target 2017-04-06 18:18:31 +03:00
Nikolay Krasko fc55b532d4 Store only string in closure instead of full type 2017-04-06 16:58:31 +03:00
Nikolay Krasko 76fae363ee Stop fail tests because of JNI bugs 2017-04-06 16:53:16 +03:00
Alexey Tsvetkov a047c3682a Invalidate cache version if corresponding file is empty
Sometimes an expression `versionFile.readText()`
returns an empty string, so that `toInt()` fails
with `NumberFormatException`.

It can happen in with both JPS and Gradle.
I could not reproduce the problem,
and it seems to be impossible (under normal circumstances),
because we always write a non-empty string,
and the file is checked to exist before reading.
Maybe it could be caused by an FS error.

The only "solution" to the problem I could think
is to swallow the exception, and assume
that cache version is not valid (so it would cause a rebuild of a module).

    #KT-17125 fixed
2017-04-06 15:53:29 +03:00
Alexey Tsvetkov 56182746b5 Fix printing daemon client messages
Fixing the problem introduced in the commit 9819de1abd:
the daemon client messages should be reported
when the debug log level is enabled
or when the connection not successful

    #KT-17199 fixed
2017-04-06 15:53:29 +03:00
Ilya Chernikov 659002f5ce minor: Fix daemon shutdown livelock
due to wrong minimal aliveness, daemon was in some situations livelocked
in the last session state on shutdown.
2017-04-06 10:02:50 +02:00
Ilya Chernikov 30048f8f49 Fix CRLF handling in source-sections plugin 2017-04-06 10:02:49 +02:00
Ilya Chernikov 0199ec18b1 Add new compiler argument for passing script resolver environment 2017-04-06 10:02:48 +02:00
Ilya Chernikov 234ad39fd6 minor: improve daemon start failure diagnostic 2017-04-06 10:02:47 +02:00
Ilya Chernikov a309511adf Add actual sources to compiler and daemon client jars 2017-04-06 10:02:46 +02:00
Ilya Chernikov 88652154c9 Port compiler to the script-runtime with script base classes 2017-04-06 10:02:45 +02:00
Ilya Chernikov 7ceaca133a Add new artifact kotlin-compiler-client-embeddable.jar 2017-04-06 10:02:44 +02:00
Ilya Chernikov aebfc2f4a1 minor: move native platform launcher to separate file to make native-platform dependency optional 2017-04-06 10:02:43 +02:00
Mikhail Zarechenskiy 90a8a164b4 Fix false warning about check for instance of nullable type
#KT-12269 Fixed
2017-04-05 21:35:09 +03:00
Mikhail Zarechenskiy 0d6b7bb6a1 Prohibit check for instance of a non-reified, non-subtype type parameter
#KT-12683 Fixed
 #KT-9986 Fixed
2017-04-05 21:35:07 +03:00
Mikhail Zarechenskiy 9fdd5fe5e8 Allow to import private members if they are in the same file
#KT-7724 Fixed
2017-04-05 21:35:06 +03:00
Mikhail Zarechenskiy f518e8ebb8 Prefer stable types to diagnose useless cast
#KT-11622 Fixed
2017-04-05 21:35:05 +03:00
Mikhail Zarechenskiy 13eddba1f2 Fix false warning about useless cast in property and property accessor
Note that there are some other problems, for example:
`val a = if (true) 1 as Number else 2`, here we'll get useless cast

 #KT-9551 Fixed
 #KT-9645 Fixed
2017-04-05 21:35:04 +03:00
Mikhail Zarechenskiy 12db3a263e Don't report useless cast in lambda if it has influence on return type
#KT-15161 Fixed
 #KT-12690 Fixed
2017-04-05 21:30:32 +03:00
Alexey Tsvetkov 30d6af7aae Provide incremental compilation for Maven
#KT-11916 fixed

To use the IC either:
1. set the `kotlin.compiler.incremental` property to `true` in a pom.xml:
```
<properties>
    <kotlin.compiler.incremental>true</kotlin.compiler.incremental>
</properties>
```
2. pass the `kotlin.compiler.incremental` property in a command line:
```
mvn install -Dkotlin.compiler.incremental=true
```

When IC is on Kotlin plugin is expected to print the warning in the log:
```
Using experimental Kotlin incremental compilation
```

After each call an incremental compiler will also log how many files it has compiled:
```
Compiled %SOME_NUMBER% Kotlin files using incremental compiler
```

Note that the first build will be non-incremental.

For more diagnostic information (such as an exact list of compiled files) use the `kotlin.compiler.incremental.log.level` system property:
```
mvn install -Dkotlin.compiler.incremental=true -Dkotlin.compiler.incremental.log.level=info
```

To force the rebuild just run the 'clean' goal:
```
mvn clean install
```
2017-04-05 21:00:43 +03:00
Yan Zhulanow 21da11fe18 Fix 'kotlin-spring' and 'kotlin-noarg' Gradle plugin importing (KT-17049)
Allopen and Noarg plugins now use 'presets' that should be handled in the Gradle importer as well.
2017-04-05 18:13:14 +03:00
mglukhikh 9fa16364e1 Find enclosing element for object literal in delegate #KT-8187 Fixed 2017-04-05 16:38:04 +03:00
mglukhikh 6277476573 Do not add a new label to labeled loop
Relevant situation: break / continue in when #KT-16128 Fixed
2017-04-05 15:40:08 +03:00
mglukhikh d9e1e82948 Destructure is available even without usages #KT-14435 Fixed 2017-04-05 15:07:15 +03:00
mglukhikh feb9dd4d83 Don't suggest destructuring if at least half components not used
So #KT-16828 Fixed
2017-04-05 14:45:48 +03:00
Mikhail Glukhikh 318314f1a4 Fix "must not be null" in KotlinInlineFunctionDialog #KT-17233 Fixed 2017-04-04 19:22:46 +03:00
mglukhikh 8fb818fc74 Don't report 'protected in final' for implicitly protected
So #KT-16339 Fixed
2017-04-04 19:22:39 +03:00
mglukhikh f13997750f Make destructure intention work on library data classes
So #KT-16468 Fixed
So #KT-14402 Fixed
2017-04-04 19:22:31 +03:00
mglukhikh 8a02ce3dc2 KT-16828: use _ when appropriate in destructure intention 2017-04-04 19:22:24 +03:00
Ilya Chernikov 32d0d7a4d5 Remove xerces from compiler uberjar, pack compiler with explicit jar names
xercesImpl was unnecessarily added to the compiler uberjar during migration
to the idea platform 171. This caused NCDFE about classes from org.w3c
package.
And to simplify application of this commit and to ensure that only required
jars are packed into the uberjar, the build.xml was altered to use
explicit list of the jars from the ideaSdk/core directory, rather than
a mask.

Fixes #KT-17143 and #KT-17157

(cherry picked from commit 5595bea)
2017-04-04 15:14:46 +02:00
mglukhikh 1b2edf6a0c KT-15870: run getTargetDirectory() in write action 2017-04-04 15:55:57 +03:00
mglukhikh ee239d59aa Set startInWrite... in intention-based quick fix as in intention
So #KT-15870 Fixed
2017-04-04 15:55:55 +03:00
Simon Ogorodnik 57c1d8eda4 Fix conversion of assignment as expression in J2K
Blockless if's and so with assignment as expression inside
should turn into blockful
 #KT-16816 fixed
2017-04-04 14:38:25 +03:00
Simon Ogorodnik 86137e1f65 Fix deadlock in J2K
#KT-17230 fixed
2017-04-04 14:38:25 +03:00
Alexey Sedunov 6bf23d5e02 Kotlin Facet: Convert paths to OS-independent form
#KT-17223 Fixed
2017-04-04 14:35:12 +03:00
Alexey Sedunov 7e0bb089e2 Kotlin Facet: Suppress selection on plugin options tab
#KT-17046 Fixed
2017-04-04 14:35:11 +03:00
Alexey Sedunov 746ec48176 Move: Fix internal reference processing on moving multiple files
#KT-17211 Fixed
2017-04-04 14:35:10 +03:00