Commit Graph

1505 Commits

Author SHA1 Message Date
Dmitriy Dolovov 403f7a9bb5 HMPP: Backward-compatible Kotlin facet serialization
^KT-38634

Original commit: 9d27ba5b59
2020-04-29 19:19:54 +07:00
Alexey Tsvetkov 6f7fffbffc JPS: remove outputs for additional dirty files for current iteration
JPS does not remove output files for files marked as dirty
for current iteration. This is a problem for adding complementary files
during JPS MPP IC.
If output files are not removed, the compiler might raise an error
for duplicated actual declarations.

Original commit: 06275a201c
2020-04-18 06:05:44 +03:00
Alexey Tsvetkov 334ae8b2b7 Remove dirty output files when expanding IC scope early
Previously IC could go to the next iteration without removing
outputs for the files compiled during the last iteration.
For example, it could happen, when a multifile part is changed
(we add sources for other parts and recompile everything together).

In case of MPP it could lead to compile error, because
the compiler would see the same actual declarations from dirty sources
and dirty outputs from previous iteration (which should have been removed).
That behaviour did not raise an error before a5c976d0f751830704daa8b7386fcc288139c35c
because actual declarations from binaries (e.g. compile classpath) were ignored.

    #KT-35957 Fixed

Original commit: 4ccec5218f
2020-04-18 06:05:44 +03:00
Alexey Tsvetkov c3abb27b31 Add test for KT-35957
Original commit: 2442abadc3
2020-04-18 06:05:44 +03:00
Alexey Tsvetkov 2af9acb32a Minor: move non-JPS MPP IC tests under incremental/mpp dir
Original commit: 876d6d209f
2020-04-18 06:05:44 +03:00
Dmitriy Dolovov 11523fc8c4 HMPP: Fix serialization of TargetPlatform in Kotlin facet
Original commit: fee6a752e0
2020-04-14 21:07:22 +07:00
Dmitriy Dolovov c2291ab234 JVM, JS: Use faster checks in IdePlatformKind.supportsTargetPlatform()
Original commit: 76b0e7994b
2020-04-14 21:07:06 +07:00
Dmitriy Dolovov 382884f273 HMPP: Parameterize NativePlatform with KonanTarget
Original commit: 8d2e999776
2020-04-14 21:06:48 +07:00
Sergey Rostov 24a2194a77 JPS: provide SourcesPreprocessor extension point
Original commit: fd9bec81cf
2020-04-13 18:02:08 +03:00
Alexey Tsvetkov da1c48254d Add tests for lookup tracker with JS KLIB compiler
Original commit: 6acf9385bd
2020-04-10 05:35:45 +03:00
pyos 4fe55d228f JVM_IR: delay writes to the source map until generateMethod
`generateMethodNode` should not have any side effects for the output to
be stable under incremental compilation.

Original commit: 9ed73439f8
2020-04-08 07:04:16 +02:00
pyos 5c27cf0c71 JVM_IR: reuse MethodNodes for inline functions in same module
This fixes the weird cases when a class gets overwritten by an imperfect
copy, reduces the number of classes in the output if an inline function
contains an inline call that causes it to have regenerated anonymous
objects, and makes inlining of same module functions a bit faster in
general. On the other hand, this may increase memory footprint a bit
because classes cannot be flushed to the output jar, as the inliner
would not be able to locate classes for anonymous objects if they have
already been unloaded from memory.

Original commit: 82899e6243
2020-04-08 07:04:16 +02:00
Konstantin Tskhovrebov 2386a0b1ee Add native run tasks data to KotlinTarget.
Original commit: e1a88de314
2020-04-07 16:09:02 +03:00
Ilya Gorbunov e1a6bef0ec Make use of contracts of time measurement functions
Original commit: fcada0a5e3
2020-04-03 19:36:36 +03:00
Dmitriy Dolovov be8edcdb19 Rename: KonanPlatform, KonanPlatforms -> NativePlatform, NativePlatforms
Original commit: 9bbfe9c1ac
2020-03-29 23:20:52 +07:00
Vyacheslav Gerasimov c06a236e36 Always checkout/checkin text files with lf endings
Different line endings on linux/windows prevents gradle from reusing
build cache since endings make task inputs completely different between
systems

