Commit Graph

1402 Commits

Author SHA1 Message Date
Ilya Muradyan 7526ff9484 Compare lookups without respect to their order 2020-06-18 09:51:16 +02:00
Nikita Bobko cb8addc4cd 202: Fix NPE in BaseKotlinJpsBuildTestCase.tearDown() 2020-06-15 23:22:20 +03:00
Alexander Udalov 6e67e1e78d Replace appendln with appendLine in project 2020-06-11 13:01:30 +02:00
Nikita Bobko ff7576f8e4 202: Fix compilation 2020-06-10 12:39:29 +03:00
Ilya Chernikov 5e33612238 Extract interface from CompilerMessageLocation to ease extension
The CompilerMessageLocation is an implicit part of the binary daemon
protocol so changing it breaks compatibility with older daemons.
This change allows to extend location for non-daemon uses without
breaking the binary protocol.
2020-06-05 21:58:27 +02:00
Yunir Salimzyanov 3b9000cc0c Cleanup 191 extension files (KTI-240) 2020-06-01 18:43:10 +03:00
Yunir Salimzyanov 8d51b027ed Add annotation to prevent test invocation twice
Cause: it helps to fix double inversion of muted non-flaky tests result
(KTI-216).
2020-05-30 22:50:34 +03:00
Vyacheslav Gerasimov af2dce0549 as41: Build against AS 4.1 C10 2020-05-27 18:46:57 +03:00
Yan Zhulanow 46ac241e2f 202: Fix compatibility with 202 IDEA branch (code) 2020-05-27 02:38:44 +09:00
Sergey Rostov 9574ac83e4 jps: testPureJavaProject fix 2020-05-25 10:06:11 +03:00
Alexander Udalov 012ffa2993 Support new scheme of compilation of OptionalExpectation annotations
Instead of generating these annotation classes as package-private on
JVM, serialize their metadata to the .kotlin_module file, and load it
when compiling dependent multiplatform modules.

The problem with generating them as package-private was that
kotlin-stdlib for JVM would end up declaring symbols from other
platforms, which would include some annotations from package
kotlin.native. But using that package is discouraged by some tools
because it has a Java keyword in its name. In particular, jlink refused
to work with such artifact altogether (KT-21266).

 #KT-38652 Fixed
2020-05-12 19:28:57 +02:00
Sergey Rostov 800fcc511a JPS: ignore removed java files
#KT-27458 Fixed
2020-05-12 16:22:48 +03:00
Mikhail Zarechenskiy c01a171d4c Revert "Add option to enable new inference only for IDE analysis"
This reverts commit a3247b1b92.

 #KT-37378 Fixed
2020-05-04 15:14:43 +03:00
Alexey Tsvetkov 06275a201c 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.
2020-04-18 06:05:44 +03:00
Alexey Tsvetkov 4ccec5218f 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 dc8240c24e
because actual declarations from binaries (e.g. compile classpath) were ignored.

    #KT-35957 Fixed
