Commit Graph

272 Commits

Author SHA1 Message Date
justin.wei 34274dd032 Support relocatable cache for InputCache 2021-03-03 11:25:58 +03:00
Aleksei.Cherepanov 07d11508a7 Generate JvmMultifileClass tests for Gradle 2021-02-26 11:31:17 +03:00
Denis.Zharkov e6b61ecc22 Fix incorrectly generated tests 2021-02-26 10:46:54 +03:00
Denis.Zharkov 4fffe7b9c8 FIR: Fix VerifyError caused by private delegates
^KT-45048 Fixed
2021-02-25 19:30:15 +03:00
Ivan Gavrilovic 2fce6a4af9 Locate build history when file is outside of root project dir
Support use-cases when the build dir is outside of root project dir.
Many projects set up output dir as <root_project>/../out/<project_name>/build
to be able to clean build dir more easily. This commit adds support
to build history file detection and it tries to find build history
files for artifacts that are:
- under root project dir (a default structure)
- under root project's build dir parent (to support typical custom setup)

Fixes https://youtrack.jetbrains.com/issue/KT-40875

Test: BaseIncrementalCompilationMultiProjectIT
2021-02-02 12:47:07 +03:00
Denis.Zharkov 7e6abffb62 FIR: Fix incorrectly serialized type
See the test added: there's a non-denotable T!! type inside flexible type
that wasn't handled before.

ConeKotlinType::contains handles flexible types content and some other cases
Also, it has better asymptotics
2021-01-29 10:50:23 +03:00
Alexander Udalov 1deb317e0d Update and regenerate incremental compilation tests for 1.5
Set TargetBackend.JVM_IR for these tests by default; remove the
generated IR-based test and add a new old-backend-based test. This fixes
the issue where some (3) of these tests were not properly ignored
because of incorrect target backend used in the test generator.

Also update test data for some tests which use local functions, which
are not generated to separate anonymous classes in JVM IR.
2021-01-28 13:19:27 +03:00
Roman Artemev 350ff8033d [IC KLIB] Replace JS IR build log with KLIB build log for klib compialtion
- fix test data
2021-01-26 19:23:25 +03:00
Roman Artemev 04777d2ff2 [IC TEST] Generate legacy js multi module IC tests 2021-01-26 19:23:24 +03:00
Roman Artemev 898c0470dc [IC TEST] Implement legacy js multi module gradle-like test infra 2021-01-26 19:23:24 +03:00
Roman Artemev 43022a292d [IC TEST] Abstract multi module test runner from klib 2021-01-26 19:23:24 +03:00
Roman Artemev 5b1c70a430 [KLIB IC] Generate multi module klib IC tests 2021-01-26 19:23:24 +03:00
Roman Artemev 10d8e95df7 [IC TEST] Support multi module IC tests for klibs
- implement required infrastructure
 - pass changed class path dependencies
2021-01-26 19:23:24 +03:00
Roman Artemev 9aeda12b99 [KLIB IC] Produce .klib file instead of directory in test
- disable sourcemaps
 - clean up comment