Original commit: bcefa68df0
2020-03-18 22:33:15 +03:00
Alexander Udalov be41b87602 Minor, fix typo in KotlinChunk.kt
#KT-37159 Fixed

Original commit: 43d6ddd405
2020-03-13 11:06:46 +01:00
Vyacheslav Gerasimov 8b1e8995ed Build: Make all compile dependencies on toolsJar compileOnly
tools.jar differs between different versions of JDK reducing cache reuse
so better to not leak it to other modules

Original commit: 0db69cadb6
2020-02-29 16:35:54 +03:00
Ilya Kirillov 98106d300c Don't show IR_COMPILED_CLASS error in IJ when it arises in module with backend IR enabled
The problem here is that library resolver uses global project compiler
settings instead of the module ones. That behaviour is caused by more
global problem described in #KT-21246

As a temporary solution we just do not show IR_COMPILED_CLASS error in
IDE if it arises in a module which have -XuseIR or
-Xallow-jvm-ir-dependencies option provided

#KT-36907 fixed

Original commit: 97e320b57f
2020-02-28 11:45:51 +03:00
Nikolay Krasko 561395d62e Enable mute test with database in BaseKotlinJpsBuildTestCase
Original commit: 26df2a5c68
2020-02-28 11:36:34 +03:00
Pavel Kirpichenkov 3c2874763b [JPS-TESTS] Update incremental compilation test for 1.4
Bug fix `NoConstantValueAttributeForNonConstVals` removes constant attribute from non-constant properties.
Code using such properties does not have to be recompiled, since its value is no longer inlined.

Original commit: 6ed1cc5cd8
2020-02-18 18:31:47 +03:00
Pavel Kirpichenkov 78613c8382 [minor] Update build output in test to fit NI
Original commit: 32e1ec8e98
2020-02-18 11:19:19 +03:00
Pavel Kirpichenkov 35d8adcc68 [JPS-TEST] Update test checking JPS build with NI in IDE
Set explicit 1.3 version to disable NI during compilation

Original commit: 64590cc56b
2020-02-18 11:19:19 +03:00
Mikhail Zarechenskiy e42bedfc44 Update test about lookups for SAMs after enabling NI
In NI we don't perform lookup if argument is obviously can't be
 adapted by SAM conversion (and here there is no argument at all)

Original commit: dfe23e770c
2020-02-17 12:38:21 +03:00
Pavel Kirpichenkov ce680b3c68 [JPS-TEST] Update deprecated language version in test
Original commit: 05b00a1302
2020-02-17 10:56:46 +03:00
Pavel Kirpichenkov 0250968618 Use LATEST_STABLE version during prerelease in VersionView
^KT-36644 Fixed

Original commit: bd3b23b933
2020-02-17 10:56:41 +03:00
Steven Schäfer 11798e296b JVM IR: Implement LookupLocation in IrSourceCompilerForInline
This is used when compiling calls to inline functions with a different
@JvmName for incremental compilation.

Original commit: 76f8109ff6
2020-02-13 14:46:35 +01:00
Nikolay Krasko e407ead58e 201: openapi.jar is removed
Original commit: 162c2f3dc9
2020-02-11 20:27:59 +03:00
Dmitriy Dolovov bf9b0d8097 Rename :kotlin-native:kotlin-native-library-reader to :native:frontend.native
Original commit: b49e6ac581
2020-01-29 20:30:29 +07:00
Ilya Gorbunov 93d5015b46 Migrate tests to release coroutines
where it's not essential to use experimental ones

#KT-36083

Original commit: 30bccc431b
2020-01-29 09:12:41 +03:00
Alexey Tsvetkov 9a820cde31 Add IC scope expansion tests
#KT-13677
  #KT-28233

Original commit: c912f76d6f
2020-01-21 16:36:36 +03:00
Alexey Tsvetkov d0f1feadf0 Remove some unneeded gradle specific IC logs
They stoped being different from JPS logs for some time

Original commit: b979be701e
2020-01-21 16:36:36 +03:00
Alexey Tsvetkov d45f2e625b Recompile all dirty files in case of error
Original commit: ef83431618
2020-01-21 16:36:36 +03:00
Alexey Tsvetkov 14b4f22484 Expand compilation scope for IC before backend is run
Sometimes IC raises compilation errors when rebuild succeeds.
This happens because IC uses serialized decriptors
for non-dirty files. Serialized descriptors can be different
from source file descriptors. For example, a source file
may contain an implicit return type or an implicit visibility
for overridden methods, but serialized descriptors always
contain explicit return types & methods' visibilities.

