Commit Graph

516 Commits

Author SHA1 Message Date
Aleksei.Cherepanov 276fb77155 Fix incremental build after changing Java const used as class property
Report Java static final constant with InlineConstantTracker, used as class property in Kotlin for further registration in JPS

#KT-49177 Fixed
2021-10-20 15:06:19 +03:00
Mikhail Glukhikh 3febabe977 Use OPT_IN instead of EXPERIMENTAL in diagnostic names 2021-09-10 16:29:13 +03:00
Victor Petukhov d730db094a Don't look at raw type's arguments while enhancing super types
^KT-48172 Fixed
2021-08-20 13:10:45 +03:00
Mikhael Bogdanov 38fb5e16ef Update test affected by ApproximateIntegerLiteralTypesInReceiverPosition feature 2021-07-29 19:45:54 +02:00
Nikita Bobko 39fa2b0baf Delete Kotlin IntelliJ IDEA plugin sources
Kotlin plugin sources were migrated to intellij-community:
https://github.com/JetBrains/intellij-community/tree/master/plugins/kotlin

Preserve `jps-plugin/testData/incremental`
because it's used in `compiler/incremental-compilation-impl/test`

Preserve `idea/testData/multiModuleHighlighting/multiplatform`
because it's used in `MppHighlightingTestDataWithGradleIT`
2021-07-21 11:23:43 +02:00
Tianyu Geng d3dfb33f89 FIR: consolidate duplicated logic in FirOverrideChecker 2021-06-09 16:27:26 +03:00
Aleksei.Cherepanov 5f4be07225 [JPS] Fix JS incremental compilation
Disable Idea JPS build mechanism for marking all sources of common output if one of them is dirty
Add source-to-outputs map for correctly removing Kotlin/JS outputs

#KT-45763 Fixed
#KT-44351 Fixed
2021-05-27 13:00:56 +03:00
Denis.Zharkov cd401b5b8a FIR: Update integer literal-related tests
They started failing once we began reporting diagnostics from completion

^KT-46419 Relates
2021-05-20 17:24:14 +03:00
Ivan Kochurkin c3b8f3e859 [FIR] Add lValueTypeRef to FirVariableAssignment, fix tests with ASSIGNMENT_TYPE_MISMATCH 2021-05-17 22:33:18 +03:00
Mikhail Glukhikh 0f9f63400e FirSupertypesChecker: implement six more diagnostics 2021-05-13 16:13:43 +03:00
Aleksei.Cherepanov b5ef6c9316 Add tests for SAM conversions
Add tests for KT-45191 [JPS] Marking method as "default" in Java SAM interface doesn't affect dependencies, which was fixed in intlellij(212): cbad0d91 support kotlin-generated lambda usage

#KT-45191 Fixed
2021-04-17 03:36:17 +03:00
vldf 24f1f1221e Introduce FirInitializerTypeMismatchChecker 2021-04-13 21:36:31 +03:00
Mikhail Glukhikh 4bd44fa61b FE 1.0: introduce PrivateInFile effective visibility #KT-20094 Fixed 2021-04-08 09:41:25 +03:00
nataliya.valtman bce677f7f7 Generate tests for companion constant changes 2021-04-06 07:13:13 +03:00
nataliya.valtman df08ed2ac0 Recompile files which import companion constant
#KT-44741 Fixed
2021-03-26 10:27:52 +03:00
Ilya Chernikov 4a79f544f7 FIR: Mute IC test due to java tracking peculiarities
should be fixed after implementing proper java tracking for FIR
2021-03-24 21:24:20 +01:00
Ilya Chernikov 7e08820009 FIR: Mute IC tests with missing FIR diagnostics 2021-03-24 21:24:20 +01:00
Ilya Chernikov 14121a1d9a FIR: Disable java tracking in FIR IC
until it is properly implemented,
fixes some IC tests for now, making it less pecise
2021-03-24 21:24:19 +01:00
Ilya Chernikov ef2bb48706 FIR: fix fir-specific incremental compilation testdata 2021-03-24 21:24:19 +01:00
Aleksei.Cherepanov 07d11508a7 Generate JvmMultifileClass tests for Gradle 2021-02-26 11:31:17 +03:00
Aleksei.Cherepanov aa683d3b2a JPS: Fix JvmMultifileClass processing for IR backend
#KT-44644 Fixed
2021-02-19 23:54:53 +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 b4ed7110dd [IC TEST] Fix IC multi module tests for gradle 2021-01-26 19:23:24 +03:00
Roman Artemev daf1da1c70 [KLIB IC] Fix klib IC test data
Since neither inline function nor super classes affect klib there is no
need for extra passes so compiler doesn't report any dirty files.
Do not check that.
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
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
Andrey Uskov 2e607335db Add tests for incremental compilation of sealed interfaces 2020-12-13 20:17:18 +03: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
Dmitry Petrov e9231b5624 JVM: Generate object and companion object INSTANCE fields as @NotNull 2020-06-22 16:28:00 +03:00
Roman Artemev cc818025df [KLIB IC] Add test about incremental kotlin-js-stdlib-klib recompliation 2020-06-22 11:30:40 +03:00
Ilya Muradyan 7526ff9484 Compare lookups without respect to their order 2020-06-18 09:51:16 +02: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
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
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
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
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
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
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