Commit Graph

523 Commits

Author SHA1 Message Date
Aleksei.Cherepanov bdf229bc5c [JPS] Ignore classpath from facets to exclude jars from gradle build
Reimport after `./gradlew build` adds jars from gradle's `build/libs` to facet's classpath. That causes problems with JPS build, because it doesn't see changes in out folder, but see unchanged jar, so changes don't apply.

#KT-51873 Fixed

Merge-request: KT-MR-6018
Merged-by: Aleksei Cherepanov <aleksei.cherepanov@jetbrains.com>
2022-04-18 11:20:40 +00:00
Ilya Chernikov c4a29651b0 FIR IC: fix test with behavior different from non-tight cycle variants 2022-03-30 08:34:51 +00:00
Ilya Chernikov 5abdf93d3b IC: Add IC test with fix on rename file with only class inside
"fails" on JS and JPS tests - the IC logic there is less precise.
2022-03-30 08:32:17 +00:00
Ilya Chernikov aa0386276d Fix FIR incremental compilation failure with inlines and lambdas
#KT-51546 fixed
2022-03-14 13:37:50 +03:00
Aleksei.Cherepanov 76637a8844 Fix JPS test after 9e1a771d 2022-01-31 12:55:37 +03:00
Aleksei.Cherepanov 0e0b3e6d75 Add test of Kotlin Lombok project compilation
This test checks that the project with Lombok plugin will be compiled successfully after successful import (KTIJ-20506)

#KTIJ-20641 Fixed
2022-01-28 13:30:42 +00:00
Hung Nguyen 9e1a771d57 KT-44741: Update test data to use companion object with custom name
Test: Existing IncrementalJvmCompilerRunnerTestGenerated.PureKotlin#testCompanionConstantChanged
    and similar *.PureKotlin#testCompanionConstantChanged tests
2022-01-27 02:34:42 +03:00
Aleksei.Cherepanov 9971ae4ffd Revert "Fix org.jetbrains.kotlin.jps.build.KotlinJpsBuildTest#testSourcePackageLongPrefix"
This reverts commit e3634c16
2022-01-26 10:03:06 +00:00
Aleksei.Cherepanov 44d796e850 Fix JPS tests after JPS module moved to Kotlin repo
Fix testdata of new compiler tests for JPS, as it is build-log-sensitive:
ClassHierarchyAffected.testWithIntermediateBodiesChanged
PureKotlin.testSerializedSubClassAndChangedInterfaces
WithJava.JavaUsedInKotlin.testRawErrorTypeDuringSerialization

Mute JavaUsedInKotlin.SamConversions tests, as it was fixed in 212 idea

Add missed part of commit 5f4be072 [JPS] Fix JS incremental compilation
Part of commit, located in JPS module, was missed during JPS relocation

Fix test MixedInheritance for non-JPS builds
Depends on commit [CHERRY PICKED FROM IJ] [testdata] Replace test IncrementalJvmJpsTest...
2022-01-26 10:03:05 +00:00
Aleksei.Cherepanov 411a0ecc38 [CHERRY PICKED FROM IJ] [testdata] Replace test IncrementalJvmJpsTestGenerated.WithJava.JavaUsedInKotlin.testMixedInheritance with new one
Replace test because JPS recompile inherited classes only in case of existence of direct use (like override or direct call of parent methods).
Tested cases:
*Add new abstract method when derived class does not abstract
*Add and remove method, when such method is present in derived class
*Change return type/access modifier

GitOrigin-RevId: 767e58ba3d3e4069838c717666329b43f1b8e936
Original commit: https://github.com/JetBrains/intellij-community/commit/d738c61aaefe95acd8130066f53f8d8bcadfa977
2022-01-26 10:03:04 +00:00
Aleksei.Cherepanov 7181244129 [CHERRY PICKED FROM IJ] Fix test IncrementalJvmJpsTestGenerated$WithJava$Other.testMultifileClassFileAdded
Fix test data and also remove useless marking of multifiles in KotlinBuilder after 2ee7f2b "incremental annotation processing environment" as it makes the same thing and all results are ignored

GitOrigin-RevId: 379eb3f350539cb1ee27098eecb28931df73b626
Original commit: https://github.com/JetBrains/intellij-community/commit/ee2865c35c2dadc3651518b2760b5176835b251c
2022-01-12 15:25:22 +01:00
Aleksei.Cherepanov dc9abef6e5 [CHERRY PICKED FROM IJ] [testdata] Fix Jps tests testdata
Fix test IncrementalJvmJpsTestGenerated$PureKotlin.testPackageFileAdded
Fix test IncrementalJvmJpsTestGenerated$Custom.testCommonSourcesCompilerArg
Fix test IncrementalJvmJpsTestGenerated$WithJava$JavaUsedInKotlin$SamConversions.testMethodAddDefault

GitOrigin-RevId: 63b7a47898ca42b4d7f11a01ceb0e019933f528b
Original commit: https://github.com/JetBrains/intellij-community/commit/e91bfb29e65b9eb5452c4d5f544f0bbfa3eafde3
2022-01-12 15:25:21 +01:00
Aleksei.Cherepanov 2ea089f0d2 [CHERRY PICKED FROM IJ] 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. Add tests.

