Commit Graph

1667 Commits

Author SHA1 Message Date
Nataliya.Valtman 5885514c3d Add JSON output type for build reports
#KT-65792 Fixed
2024-02-27 08:32:36 +00:00
Evgenii Mazhukin 347eedb0a0 [JPS][IC] Fix the use of Jps-dependency-graph API for lookups
All dependencies should be registered before the Backend::associate().

^KT-65429


Merge-request: KT-MR-14616
Merged-by: Evgenii Mazhukin <evgenii.mazhukin@jetbrains.com>
2024-02-27 07:42:15 +00:00
Evgenii Mazhukin cc2dcf0078 [JPS][IC] Register lookups as usages in jps dependency graph
^KT-65429 In Progress


Merge-request: KT-MR-14485
Merged-by: Evgenii Mazhukin <evgenii.mazhukin@jetbrains.com>
2024-02-23 16:08:29 +00:00
Yahor Berdnikau 6b19b8b9d0 [Repo] Don't use kotlinOptions in repo build scripts
^KT-63419 In Progress
2024-02-22 14:48:10 +00:00
Aleksei.Cherepanov a34b87c63a Load kotlin.coroutines.Continuation from parent classloader
^KT-66004 Fixed
2024-02-22 09:03:21 +00:00
Kirill Rakhman f231338cd6 [FIR] Render list of symbols with linebreaks as separators
#KT-61823 Fixed
2024-02-21 12:25:22 +00:00
Dmitriy Novozhilov acf2296590 [Test] Regenerate tests after two previous commits 2024-02-16 12:48:24 +00:00
Alexander Udalov 3f034e8b67 Enable lightweight lambdas (aka invokedynamic) since 2.0
#KT-45375 Fixed
 #KT-58173 Open
2024-02-08 19:46:18 +00:00
Alexander Udalov 28797a31b4 JVM: refactor JvmDefaultMode, remove/rename some entries
- remove ENABLE/COMPATIBILITY because they can no longer be used
- remove forAllMethodsWithBody because its behavior is now equivalent to
  isEnabled
- inline isCompatibility
- inline DEFAULT
- rename ALL_INCOMPATIBLE -> ALL
2024-02-06 17:18:44 +00:00
Xuan-Son Trinh f4f009cb9a [JPS] Fix KotlinJvmModuleBuildTarget.findJavaSourceRoots to only return Java source roots
This change is needed because otherwise, source files that are not Java will be added as `JavaSourceRoot`, this is incorrect and causes assertion error in `com.intellij.core.JavaCoreProjectEnvironment.addSourcesToClasspath`. Refer to KT-65325 for more context.


Merge-request: KT-MR-14088
Merged-by: Xuan Son Trinh <xuanson.trinh@jetbrains.com>
2024-01-31 16:52:42 +00:00
Aleksei.Cherepanov 1e7e42baf2 [JPS] Improve JPS dumb mode
For the correct work of the compiler, some maps should be fulfilled by the build system. In the first implementation of dumb mode for JPS all maps were disabled. Now flag was introduced to determine IC behavior: to collect data needed for the compiler's code generation and disable maps and IC analysis

^KT-65043 Fixed
2024-01-17 08:22:27 +00:00
Aleksei.Cherepanov 32bc2b55ed Show compiler error in diff if JPS IC test fails 2024-01-17 08:22:27 +00:00
Dmitrii Gridin b6d373d8e5 Update copyright to 2024 2024-01-05 13:43:17 +00:00
Aleksei.Cherepanov 5150812838 [IC] Add test for potential sam change in kotlin-java interop
JPS tests were fixed on IJ side during implementation of JPS on graph

Relates to KT-21534
2023-12-21 16:09:14 +00:00
Aleksei.Cherepanov f7d93029ff [JPS] Stop depending on a specific implementation of the compiler in some JPS tests
Change base class of AbstractIncrementalCacheVersionChangedTest to abstract one, not related to any specific implementation of compiler because these tests check JPS logic and should not be affected by compiler implementation

^KT-64445 Fixed
2023-12-21 14:21:35 +00:00
Aleksei.Cherepanov 3e41faf91f Add KotlinBuilder 'dumb mode' flag
A new system property was added to enable a 'dumb mode' for KotlinBuilder.
In this mode it is possible to disable IC caches, but don't request rebuild
And all IC trackers will still work

