Commit Graph

55959 Commits

Author SHA1 Message Date
Alexey Tsvetkov f2021b580e Do not fork java compile tasks when current JDK can be used
I see the following improvements:
* `clean dist --parallel` is ~10% faster (from 3:40 to 3:20)
* incremental `dist --parallel` is ~50% faster
(adding public method to org.jetbrains.kotlin.utils.SmartList)
2019-07-02 15:18:19 +03:00
Alexey Tsvetkov 48b86bba69 Check JDK env vars once during configuration when not syncing
Previous code (callback in `beforeTask`) was added to allow
opening project without setting up all env. variables.
This change simplifies the code and avoids a callback,
while keeping the ability to open the project without
setting up all variables by checking `kotlinBuildProperties.isInIdeaSync`
2019-07-02 15:18:19 +03:00
Alexey Tsvetkov 33de71f792 Call configureJvmProject once per project in afterEvaluate
Calling it twice does not seem to make sense now
2019-07-02 15:18:19 +03:00
Alexey Tsvetkov 290aded94f Set sourceCompatibility and targetCompatibility for JavaCompile tasks
Currently running build with JAVA_HOME pointing to
any JDK != 1.8 results in errors like

    #KT-30382 Fixed
2019-07-02 15:18:19 +03:00
Anton Bannykh f8035096ea JS: lock tape version to avoid kotlin.test + tape integration test failure 2019-07-02 15:14:07 +03:00
Mikhail Zarechenskiy 60ac2056bd Update diagnostic message in test data
Follow-up of 42a5c488: function `unCapture` is used to render
 diagnostic messages, therefore we have this change now
2019-07-02 14:02:07 +03:00
Nikolay Krasko a67c3ef855 Update 183 branch to 183.6156.11 2019-07-02 14:00:26 +03:00
Nikolay Krasko 2d85d18a74 Minor: add more exceptions to project dictionary 2019-07-02 14:00:25 +03:00
Nikolay Krasko 28a45909a0 Fix compatibility with 192 branch (KT-32364) 2019-07-02 14:00:24 +03:00
Nikolay Krasko ba2ca5ae3c Fallback to simple oocb when per-language trackers are disabled (KT-32364) 2019-07-02 14:00:11 +03:00
Nikolay Krasko f605d4e73b Revise per module out-of-code-block (KT-32364) 2019-07-02 13:59:35 +03:00
Nikolay Krasko 73eea6f4b6 Minor: rename file before refactoring 2019-07-02 13:59:21 +03:00
Nikolay Krasko 4f678c8289 Create project service with Kotlin trackers (KT-32364) 2019-07-02 13:59:19 +03:00
Nikolay Krasko 263d8eea16 Use Kotlin oocb instead of platform oocb tracker (KT-32364) 2019-07-02 13:59:06 +03:00
Nikolay Krasko 557ea54a9f Introduce Kotlin specific out-of-code-block tracker (KT-32364) 2019-07-02 13:59:04 +03:00
Nikolay Krasko 12bb1a5bd1 Make invalidateOnOOCB explicit in ResolverForProjectImpl and remove usage in tests 2019-07-02 13:45:35 +03:00
Nikolay Krasko b32b362810 Extract KotlinModuleModificationTracker to separate file 2019-07-02 13:45:35 +03:00
Nikolay Krasko 26c7eddb03 Move trackers to caches.trackers package 2019-07-02 13:45:35 +03:00
Nikolay Krasko 2ddcd9f0af Minor: cleanup and reformat KotlinCodeBlockModificationListener.kt 2019-07-02 13:45:35 +03:00
Vladimir Dolzhenko 2029d16062 Add add-imports performance tests
Add missed auto generated perf tests
2019-07-02 09:58:04 +03:00
Dmitry Gridin 57a732c247 Minor: fixes after review 2019-07-02 11:54:38 +07:00
Dmitry Gridin 9316f45a5c Optimize Imports: improve tooltip information
#KT-21374 Fixed
2019-07-02 11:54:38 +07:00
Dmitry Gridin 074829bcea Import: IDE should import class from root package
#KT-21422 Fixed
2019-07-02 11:54:38 +07:00
Dmitry Gridin 148eed2a12 ShortenReferences: fix false negative for object call chain
#KT-32320 Fixed
2019-07-02 11:54:38 +07:00
Dmitry Gridin 33914a3a94 ImportMemberIntention: make more flexible based on caret position
#KT-31924 Fixed
2019-07-02 11:54:38 +07:00
Dmitriy Dolovov 6f2f60869c Minor: Don't create unnecessary PluginId instances
(to avoid PluginId cache pollution)
2019-07-02 10:49:43 +07:00
Anton Bannykh 208c8f9339 JS: fix bootstrap 2019-07-01 20:22:05 +03:00
Svyatoslav Kuzmich 69962cbf8c [JS IR BE] Add JsExport annotations 2019-07-01 18:55:41 +03:00
Svyatoslav Kuzmich 685597d20a [JS IR BE] Codegen class model refactorings
Reduce JsScope usage
2019-07-01 18:55:41 +03:00
Steven Schäfer e7a5e5b4a0 JVM_IR: Handle annotation KClass fields in external declarations 2019-07-01 16:16:23 +02:00
Steven Schäfer 1ab0b76af3 Minor: use more descriptive argument name 2019-07-01 15:49:12 +02:00
Steven Schäfer 078ccbf077 JVM_IR: Implement name mangling exceptions for Result class. 2019-07-01 15:49:12 +02:00
Steven Schäfer d458e4a7b2 JVM_IR: Enable inlining for external declarations with inline class parameters. 2019-07-01 15:49:12 +02:00
Natalia Selezneva da86ef8454 Fix tests for long command line: create folder instead of file
Compiler doesn't allow files as classpath roots
2019-07-01 16:41:56 +03:00
Natalia Selezneva 30222582f4 Scratch tests: print test output at onFinish to avoid multiple calls of invokeLater
Multiple calls of invokeLater significantly affects test speed
2019-07-01 16:41:56 +03:00
Natalia Selezneva 85f07927c9 Minor: check output with errors in scratch tests 2019-07-01 16:41:55 +03:00
Natalia Selezneva 784cc17d21 Do not use deprecated UIUtil.invokeLaterIfNeeded. Use TransactionGuard instead 2019-07-01 16:41:55 +03:00
Natalia Selezneva 63246f57d2 Scripts: drop sdk caches on project root change event
Otherwise old invalid roots may be saved
2019-07-01 16:41:55 +03:00
Natalia Selezneva d981135c4b Scratch: finish execution if no new lines was executed
^KT-32062
2019-07-01 16:41:55 +03:00
Leonid Startsev 7ef9fb5511 Export deserialization constructor from JS module
Fixes https://github.com/Kotlin/kotlinx.serialization/issues/443
2019-07-01 14:56:10 +03:00
Mark Punzalan 969478481e Move extension receiver to value parameters for static functions created
during InlineClassLowering phase.