2020-04-18 06:05:44 +03:00
Alexey Tsvetkov 2442abadc3 Add test for KT-35957 2020-04-18 06:05:44 +03:00
Alexey Tsvetkov 876d6d209f Minor: move non-JPS MPP IC tests under incremental/mpp dir 2020-04-18 06:05:44 +03:00
Dmitriy Dolovov 8d2e999776 HMPP: Parameterize NativePlatform with KonanTarget 2020-04-14 21:06:48 +07:00
Sergey Rostov fd9bec81cf JPS: provide SourcesPreprocessor extension point 2020-04-13 18:02:08 +03:00
Alexey Tsvetkov 6acf9385bd Add tests for lookup tracker with JS KLIB compiler 2020-04-10 05:35:45 +03:00
pyos 9ed73439f8 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.
2020-04-08 07:04:16 +02:00
pyos 82899e6243 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.
2020-04-08 07:04:16 +02:00
Ilya Gorbunov fcada0a5e3 Make use of contracts of time measurement functions 2020-04-03 19:36:36 +03:00
Dmitriy Dolovov 9bbfe9c1ac Rename: KonanPlatform, KonanPlatforms -> NativePlatform, NativePlatforms 2020-03-29 23:20:52 +07:00
Vyacheslav Gerasimov bcefa68df0 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
2020-03-18 22:33:15 +03:00
Alexander Udalov 43d6ddd405 Minor, fix typo in KotlinChunk.kt
#KT-37159 Fixed
2020-03-13 11:06:46 +01:00
Vyacheslav Gerasimov 0db69cadb6 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
2020-02-29 16:35:54 +03:00
Nikolay Krasko 26df2a5c68 Enable mute test with database in BaseKotlinJpsBuildTestCase 2020-02-28 11:36:34 +03:00
Pavel Kirpichenkov 6ed1cc5cd8 [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.
2020-02-18 18:31:47 +03:00
Pavel Kirpichenkov 32e1ec8e98 [minor] Update build output in test to fit NI 2020-02-18 11:19:19 +03:00
Pavel Kirpichenkov 64590cc56b [JPS-TEST] Update test checking JPS build with NI in IDE
Set explicit 1.3 version to disable NI during compilation
2020-02-18 11:19:19 +03:00
Mikhail Zarechenskiy dfe23e770c 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)
2020-02-17 12:38:21 +03:00
Pavel Kirpichenkov 05b00a1302 [JPS-TEST] Update deprecated language version in test 2020-02-17 10:56:46 +03:00
Steven Schäfer 76f8109ff6 JVM IR: Implement LookupLocation in IrSourceCompilerForInline
This is used when compiling calls to inline functions with a different
@JvmName for incremental compilation.
2020-02-13 14:46:35 +01:00
Nikolay Krasko 162c2f3dc9 201: openapi.jar is removed 2020-02-11 20:27:59 +03:00
Ilya Gorbunov 30bccc431b Migrate tests to release coroutines
where it's not essential to use experimental ones

#KT-36083
2020-01-29 09:12:41 +03:00
Alexey Tsvetkov c912f76d6f Add IC scope expansion tests
#KT-13677
  #KT-28233
2020-01-21 16:36:36 +03:00
Alexey Tsvetkov b979be701e Remove some unneeded gradle specific IC logs
They stoped being different from JPS logs for some time
2020-01-21 16:36:36 +03:00
Alexey Tsvetkov ef83431618 Recompile all dirty files in case of error 2020-01-21 16:36:36 +03:00
Alexey Tsvetkov 2d598d50d7 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
2020-01-21 16:36:36 +03:00
Alexander Udalov 8a4510c21b Regenerate tests 2020-01-02 10:31:00 +01:00
Vyacheslav Gerasimov 68f1d91e1b as40: Upgrade to AS 4.0 C7 2019-12-25 20:19:36 +03:00
Michael Kuzmin 254dc8f71c Build: Drop IntelliJ 2018.3 and Android Studio 3.4 support
Delete *.183 and *.as34 bunch-files
2019-12-19 18:31:07 +03:00
Dmitriy Novozhilov e7f8c8e155 [TEST] Regenerate tests after previous commit 2019-12-12 16:11:45 +03:00
pyos 3e67ff097e JVM_IR: keep offsets of const val reads when inlining them 2019-11-29 16:49:52 +01:00
Pavel Kirpichenkov 8c52bb4212 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.
2019-11-18 12:06:41 +03:00
Roman Artemev 3e3cb8734b [IC] Unmute IC klib tests 2019-11-08 14:14:59 +03:00
Alexey Tsvetkov d776e92111 Use Klib JS serializer protocol for IC 2019-11-08 14:14:58 +03:00
Alexey Tsvetkov 28e6219b0b Fix proto comparison for fields mapped to type table 2019-11-08 14:14:58 +03:00
Nikolay Krasko ebf5e4b590 Mute IncrementalJsKlibCompilerRunnerTestGenerated tests (KT-34538)
#KT-34538 Fixed
2019-10-23 12:49:49 +03:00