These problems can be solved by expanding a scope of incremental compilation
just after the analysis, but before error reporting & code generation.
In other words, we need to compare descriptors before error reporting and code generation.
If there are new dirty files, current round of IC must be aborted,
next round must be performed with new dirty files.

This commit implements IC scope expansion for JS Klib compiler

    #KT-13677
    #KT-28233

Original commit: 2d598d50d7
2020-01-21 16:36:36 +03:00
Alexander Udalov 6ba4a7710f Regenerate tests
Original commit: 8a4510c21b
2020-01-02 10:31:00 +01:00
Vyacheslav Gerasimov 948885e4dc as40: Upgrade to AS 4.0 C7
Original commit: 68f1d91e1b
2019-12-25 20:19:36 +03:00
Michael Kuzmin 2b4a170517 Build: Drop IntelliJ 2018.3 and Android Studio 3.4 support
Delete *.183 and *.as34 bunch-files

Original commit: 254dc8f71c
2019-12-19 18:31:07 +03:00
Dmitry Gridin e0de867600 idea: cleanup code
Original commit: 8dbbd64beb
2019-12-17 13:56:48 +07:00
Dmitriy Novozhilov 3a4e06af13 [TEST] Regenerate tests after previous commit
Original commit: e7f8c8e155
2019-12-12 16:11:45 +03:00
pyos 4e55addc99 JVM_IR: keep offsets of const val reads when inlining them
Original commit: 3e67ff097e
2019-11-29 16:49:52 +01:00
Yan Zhulanow 1e588023f2 EA-216005: Do not request KotlinFacetSettingsProvider for dead projects
Original commit: 49bcb103ef
2019-11-25 17:26:28 +09:00
Pavel Kirpichenkov 96dcadf178 Add frontend checks for missing dependency supertypes
Call checker and declaration checker are used in order to preserve backward compatibility.
Attempt to use classifier usage checker was not good enouth,
since not all errors found with it would actually be reported before.
For example types and constructor calls don't cause supertypes to resolve,
so missing supertypes would not lead to errors in case they are the only use of class name.

Updated tests failing due to missing Java dependencies in superclasses.

Original commit: 8c52bb4212
2019-11-18 12:06:41 +03:00
Roman Artemev 427bea1108 [IC] Unmute IC klib tests
Original commit: 3e3cb8734b
2019-11-08 14:14:59 +03:00
Alexey Tsvetkov 28df6e463b Use Klib JS serializer protocol for IC
Original commit: d776e92111
2019-11-08 14:14:58 +03:00
Alexey Tsvetkov 81d78949c3 Fix proto comparison for fields mapped to type table
Original commit: 28e6219b0b
2019-11-08 14:14:58 +03:00
Nikolay Krasko f8d8f666c9 Mute IncrementalJsKlibCompilerRunnerTestGenerated tests (KT-34538)
#KT-34538 Fixed

Original commit: ebf5e4b590
2019-10-23 12:49:49 +03:00
Nikolay Krasko d7f92f56ff Regenerate tests with TargetBackend.ANY remove and using runTest with this
Original commit: 4ed64b0283
2019-10-23 12:49:48 +03:00
Yan Zhulanow bf23cca78c Make KotlinFacetSettingsProvider.getInstance() nullable
A module may not have a KotlinFacet.
It isn't correct to throw an exception in that case.

Original commit: 44b7a5cc36
2019-10-08 18:17:06 +09:00
Dmitry Savvinov bd153b0606 Refactor MPP versioning
- Use 'null' as indicator of non-MPP version. Consequently, remove
useless 'isMpp' method, and lift all methods to extensions (to be able
to call them on nullable 'facetSettings.mppVersion')

- Change semantics of extensions to check for exact equality rather than
for "at least specified version"

- Deprecate old MPP-versioning in favour of 'facetSettings.mppVersion'

Original commit: 958a7d9315
2019-10-02 16:52:39 +03:00
Dmitry Savvinov 022f9106b1 Minor: simplify condition in KotlinFacetSettings
Original commit: dbd352e2ba
2019-10-02 16:52:39 +03:00