Commit Graph

92240 Commits

Author SHA1 Message Date
Roman Golyshev 1d5cb8ab75 [FIR] Get FirSession from declaration in ReturnTypeCalculatorWithJump
If the session is from the other module, it might not know about
FirFiles which are relevant for transforming and resolving the
declaration

^KT-52136 Fixed
2022-04-21 19:23:20 +00:00
Pavel Punegov ed6ddf4e4f [K/N][build] Set kotlin root to get versions.properties file 2022-04-21 18:15:28 +00:00
Hung Nguyen 862c0b0c9a Trivial cleanup for KotlinCompile.classpathSnapshotProperties
^KT-51978 Fixed
2022-04-21 17:34:02 +00:00
Hung Nguyen c109d3d95b Trivial cleanup for PlainTextBuildReportWriter
^KT-51978 In Progress
2022-04-21 17:34:02 +00:00
Hung Nguyen 6d3e679a59 Implement cache eviction for classpath snapshot cache
Implement an in-memory cache that uses a combination of strong
references and `SoftReference`s so that it adapts to memory
availability.

Cache eviction is currently performed after loading a classpath snapshot
(this can be changed later if necessary).

Evicted cache entries' values will be converted from strong references
into `SoftReference`s so that they can still be used for as long as the
JVM allows them.

There are 2 types of cache eviction:
  - Least recently used: Oldest entries will be evicted
  - Memory usage limit: If memory is limited, all entries will be
    evicted

Test: Added InMemoryCacheWithEvictionTest unit test

^KT-51978 In Progress
2022-04-21 17:34:01 +00:00
Jinseong Jeon 889db4cc5d AA: indicate whether a value parameter is an implicit lambda parameter
^KTIJ-18800 In progress
2022-04-21 19:18:25 +02:00
Jinseong Jeon a74a51b2d9 AA: add tests about resolution of implicit lambda parameter 2022-04-21 19:18:24 +02:00
Alexander Udalov 6734f542b3 JVM IR: sanitize indy lambda proxy names correctly
In case there are several proxy functions for indy lambdas in the same
container, its names are "...__proxy", "...__proxy-0", "...__proxy-1",
..., yet before this change, only the first one was sanitized. So if
it's happening inside a constructor, `<init>` was left unrenamed which
led to ClassFormatError.

 #KT-52040 Fixed
2022-04-21 17:06:16 +02:00
Victor Petukhov 2cfba51a29 [Compiler PSI] Make getContextReceivers default to preserve compatibility
^KT-51747 Fixed
2022-04-21 13:41:30 +00:00
Nicolay Mitropolsky ccb6331e10 LC: better facade detection to fix KTIJ-21223
Merge-request: KT-MR-6130
Merged-by: Nicolay Mitropolsky <nicolay.mitropolsky@jetbrains.com>
2022-04-21 10:52:29 +00:00
Artem Kobzar 7327bc864e test(KT-31614): fixate behavior of serialization/deserialization of UTF characters. 2022-04-21 09:22:24 +00:00
konstantin.tskhovrebov e974d16e7a Add KotlinArtifactsExtensionImpl code generator. 2022-04-21 08:32:28 +00:00
konstantin.tskhovrebov 3085f6bacf Extract kotlin artifacts public API. 2022-04-21 08:32:27 +00:00
konstantin.tskhovrebov 19dc91135c Add info comments to KotlinNativeLinkArtifactTask.kt 2022-04-21 08:32:26 +00:00
konstantin.tskhovrebov 5f0303698e Add kotlin artifacts config and object collections for extensibility.
Extending by external plugins:
project.kotlinArtifactsExtension.apply {
    artifactConfigs.all {
      //add custom extension to artifact config DSL
      (it as ExtensionAware).extensions.create("myConfig", Config::class.java)
    }
    artifacts.all {
      val config = it.extensions.findByName("myConfig") as Config
      //configure additional tasks, etc
      //here we can use artifact parameters
    }
}
2022-04-21 08:32:26 +00:00
konstantin.tskhovrebov 9430f0bafb Add artifacts collection inside KotlinArtifacts extension.
And make KotlinArtifact instances expandable via groovy machinery.
2022-04-21 08:32:25 +00:00
Kristoffer Andersen aafab7800b [EE-IR] Add "different classloader" check to synthetic accessor lowering 2022-04-20 23:33:38 +02:00
Mikhail Glukhikh f65364b191 FIR: add test for #KT-49438 Obsolete 2022-04-20 22:31:54 +03:00
Ilya Chernikov af933b9d3d Switch to FastJarFS for scripting
#KT-51731 fixed
2022-04-20 19:15:12 +00:00
Svyatoslav Scherbina fce5ad1358 Native: check return value of clang_saveTranslationUnit 2022-04-20 16:56:41 +00:00
Artem Kobzar 59bd2fbb91 test(KT-51066): fixate behavior of value classes in composition with suspend lambdas. 2022-04-20 15:49:09 +00:00
Alexander Likhachev 2e79590750 [Build] Add workaround for dependency resolution in buildSrc 2022-04-20 17:50:46 +03:00
Alexander Likhachev a02fe31fd5 [Build] Revert workaround introduced in ca2051e1 2022-04-20 14:27:19 +00:00
Alexander Likhachev feccc5785f [Build] Revert workaround introduced in 2f39a656 2022-04-20 14:27:18 +00:00
Alexander Likhachev 41daf39000 [Build] Fix deprecation warnings in KGP integration tests 2022-04-20 14:27:17 +00:00
Alexander Likhachev 19a76fa16d [Build] Update Gradle to 7.3.3 2022-04-20 14:27:17 +00:00
Yaroslav Chernyshev 36564c8f3a Revert "Publish modules required for Kotlin Gradle Tooling in IDE"
This reverts commit 20f9861264.
2022-04-20 15:16:58 +02:00
Yaroslav Chernyshev 20f9861264 Publish modules required for Kotlin Gradle Tooling in IDE
Modules to be published are: kotlin-gradle-plugin-idea and
kotlin-gradle-plugin-kpm-android
2022-04-20 14:57:18 +02:00
Vyacheslav Gerasimov c8f2872a07 Fix flaky FIR tests
failing with 'Jar with annotations does not exist. Please run
:plugins:fir-plugin-prototype:plugin-annotations:jar'
2022-04-20 12:54:08 +03:00
Artem Kobzar 333440dfc6 fix: function inlining without blocks for else statement. 2022-04-20 09:28:45 +00:00
Ilya Kirillov 207f2c7981 [symbol fir] add small performance optimization for checkIsInheritor 2022-04-19 23:58:12 +02:00
Ilya Kirillov cff576844e [symbol fir] fix checkIsInheritor in LC
^KT-51240 fixed
2022-04-19 23:58:11 +02:00
Alexander Udalov 2e515f3945 Prohibit JVM target 1.6
But still compile stdlib, reflect, kotlin.test and scripting runtimes
with JVM target 1.6 to simplify migration from Kotlin 1.6 to 1.7.

 #KT-45165 Fixed