^KT-64305 Fixed


Merge-request: KT-MR-13524
Merged-by: Aleksei Cherepanov <aleksei.cherepanov@jetbrains.com>
2023-12-15 00:20:54 +00:00
Ilya Chernikov ed820d6b57 K2 IC: fix lookup recording for a "red" companion object
#KT-63665 fixed
2023-12-13 13:40:44 +00:00
Ilya Chernikov 6dfcc927f4 IC tests: make exceptions from compiler more visible in tests
otherwise they are easily swallowed by the reporting logic.
This commit was needed to ensure that the problem described in
KT-63665 is reproducible in IC test
But some JS IC logic relies on handling compiler exceptions as a signal
for scope expansions, and the newly introduced exception logging
broke a few tests. To mitigate it, the directive was introduced
to disable exception logging for particular test.
2023-12-13 13:40:44 +00:00
Nataliya.Valtman 4294c7bab7 Add limitation for changed files list for JPS build report
#KT-63549
2023-12-04 18:19:15 +00:00
Ilya Goncharov 08e3cb300a [JS] Migrate tests onto IR compiler with outputDir API instead of outputFile
^KT-61117 fixed
2023-11-29 11:21:56 +00:00
Aleksei.Cherepanov c002af6365 Make plugin classpath serialization path agnostic
This is needed for correct usage of portable caches

^KT-63799 Fixed
2023-11-25 10:46:49 +00:00
Nataliya.Valtman 6bbf5b83c8 Add compiler metrics to JPS build report
#KT-63549: Fixed
2023-11-22 11:30:08 +00:00
Nataliya.Valtman fff089eba8 Fix ClassCastException in JPS statistics ad update log messages
#KT-63594 Fixed
2023-11-21 15:28:27 +00:00
Aleksei.Cherepanov 6f3204da0a Stop using IJ's maps in graph implementation of JPS 2023-11-16 08:53:13 +00:00
Aleksei.Cherepanov 431f77ddb4 Disable mappings dump creating for JPS graph
Disable mappings dump for tests when JPS graph implementation is enabled
2023-11-07 13:49:43 +00:00
Evgenii Mazhukin 20af98c776 [Tests] Re-enable K1 IC tests for expect-actual
^KT-60831 fixed
^KT-60831 next step KT-63183


Merge-request: KT-MR-12855
Merged-by: Evgenii Mazhukin <evgenii.mazhukin@jetbrains.com>
2023-11-06 19:46:43 +00:00
Kirill Rakhman ef78d4b95a [FIR] Fix deserialization of generic context receivers
We need to pass the local deserialization context so that generic
type parameters can be referenced.

#KT-62607 Fixed
2023-10-27 11:35:22 +00:00
Alexander.Likhachev b460c06907 [BT] Add support for in-process incremental compilation
#KT-61865 Fixed
2023-10-23 13:04:17 +00:00
Alexander Udalov 6219f7fc0d JVM IR: fix detection of enum entries in the same module
Use the new `IrClass.hasEnumEntries` flag added in the previous commit.

 #KT-61208 Fixed
2023-10-16 20:22:20 +00:00
Ilya Goncharov a79324037d [JS] Fix JPS artifacts cordinates 2023-10-16 13:34:37 +00:00
Aleksei.Cherepanov a32c65e4e1 Convert absolute to relative pluginsClasspath..
..to avoid recompilation on build with portable caches

#KT-62256 Fixed