2021-01-26 19:23:24 +03:00
Roman Artemev 939da9dbc8 [KLIB] Take into account *.klib rebuild similar to *.jar
Fix multi-module incremental compilation. Fix allows to trigger klib
rebuild when dependency changed.
2021-01-26 19:23:23 +03:00
Roman Artemev 380225e0cb [KLIB IC] Support special klib-build.log in IC test infrastructure 2021-01-26 19:23:23 +03:00
Roman Artemev 96ba3b873e [IC] Add in-module tests for incremental compilation
Two tests to check recompilation when parameter with default value was
added or removed without changing use-site.
2021-01-26 19:23:23 +03:00
Alexander Udalov ed9a0e514d Regenerate tests and fir-tree 2021-01-03 14:53:41 +01:00
Dmitriy Novozhilov bc7e18fb8a [TEST] Regenerate tests after previous commit 2020-12-16 19:52:28 +03:00
Dmitriy Novozhilov 64ce307f7f [TEST] Drop mechanism for muting tests with .mute files
This mechanism is deprecated and replaced with muting in database (.csv files)
2020-12-16 19:52:27 +03:00
Dmitriy Novozhilov f8ad096abb [TEST] Mute tests in IC JS Klib tests using exclude pattern instead of .mute file 2020-12-16 19:52:27 +03:00
Dmitriy Novozhilov c8f3a4802e [TEST] Introduce test-infrastructure-utils module and extract common test utilities here 2020-12-16 19:52:22 +03:00
Andrey Uskov 9be7221efd Clear IC caches if they were not properly closed 2020-12-13 20:17:27 +03:00
Andrey Uskov 275a02ce88 Fix synchronization when working with IC caches
IC caches could be modified and read from different threads.
In JPS builder these threads are RMI worker (invoked from Compiler
Daemon) and JPS worker thread. Proper synchronization fixes cases
when caches could become broken.
#KT-42265 Fixed
#KT-42194 Fixed
#KT-42265 Fixed
#KT-42937 Fixed
2020-12-13 20:17:22 +03:00
Andrey Uskov 2e607335db Add tests for incremental compilation of sealed interfaces 2020-12-13 20:17:18 +03:00
Andrey Uskov 36f99156fd IC of sealed classes
Supported case then children of sealed classes could be declared
anywhere in a module. If list of classes implementing sealing class
changes the sealed class and all its inheritors should be recompiled
(now sealed class should be compiled together with children in order
to calculate all possible inheritors at compile time) and and
invalidated (as they could have when operators).
2020-12-13 20:17:16 +03:00
Dmitriy Novozhilov 3246e6b9ac [IC] Add ability to pass additional compiler args to IC tests
Additional arguments should be declared in `args.txt` file in test
  directory in common CLI arguments format
2020-12-09 22:54:36 +03:00
Ilya Gorbunov b2b2629e79 Use new kotlin.io.path API in tests 2020-11-20 09:03:25 +03:00
Alexey Tsvetkov 36387d97ad Add IC metrics reporting 2020-11-05 23:26:46 +03:00
nataliya.valtman e1a380ec95 KT-34862 use relative path for incremental build cache 2020-10-27 10:45:06 +03:00
Alexey Tsvetkov c56952a01e Provide message collector for Java IC analysis
#KT-37446 Fixed
2020-09-16 14:04:51 +03:00
Alexander Udalov 425b192a5f Fix warnings in build-common/daemon code 2020-08-20 14:58:11 +02:00
Georgy Bronnikov 8e24256f95 JVM_IR: avoid descriptors when tracking inline properties
Preparing to use wrapped properties in InlineCodegen.
2020-07-02 12:46:58 +03:00
Denis Zharkov 3ce980fd88 Fix incremental compilation for calls to inner classes from supertypes
The problem became actual after 8c2baf0704
2020-07-01 06:55:52 +03:00
Roman Artemev cc818025df [KLIB IC] Add test about incremental kotlin-js-stdlib-klib recompliation 2020-06-22 11:30:40 +03:00
Alexander Udalov 6e67e1e78d Replace appendln with appendLine in project 2020-06-11 13:01:30 +02: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
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
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
Nikolay Krasko 2340a86d8d Update to 201.5259.13-EAP-SNAPSHOT
- No UIUtil.removeLeakingAppleListeners anymore
- getParameterHints nullability
- versions of lz4-java and guava were changed
2020-02-18 14:13:55 +03:00
Alexey Tsvetkov ee2e40ce6b Regenerate test 2020-02-17 13:14:04 +03:00
Alexey Tsvetkov d3a93b2015 Remove unneeded IncrementalCompilerRunner#postCompilationHook
The method is no longer needed, since the only implementation is empty.
2020-01-21 16:36:37 +03:00
Alexey Tsvetkov ba0ce92159 Report messages only after IC scope expansion converged
Incremental compilation scope (set of files to be compiled)
could be expanded, even if the frontend reported some errors
to a message collector.
The next iteration of IC could produce a different set of
compiler messages, so we want to report them only after
scope expansion converged.
2020-01-21 16:36:36 +03:00
Alexey Tsvetkov c912f76d6f Add IC scope expansion tests
#KT-13677
  #KT-28233
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
Alexey Tsvetkov a950226602 Format and cleanup incremental-compilation-impl 2020-01-21 16:36:36 +03:00
Alexey Tsvetkov 5816722a64 Minor: remove unused property 2020-01-21 16:36:36 +03:00