#KT-49177 Fixed

GitOrigin-RevId: 01a58cf10f5419d70f0d80cbaa9bcd9732ff0547
Original commit: https://github.com/JetBrains/intellij-community/commit/d077f3b3217c8d88518fec7249228cb29df2e0ff
2022-01-12 15:25:20 +01:00
Stanislav Erokhin 3b6cdb071f [CHERRY PICKED FROM IJ] [testdata] Fix testdata for IncrementalJvmJpsTestGenerated.WithJava.JavaUsedInKotlin#testConstantChanged
Previously, because the package in java file was used, generated test runner file was incorrect

GitOrigin-RevId: 3fcf599a26a0789154c550e6ac4aafe0829ce0d1
Original commit: https://github.com/JetBrains/intellij-community/commit/cbe50ad2423fbdb6e18541ecb040bdb0c67af7fd
2022-01-12 15:25:20 +01:00
Aleksei.Cherepanov 6c7a6bf3b1 [CHERRY PICKED FROM IJ] Simplify API for InlineConstTracker and add testdata
GitOrigin-RevId: b2bcde9e3102d575ca459f475c00022515b6ccba
Original commit: https://github.com/JetBrains/intellij-community/commit/f78e98d1ba5b6c142076b67f88c54282c3964c7f
2022-01-12 15:25:20 +01:00
Aleksei.Cherepanov 40dc548fec [CHERRY PICKED FROM IJ] [JPS] Fix incremental build after changing Java constant
InlineConstantTracker implemented for tracking changed java static final constants, that used in kotlin.

#KT-46506 Fixed

GitOrigin-RevId: 63830580acb09d31fe0deede9f82bc1a2847443d
Original commit: https://github.com/JetBrains/intellij-community/commit/3736c00c2c8757241e6fd217faef733421eb9e80
2022-01-12 15:25:19 +01:00
Nikita Bobko fddb205e16 KotlinJpsBuildTest#testJre9: migrate to JDK 11
Possibility to use JDK 9 was dropped in the Kotlin repo in
this commit de7fb9606a so I had to migrate this test.

Consulted with @udalov. He said that it's fine to migrate this test to JDK 11
2022-01-12 15:25:18 +01:00
Nikita Bobko e3634c1635 Fix org.jetbrains.kotlin.jps.build.KotlinJpsBuildTest#testSourcePackageLongPrefix
The test started failing after cherry-picking it from intellij repo
(in intellij repo it was passing without this commit)
2022-01-12 15:25:12 +01:00
Nikita Bobko 8d2755db4f Fix KotlinModuleXmlGeneratorTest
modules.xml testData was renamed from idea/testData/modules.xml/
2022-01-12 15:25:11 +01:00
Mikhail Zarechenskiy 8b2f4d1ef0 [CHERRY PICKED FROM IJ] [kotlin] update testdata for incremental jps tests
Since Kotlin 1.5 SAM conversion are working via invokedynamic

GitOrigin-RevId: a6ba80fe559619f79ce1caf4e04e0cdeb1f2487a
Original commit: https://github.com/JetBrains/intellij-community/commit/846889f31c982dd3015b585309c36d05c29e98b6
2022-01-12 15:10:57 +01:00
Mikhail Zarechenskiy 3cf5d218a2 [CHERRY PICKED FROM IJ] [kotlin] misc: update testdata after switching to 1.5
GitOrigin-RevId: 3901d27f26b349b4fbf40d50bad6a37f06c1182e
Original commit: https://github.com/JetBrains/intellij-community/commit/974ddc03c2228a1135ff84658c04424a72684d2e
2022-01-12 15:10:57 +01:00
Andrei Klunnyi f3d5a71c34 [CHERRY PICKED FROM IJ] Test marathon: MultiplatformJpsTestWithGeneratedContentGenerated (Js)
The following tests are outdated (JPS/Js is no longer supported):
- MultiplatformJpsTestWithGeneratedContentGenerated$Simple.testEditingPJsKotlin
- MultiplatformJpsTestWithGeneratedContentGenerated$SimpleNewMpp.testEditingPJsKotlin

GitOrigin-RevId: e4c4b5a75b39803bc5df966a3d957e5ab0f253b1
Original commit: https://github.com/JetBrains/intellij-community/commit/49542e2cce00b08f87c0c91093dff4e8c9df1032
2022-01-12 15:10:53 +01:00
Andrei Klunnyi 4e260345a4 [CHERRY PICKED FROM IJ] Test marathon: MultiplatformJpsTestWithGeneratedContentGenerated (Native)
The following tests are outdated (JPS/Native is no longer supported):
- MultiplatformJpsTestWithGeneratedContentGenerated$IgnoreAndWarnAboutNative.testEditingCKotlin
- MultiplatformJpsTestWithGeneratedContentGenerated$Simple.testEditingCKotlin
- MultiplatformJpsTestWithGeneratedContentGenerated$SimpleNewMpp.testEditingCKotlin