Merge-request: KT-MR-12377
Merged-by: Aleksei Cherepanov <aleksei.cherepanov@jetbrains.com>
2023-10-05 10:25:53 +00:00
Mikhail Glukhikh 4133988d62 LV 2.0: temporarily mute 4 incremental MPP tests (KT-60831) 2023-09-19 15:46:29 +00:00
Mikhail Glukhikh e4309c3318 LV 2.0: mute testCircularDependenciesWrongInternalFromTests (KT-61716) 2023-09-19 15:46:29 +00:00
Mikhail Glukhikh 6314183a55 LV 2.0: update diagnostics around visibility checks in JPS tests 2023-09-19 15:46:28 +00:00
Ilya Chernikov 129c1b4f92 IC: temporarily mute lookup tracker test on K2
Test most likely fails due to the missing precise java tracker
See #KT-57147 and #KT-60736 for details
2023-09-19 15:46:28 +00:00
Ilya Chernikov 60603de042 LV20: fix JPS testdata where the error reporting slightly changed 2023-09-19 15:46:27 +00:00
Mikhail Glukhikh ab2053df4b Use K2/PSI in lookup tracker tests, fix test data in accordance with 2.0
#KT-60736 Submitted
2023-09-19 15:46:27 +00:00
Mikhail Glukhikh 2a8b655294 Update tests after switching to LV 2.0
Related to KT-59171
2023-09-19 15:46:27 +00:00
Aleksei.Cherepanov 68af705664 Add import tracker
This tracker reports import directives to IJ's JPS to track changes and detectwehen it is needed to adjust compilation scope.

#KT-44835 Fixed
2023-08-30 12:42:39 +00:00
Aleksei.Cherepanov b27aef2c61 Add test
#KT-44835 In Progress
2023-08-30 12:42:39 +00:00
Mikhail Glukhikh c4fbbe7338 Fix old JS BE tests in MultiplatformJpsTestWithGenerated by using K1 2023-08-25 08:57:53 +00:00
Mikhail Glukhikh 64d8df0a61 Use language version 1.9 in JsProtoComparisonTestGenerated 2023-08-25 08:57:53 +00:00
Kirill Rakhman 43180597fe [FIR] Fix generic sam conversion in call completion
#KT-60903 Fixed
2023-08-21 10:35:42 +00:00
Hung Nguyen 894ba9ab80 [IC] Relocatable IC caches for projects with custom buildDir
IC caches often contain file paths. To make them relocatable, we need
to convert these file paths into relative paths, relative to a base
directory.
  - If the file paths are source files, we can use the root project
    directory as base.
  - If the file paths are class files, we should use the classes
    directory as base (before this commit, we used the root project
    directory in both cases, that's why we hit KT-58547).

The key changes in this commit include:
  - RelocatableFileToPathConverter: converts paths to relative paths
  - IncrementalCompilationContext: contains 2 different path converters,
    one for source files and one for class files
  - SourceToOutputFilesMap: maps source files to class files using the
    above path converters
  - IncrementalCompilerRunner: creates the path converters based on file
    locations

Test: RelocatableFileToPathConverterTest unit test
      SourceToOutputFilesMapTest unit test
      BuildCacheRelocationIT.testCustomBuildDirectory integration test
^KT-58547 Fixed
2023-08-16 13:40:19 +00:00
Ilya Gorbunov 69a87efdd9 js.tests: change paths to kotlin-stdlib-js.klib
Change the expected klib name of stdlib

KT-56106
2023-08-03 14:47:20 +00:00
Nataliya.Valtman fb04356829 Add JPS iteration metric
#KT-58026 In progress


Co-authored-by: Nataliya Valtman <Nataliya.Valtman@jetbrains.com>


Merge-request: KT-MR-11365
Merged-by: Aleksei Cherepanov <aleksei.cherepanov@jetbrains.com>
2023-07-31 09:15:28 +00:00
Aleksei.Cherepanov 6ac76aa3e9 Fix passing K2 language version to K1 multimodule tests
After splitting K1 and K2 tests some multimodule tests in K1 configuration were still running with 2.0 language version. The reason was in misconfiguration of complex multimodule projects - they don't apply override of compiler arguments. This fix added such arguments update.

#KT-60589 Fixed
2023-07-27 14:15:49 +00:00
Aleksei.Cherepanov f6963d04e9 Run K1 configuration on TC with languageVersion="1.9"
KotlinVersion is overrided on TC, so we need to rely on LanguageVersion

#KT-60589 Fixed
2023-07-27 14:15:49 +00:00
Nataliya.Valtman ed2dd4b2ae Split Gradle and JPS metrics
#KT-58026 In progress
2023-07-27 11:18:54 +00:00
Mikhail Glukhikh 834bd1a71c K1/K2: split incremental JPS tests properly (relates to KT-59171) 2023-07-20 10:57:45 +00:00