Commit Graph

299 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
Dmitriy Novozhilov e933c7b6d9 [Build] Remove testApi(intellijDep()) dependencies from all modules
Since IDEA moved most of it's jars to java 11 it's illegal to use them
  in our dependencies, so all modules which use `intellijDep()` should
  carefully specify which jars they use
2021-09-30 14:41:31 +03:00
nataliya.valtman 452dfd6edd Use default performance manager for K2JVMCompiler 2021-09-28 09:20:50 +00:00
Vyacheslav Gerasimov ab146bd6d4 Build: Fix deprecated Gradle configurations usages
for migration to Gradle 7+ #KTI-559
2021-09-26 18:28:44 +03:00
Hung Nguyen f400305cc6 KT-45777: Handle problematic classes when taking snapshots
There are certain classes that we are not yet able to take snapshots of,
either because the class is faulty, or there is a bug in our code.

For these classes, we will use a special snapshot and fall back to the
existing approach to compute classpath changes.

In the short run, we will update this list of cases as they arise. In
the long run, we will:
  - Fix all cases that are caused by bugs in our code.
  - Decide what to with the faulty jars in general and remove the list.

Test: The following should pass
  - Step 1: ./gradlew publish
  - Step 2: ./gradlew publish -Pbootstrap.local=true
              -Pbootstrap.local.path=/path/to/kotlin/build/repo
              -Pkotlin.incremental.useClasspathSnapshot=true
2021-09-23 12:47:51 +03:00
nataliya.valtman 130fd8311e KT-48620: add readable output size metric into build scan 2021-09-14 17:56:11 +03:00
Hung Nguyen a48bf63630 KT-45777: Compute classpath changes for incremental Kotlin compile
Test: Updated unit tests + incremental compilation integration tests
2021-09-14 12:10:38 +03:00
nataliya.valtman 260d301100 Report compiler performance data to ES 2021-08-24 16:33:13 +03:00
Stanislav Erokhin 9becb2c468 Add compiler performance metrics
WIP
2021-08-24 16:33:12 +03:00
nataliya.valtman 64da19cb2d Add Artifact Transform stat into ES 2021-08-24 16:33:11 +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
Hung Nguyen 41345b2c50 Pass classpath changes from KotlinCompile task to Kotlin compiler
This commit wires necessary components only. The actual classpath
changes will be provided later.

Bug: KT-45777
Test: Existing IncrementalCompilationClasspathSnapshotJvmMultiProjectIT
      and IncrementalJavaChangeClasspathSnapshotIT
2021-07-20 04:04:43 +03:00
Roman Artemev ece9307471 [JS IR] Fix destination directory in Incremental compiler runner for JS 2021-07-13 18:58:56 +03:00
Dmitriy Novozhilov 11faf04a4c [Test] Remove dependencies on IDEA classes from test modules
Some of IDEA services (like in `com.intellij/execution`) was copied,
  because they are used in tests but jars with them compiled with
  jdk 11 and we run our tests on jdk 8, so their bytecode can not
  be read
2021-07-08 13:29:19 +03:00
Yahor Berdnikau 7789054547 Migrate repo to use JVM toolchains Gradle feature.
^KT-46972 Fixed
2021-07-05 14:11:12 +00:00
Andrey Uskov 92b08dfcfb Revert "Unify the way to set compiler options using System.properties"
This reverts commit 28e4e775
2021-06-23 11:34:04 +03:00
Andrey Uskov 28e4e77542 Unify the way to set compiler options using System.properties
Now compiler flags with boolean values which are controlled by system
properties could be set in similar way. The following syntax is
appropriate. For setting flag:
'-DflagName,'-DflagName=[y|Y|true|TRUE|yes|YES|on|ON]'
for unsetting flag:
'-DflagName=[n|N|false|FALSE|no|NO|off|OFF]'
2021-06-22 19:35:28 +03:00
nataliya.valtman f6b428f271 KT-34862 use abi snapshot instead of build history files
Use jar snapshot instead build history file to avoid using time stamps and support remote gradle cache
2021-06-22 07:48:14 +03:00
Nikolay Krasko 32f811e0ec Build: Cleanup old platforms from the build 2021-06-09 17:43:53 +03:00
Aleksei.Cherepanov b1ab597616 Fix FIR tests after ee45aa6b 2021-06-01 15:59:17 +03:00
Andrey Uskov be097244d4 fixup synchronizations 2021-05-31 20:23:54 +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
Abduqodiri Qurbonzoda 40d1849f33 Migrate compiler, idea and others to new case conversion api 2021-04-08 03:22:02 +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 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 7d29ae7cce FIR: add incremental compilation tests 2021-03-24 21:24:18 +01:00
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