This was the only place where both dispatch and extension receivers were
NOT moved to value parameters, which meant that the receivers were not
following the conventional ordering.

Merged createStaticBodilessMethod with createStaticFunctionWithReceivers
and the latter was moved to backend/common/ir/IrUtils.kt.
2019-07-01 13:24:08 +02:00
Mark Punzalan 1abdf0561a Generate synthetic functions for local functions with default values, by
re-ordering the lowering phases.

The changes in InterfaceLowering are necessary so that IrElements that
target the removed functions are re-targeted to the new functions in
DefaultImpls. This affects local functions in interface functions since
now LocalDeclarationsLowering comes before InterfaceLowering.
2019-07-01 13:24:08 +02:00
Vyacheslav Gerasimov d2f1852c5e Build: Upgrade gradle to 5.4.1 2019-07-01 14:14:55 +03:00
Alexey Tsvetkov ffa191d91d Fix filling Main-Class attribute in manifest file of output jar
Before 5b7cee6221 JVM CLI compiler
was calling `KotlinToJVMBytecodeCompiler.compileBunchOfSources`.
`compileBunchOfSources` detected possible main classes,
and filled the Main-Class attribute in output jar
if if there was only one candidate.

After the change JVM CLI began calling
`KotlinToJVMBytecodeCompiler.compileModules`, which was not searching for a main class.

This change adds searching for main classes to `compileModules`.
We search for a main class only when one module is compiled,
and an output is written a jar file (so the change only affects JVM CLI compilation).

    #KT-32272 Fixed
2019-07-01 13:57:04 +03:00
Mikhail Zarechenskiy 515e666733 [NI] Fix exception on incomplete try/catch block
There was an inconsistency on creating PSI call and corresponding
 descriptor. See variable `catchBlocks` from visitor, it's created
 only if PSI elements are not null, but for descriptor parameters
 there wasn't such check

 #KT-32134 Fixed
 #EA-139748 Fixed
2019-07-01 12:59:37 +03:00
Mikhail Zarechenskiy 42a5c488c1 [NI] Fix OnlyInputTypes annotation support for top-level captured types
#KT-32157 Fixed
 #KT-32116 Fixed
 #KT-32235 Fixed
 #KT-32218 Fixed
2019-07-01 12:59:35 +03:00
Mikhail Zarechenskiy c2cf4aa2b5 [NI] Move ability to convert standalone SAM-argument under the feature
If new inference is enabled only for IDE analysis, then this feature
 will be disabled to reduce difference between new and old inference,
 but if new inference is enabled in the compiler, then this feature
 will be enabled too to preserve behavior of new inference for
 compilation

 #KT-32175 Fixed
 #KT-32143 Fixed
 #KT-32123 Fixed
 #KT-32230 Fixed
2019-07-01 12:53:33 +03:00
Mikhael Bogdanov 4d82b02f83 Properly set parent inside copied bodies 2019-07-01 07:56:32 +02:00
Toshiaki Kameyama 3a77b63c85 Completion: don't propose the same name for arguments of lambda (KT-9792)
#KT-9792 Fixed
2019-06-29 20:36:55 +03:00
Toshiaki Kameyama c442d69db6 Extend selection: select just KDoc if cursor is just before the KDoc (KT-16476)
#KT-16476 Fixed
2019-06-29 20:36:55 +03:00