2022-04-19 22:54:40 +02:00
Alexander Udalov 1e800b8e18 Advance JVM target to 1.8 for kotlinx-metadata-jvm 2022-04-19 22:54:40 +02:00
Alexander Udalov 45f87bc71a Advance JVM target to 1.8 for kapt, AE, parcelize runtimes 2022-04-19 22:54:40 +02:00
Alexander Udalov 04cba8d767 Remove usage of JVM target 1.6 from HierarchicalMppIT
#KT-45165
2022-04-19 22:54:40 +02:00
Alexander Udalov ef6d30dd51 Remove usages of JVM target 1.6 from compiler tests
#KT-45165
2022-04-19 22:54:40 +02:00
Alexander Udalov f134575b86 Gradle: remove setJvmTargetFromAndroidCompileOptions
This flag was introduced for KT-21030 (see also KT-31027), to change JVM
target 1.6 to 1.8 if Android options declare source/target compatibility
with JDK 1.8.

After JVM target 1.8 became the default for Kotlin (KT-29405), the logic
was changed in e9436da858 to the reverse: if Android options declare
source/target compatibility 1.6, then also use JVM target 1.6. Note that
at that point, the problem with usages of default interface methods
described in KT-21030 became obsolete, because it described a runtime
crash when Kotlin tooling failed to recognized that JVM target >= 1.8
should be used -- which was now always the case, unless you explicitly
opted in with `-jvm-target 1.6` (which would make little sense).

Now that we're removing support for JVM target 1.6 in KT-45165, there is
no use in this flag anymore. Even if Android options declare
source/target compatibility 1.6, Kotlin should still use the minimal
supported version for the JVM target, which is now 1.8. And since 1.8
is the default, no changes to the compiler options are needed.
2022-04-19 22:54:40 +02:00
Aleksei.Cherepanov 3d8f140d6b [JPS] Fix incremental build after changing Java enum used in Kotlin when
EnumWhenTracker implemented for tracking changed java enum class items, that used in kotlin when expression.

#KT-47824 Fixed
2022-04-19 18:39:41 +00:00
Ilya Kirillov ee8de63497 [low level api] fix creating libraries session with non-jvm libraries 2022-04-19 19:42:11 +02:00
Ilya Kirillov 3b4eb2d788 [kotlin fir] fix creating symbol not in analysis scope
^KTIJ-21504 fixed
2022-04-19 19:34:21 +02:00
Yahor Berdnikau 25d6439471 Update AGP version in 'android-test-fixes' plugin
This aligns version with other Gradle plugins.
2022-04-19 18:15:05 +02:00
Mikhail Glukhikh 16d5c28622 Unmute FIR spec tests muted for KT-38340 2022-04-19 15:56:00 +00:00
Sergey Bogolepov 21399b4edd [K/N] Update documentation on building and using LLVM 2022-04-19 14:27:33 +00:00
Sergey Bogolepov 404cc54bd4 [K/N] Update on code coverage status. 2022-04-19 14:27:32 +00:00
Yahor Berdnikau 6ed0efedd3 Add workaround for Gradle dependency resolution error
Gradle throws unexpected error on dependency resolution without
this workaround.

Related to KT-51837
2022-04-19 15:38:33 +02:00
Nikolay Krasko f7a53a1b24 Force using 2.8.9+ gson version as a dependency
Mitigate https://github.com/google/gson/pull/1991

^KT-51837 Fixed
2022-04-19 15:38:30 +02:00
Artem Kobzar 315ff0beeb fix(KT-38262): add ability to create classes with methods that have reserved keyword as an identifier. 2022-04-19 13:20:13 +00:00
Artem Kobzar 9d0c7a55b1 chore: rename method and remove FIXME comment. 2022-04-19 13:14:22 +00:00
Artem Kobzar 93dcc48512 fix(KT-50157): prevent boxing for char comparison. 2022-04-19 13:14:22 +00:00