Commit Graph

1436 Commits

Author SHA1 Message Date
Alexey Tsvetkov b767adc66d Make lookup storage addAll order independent
Lookup storage output files could differ for projects
with different absolute paths.
This happened because, paths for lookups were
relativized only before writing to the underlying storage.
Storing absolute paths in a hash table could
result in different order of adding files to the lookup storage.
This commit fixes the issue by sorting lookups and files in
LookupStorage#addAll

    #KT-32674 Fixed

Original commit: a4c62d156f
2019-07-25 20:30:56 +03:00
Vadim Brilyantov 21487a7b5e #KT-27389 : Change JavaSourceRoot usages to Kotlin analogs
Original commit: 91d603292c
2019-07-17 15:53:58 +03:00
Andrey Uskov ad8101d92d Import list of pure kotlin source roots from gradle
in facet settings for inspections
#KT-32300 Fixed

Original commit: c98ad923bd
2019-07-09 20:12:55 +03:00
Andrey Uskov ac345b52ad Facet serialization changed in order to keep compatibility with previous
versions of Kotlin plugin

Original commit: 404ce1a8c1
2019-07-02 22:46:46 +03:00
Andrey Uskov 9330f90002 HMPP: fix importing target platforms for case when JVM targets are involved
Original commit: 87e75bd4cc
2019-07-02 22:46:45 +03:00
Andrey Uskov d7bd959bd8 HMPP: import flag indicating that the project uses HMPP feature
Original commit: e791b9d3f7
2019-07-02 22:40:19 +03:00
Nikolay Krasko 96bcadbbba Modify dependencies for 192 branch: more dependencies to full java plugin
Original commit: b7c12014ee
2019-06-26 14:11:23 +03:00
Nikolay Krasko 9ab1814dd5 Update to 192.5118.30
Original commit: beb1bc09d4
2019-06-25 11:48:59 +03:00
Dmitry Gridin 47c3e16cf9 Cleanup: apply RemoveRedundantQualifierNameInspection to idea
Original commit: 8c84f885ac
2019-06-24 15:56:33 +07:00
Vyacheslav Gerasimov a6167fd77b Build: Fix intellij dependency leak from ir tree module
Original commit: 5a39c637c2
2019-06-13 21:03:55 +03:00
Andrey Uskov 8bb347a0ee Import of middle HMPP target platforms is supported
Original commit: c0bf5a6566
2019-06-13 18:30:01 +03:00
Dmitry Savvinov bca2342dfc [Misc] Get rid of IdePlatformKind.IDE_KINDS_BY_COMPILER_PLATFORM
It works incorrectly for cases of non-trivial common platforms (works
fine for 'JVM/JS/Native', but doesn't work for 'JVM/JS')

Original commit: d458821565
2019-06-10 13:34:27 +03:00
Alexey Tsvetkov 093d14bd2f Add experimental support for bytecode instrumentation with JPS
#KT-13563 Fixed

Original commit: 38a692abcf
2019-06-07 21:06:25 +03:00
Alexey Tsvetkov 144652dbaa Fix IC test for multifile part with property
Our JPS and Gradle plugins handle
recompilation of multifile classes differently.

JPS plugin delegates handling to the JPS itself,
which tracks dependencies via bytecode,
and marks classes as dirty when they are affected.
So in JPS other parts of multifile classes are recompiled only
when a part's signature is changed.

In Gradle plugin we handle recompilation ourselves in
simpler way: any change in any part leads to a recompilation
of all parts of the same multifile class.

In future we should improve our Gradle plugin, but for now
I'm changing the test so that both JPS and Gradle tests
recompile all parts.

Also the dummy function is added to make sure that we
don't blindly recompile everything when a part is changed.

Original commit: 7f1d30058a
2019-05-29 10:23:19 +02:00
Alexey Tsvetkov 4beeb8d657 Add test for KT-31131
Original commit: 56d5846ef1
2019-05-29 10:23:18 +02:00
Anton Bannykh e5df6447cb JS: cache metadata, grouped by package FQN
Original commit: c3170d1908
2019-05-28 23:33:17 +03:00
Dmitry Savvinov c1eb93ba14 Rename platform to targetPlatform in KotlinFacetSettings to avoid ambiguity in Java
Original commit: aeb7f8400a
2019-05-28 16:03:05 +03:00
Dmitry Savvinov 1d14c6e7e3 Introduce unspecifiedJvmPlatform for clients without jvmTarget
Previously, a lot of clients used JvmPlatform as platform-marker,
without thinking about jvmTarget.

For the sake of migration, this commits introduced so-called
UnspecifiedJvmPlatform, which can be used for a time being, but
generally, all usages should be removed in  future.

Original commit: 8997fa52df
2019-05-28 13:08:09 +03:00
Dmitry Savvinov 60b239b52d [Compatibility] Restore KotlinFacetSettings.getTargetPlatform()
Original commit: ef39e2a68f
2019-05-28 13:08:09 +03:00
Dmitry Savvinov 9be3d90cb6 [Compatibility] Restore KotlinProjectConfugirator.getTargetPlatform()
Original commit: 716e55d171
2019-05-28 13:08:09 +03:00
Dmitry Savvinov 4c4d6dfd23 [Compatiblity] Restore IdePlatform as well as some related methods
Original commit: dfe0493f9a
2019-05-28 13:08:09 +03:00
Dmitry Savvinov 16ac06ed04 [Compatibility] Restore old TargetPlatform and subtypes for compatibility
Original commit: 2caa1c3dd6
2019-05-28 13:08:08 +03:00
Dmitry Savvinov 8112f3be71 [Platform API] Remove IdePlatform, use TargetPlatform instead
Original commit: 2d528c6396
2019-05-28 13:08:07 +03:00
Dmitry Savvinov 7deb18da0b [Platform API] Introduce fundamental abstraction of Platform
This is a large commit, which introduces general API for working with
abstraction of Platform.

- Add new abstraction to 'core' - SimplePlatform - which represents
exactly one platform
  - Clients are strongly prohibited to create instances of SimplePlatform
  by hand, instead, corresponding *Platforms abstraction should be used
  (e.g. JvmPlatforms, JsPlatforms, KonanPlatforms)

- Move TargetPlatform to 'core', it represents now a collection of
SimplePlatforms
  - Clients are strongly encouraged to use TargetPlatform
    (not SimplePlatform) in API, to enforce checks for multiplatform

- Provide a helper-extensions to work with TargetPlatform
(in particular, for getting a specific component platform)

- Remove MultiTargetPlatform in favour of TargetPlatform
  - Notably, this commit leaves another widely used duplicated abstraction,
    namely, IdePlatform. For the sake sanity, removal of IdePlatform is
    extracted in the separate commit.

Original commit: d5fbe59a3e
2019-05-28 13:08:07 +03:00
Vadim Brilyantov 1b322bfdeb Move daemon jar from compiler
Original commit: 01a05a5495
2019-05-17 15:51:52 +03:00
Vadim Brilyantov 5b697b0c98 Introduce new Kotlin Daemon without RMI abstraction
Original commit: ced973b707
2019-05-17 15:51:51 +03:00
Alexey Tsvetkov b5741d3120 Do not expose paths with placeholders in JS IC caches
#KT-31310 Fixed

Original commit: 209a5d8464
2019-05-16 04:01:26 +03:00
Mikhail Zarechenskiy 36580d46da Add option to enable new inference only for IDE analysis
#KT-30453 Fixed

Original commit: a3247b1b92
2019-05-06 14:36:05 +03:00
nikita.movshin 5e85ef26ee Update copyright. Fix 2 lines comments after rebase
Change the copyright from "JetBrains s.r.o." to
"JetBrains s.r.o. and Kotlin Project contributors"

Original commit: deb416484c
2019-04-23 20:15:03 +03:00
nikita.movshin 57c71be163 Update copyright.
Change the copyright from "JetBrains s.r.o." to
"JetBrains s.r.o. and Kotlin Project contributors"
Update only 2 lines copyright.

Original commit: 65244b4bea
2019-04-23 20:09:22 +03:00
Vyacheslav Gerasimov 591730b799 Remove as32 bunch files
Original commit: 2bc11cbd58
2019-04-23 17:28:41 +03:00
Vyacheslav Gerasimov a05f1589d9 Remove 181 bunch files
Original commit: 952d2b6287
2019-04-23 17:28:41 +03:00
Vyacheslav Gerasimov 8afab9fe4f Switch to 191 platform
Original commit: 8723ad4f46
2019-04-22 21:52:19 +03:00
Alexey Tsvetkov bf6a8abc0e Rename SourceFileToPathConverter->FileToPathConverter
Original commit: 77d74a261d
2019-04-22 15:27:58 +03:00
Alexey Tsvetkov 78ec448ca3 Test JPS Kotlin caches don't change when project root is different
Original commit: f66d95545d
2019-04-22 15:27:57 +03:00
Alexey Tsvetkov 4e36f6ef9f Disable scripting plugin in JPS tests
JVM compiler loads scripting plugin by default,
which in turn performs script template discovery
in compile classpath.

Classloading and template discovery takes noticeable
amount of time in JPS tests, because of
relatively big number of short compilations.

Disabling scripting plugin in most JPS+JVM tests
speeds up JPS tests by ~8% compared to the result before all
optimizations.

Original commit: ea4fc0fb6b
2019-04-22 15:27:56 +03:00
Alexey Tsvetkov 1f549f32db Keep application environment alive between JPS tests
This speeds up JPS tests by ~16% compared to the result before all
optimizations. The speedup comes mostly from avoiding re-reading jar
files (like kotlin-stdlib.jar).

Original commit: 175dd5679c
2019-04-22 15:27:55 +03:00
Alexey Tsvetkov 5ef534b8a5 Rebuild once after each JPS test
After each test we rebuild everything,
then we compare incremental caches and output
with caches and output after rebuild.

For some reason we did rebuild and comparison
twice per test. This seems excessive.

Removing the second rebuild speeds up JPS tests by ~15%
compared to the result before all optimizations

Original commit: 80c99eceff
2019-04-22 15:27:54 +03:00
Alexey Tsvetkov 321abd7180 Store relative paths in JPS caches if possible
So caches can be relocated from one machine to another

Original commit: 61fbe43a3f
2019-04-22 15:27:53 +03:00
Alexey Tsvetkov 8a49c29a36 Allow customizing source file path conversion in lookup storage
Original commit: 00de7b6c44
2019-04-22 15:26:34 +03:00
Alexey Tsvetkov 67c5919029 Allow customizing source file path conversion in local IC caches
Original commit: 79337a6b96
2019-04-22 15:26:34 +03:00
Ilya Chernikov 0baf2dbfc5 Move scripting support classes to the scripting compiler impl module
Original commit: a65dafc37d
2019-04-17 22:03:58 +02:00
Mikhael Bogdanov e6fbfcb35b Support parallelization in another IDE tests
Original commit: 0d3f03a15a
2019-04-17 11:22:18 +02:00
Mikhael Bogdanov 52d7a2a3c7 Get rid of redundant UsefulTestCase
Original commit: 18f76c31ca
2019-04-17 11:22:18 +02:00
Vyacheslav Gerasimov 5b7fdac88d Build: Embed projects not published to maven into kotlin-plugin.jar
Original commit: d554b5aafa
2019-04-10 17:54:05 +03:00
Vyacheslav Gerasimov 7c8d217ce2 as35: Upgrade to AS 3.5 C10
Original commit: 83764c113f
2019-04-09 15:06:22 +03:00
Nikolay Krasko 4d473389a2 Remove platform comparisons based on string dictionary order (KT-30356)
Comparison was changed in https://github.com/JetBrains/kotlin/commit/fac356c690891236dc7a97d82c2a6a8e1d33bcfd#diff-0895a6eaf69b9fd4d43f83db9889d103R109

 #KT-30356 Fixed

Original commit: 03c6e23448
2019-04-06 20:44:05 +03:00
Alexey Tsvetkov d7b2901448 Always run codegen when IC is enabled
We may need to run code generation when no source files are specified
for incremental compilation (to update caches & metadata)

Original commit: 97d3d38374
2019-03-25 16:39:47 +03:00
Alexander Udalov cc74d63a98 Rework how built-in types are loaded in compiler for JVM
In TopDownAnalyzerFacadeForJVM, we now always use the "load built-ins
from module dependencies" behavior that was previously only enabled with
the dedicated CLI argument -Xload-builtins-from-dependencies. However,
sometimes we compile code without kotlin-stdlib in the classpath, and we
don't want everything to crash because some standard type like
kotlin.Unit hasn't been found.

To mitigate this, we add another module at the end of the dependencies
list, namely a "fallback built-ins" module. This module loads all
built-in declarations from the compiler's class loader, as was done by
default previously. This prevents the compiler from crashing if any
built-in declaration is not found, but compiling the code against
built-ins found in the compiler is still discouraged, so we report an
error if anything is resolved to a declaration from this module, via a
new checker MissingBuiltInDeclarationChecker.

Also introduce a new CLI argument -Xsuppress-missing-builtins-error
specifically to suppress this error and to allow compiling code against
compiler's own built-ins.

 #KT-19227 Fixed
 #KT-28198 Fixed

Original commit: ed86757817
2019-03-22 14:59:03 +01:00
Vyacheslav Gerasimov 63f1428139 Build: Improve intellij-sdk repo up-to-date check time & layout
Up-to-date check is very heavy for intellij repo due to artifact size.
If module directory in repo is written only by one task we can assume
that task if up-to-date if target directory exists.

Original commit: fc8be48fa8
2019-03-20 21:29:13 +03:00