GitOrigin-RevId: 6e81a4a86a480563992b6fbde4ecbf47571bb49e
Original commit: https://github.com/JetBrains/intellij-community/commit/2a3a84bfa69853efd0be2eaca183cd615af03080
2022-01-12 15:10:53 +01:00
Dmitry Gridin bb0b785c59 [CHERRY PICKED FROM IJ] KotlinJpsBuildTest: fix tests
GitOrigin-RevId: 51f9595dfb5f0ba280bab935e5945384dfe7e487
Original commit: https://github.com/JetBrains/intellij-community/commit/18bf77b87f8b89f6a6827176ce61215f2a69f0c4
2022-01-12 15:10:47 +01:00
Nikita Bobko 3033cf0a03 [CHERRY PICKED FROM IJ] kotlin-ide migration: Normalization commit
This commit is consequence of not accurate migration to kotlin-ide repo.
These changes appeared as a result of split of big chunk of first
commits in kotlin-ide repo. I don't know where from changes in this
commit come from.

It could be changes of "bunch switch" commit. Or changes of other
accidentally squashed commits

GitOrigin-RevId: 6d1e18c36e02a4ad228fe7ddc5bd056e98e1be36
Original commit: https://github.com/JetBrains/intellij-community/commit/c490f5864de6ef36964aa4ee34cdf7b3f35db384
2022-01-12 15:10:43 +01:00
Nikita Bobko 5d91e54f41 Merge Kotlin JPS plugin
Kotlin JPS plugin existed in Kotlin repo before but was migrated to
intellij-community together with entire Kotlin plugin.
Now I return Kotlin JPS plugin back because it turned out that it's
easier to develop JPS in KT release cycle. Also I need to
unbundle Kotlin JPS plugin in scope of KTIJ-11633
2022-01-12 15:10:21 +01:00
Nikita Bobko db7472a376 Rename: jps-plugin -> jps/jps-plugin 2022-01-12 15:09:45 +01:00
Aleksei.Cherepanov 8b38a752d8 JPS: Fix JvmMultifileClass processing for IR backend
#KT-44644 Fixed

(cherry picked from commit aa683d3b2a)

Original commit: ef3c73554fc64d9837019ed9cf9e512bbd2b20f3
2021-02-19 23:59:11 +03:00
Alexander Udalov 382724d5e9 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.

Original commit: 1deb317e0d
2021-01-28 13:19:27 +03:00
Roman Artemev 442f384321 [IC KLIB] Replace JS IR build log with KLIB build log for klib compialtion
- fix test data

Original commit: 350ff8033d
2021-01-26 19:23:25 +03:00
Roman Artemev fccfdabfc4 [IC TEST] Fix IC multi module tests for gradle
Original commit: b4ed7110dd
2021-01-26 19:23:24 +03:00
Roman Artemev d6afccfef0 [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.

Original commit: daf1da1c70
2021-01-26 19:23:23 +03:00
Roman Artemev bf3414c491 [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.

Original commit: 96ba3b873e
2021-01-26 19:23:23 +03:00
Dmitriy Novozhilov 5c74168fa4 [TEST] Mute tests in IC JS Klib tests using exclude pattern instead of .mute file
Original commit: f8ad096abb
2020-12-16 19:52:27 +03:00
Andrey Uskov 780696565d Add tests for incremental compilation of sealed interfaces
Original commit: 2e607335db
2020-12-13 20:17:18 +03:00
Georgy Bronnikov b154f74b99 JVM_IR: avoid descriptors when tracking inline properties
Preparing to use wrapped properties in InlineCodegen.

Original commit: 8e24256f95
2020-07-02 12:46:58 +03:00
Denis Zharkov 50725dcde2 Fix incremental compilation for calls to inner classes from supertypes
The problem became actual after bba1c88c8e634b707bb39522129d226add3fa90d

Original commit: 3ce980fd88
2020-07-01 06:55:52 +03:00
Dmitry Petrov e9abd4dbf7 JVM: Generate object and companion object INSTANCE fields as @NotNull
Original commit: e9231b5624
2020-06-22 16:28:00 +03:00
Roman Artemev b11a0d3fc6 [KLIB IC] Add test about incremental kotlin-js-stdlib-klib recompliation
Original commit: cc818025df
2020-06-22 11:30:40 +03:00
Ilya Muradyan 68619252a8 Compare lookups without respect to their order
Original commit: 7526ff9484
2020-06-18 09:51:16 +02:00
Alexander Udalov 83ec05b31d 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

Original commit: 012ffa2993
2020-05-12 19:28:57 +02:00
Sergey Rostov 59993b1441 JPS: ignore removed java files
#KT-27458 Fixed

Original commit: 800fcc511a
2020-05-12 16:22:48 +03:00
Mikhail Zarechenskiy 76674906e5 Revert "Add option to enable new inference only for IDE analysis"
This reverts commit 36580d46da.

 #KT-37378 Fixed

Original commit: c01a171d4c
2020-05-04 15:14:43 +03: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
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