Commit Graph

92798 Commits

Author SHA1 Message Date
Svyatoslav Scherbina 41b531db7c Native: test that debug interface handles native thread state
Add test checking that debug interface properly handles threads that are
in native state in new MM.
2022-05-30 15:21:56 +00:00
Nikita Bobko 18feb30569 Introduce kotlin-jps-plugin and deprecate kotlin-jps-plugin-classpath
`kotlin-jps-plugin-classpath` isn't dropped because, in some places, IDE
depends on the old artifact so I want to keep it for a while until I
cleanup IDE completely.

I tried to put as much libraries into `kotlinJpsPluginMavenDependencies`
as possible in the previous commit. Right now,
`kotlin-jps-plugin-classpath` is 33Mb, `kotlin-jps-plugin` is 20Mb (all
are not compresed)
2022-05-30 17:13:56 +02:00
Nikita Bobko 540164a691 Refactoring: Split compilerModulesForJps into "embedded" and "maven"
This small refactoring is needed for the next commit.

This commit doesn't change any semantic.
2022-05-30 17:13:56 +02:00
Nikita Bobko 3569cdda38 JPS plugin: use single source of truth for the classpath
Before this commit `jps/jps-*/build.gradle.kts` list of dependencies
were partially duplicated in the `compilerModulesForJps`

Right now, list of all JPS dependencies is the source of truth.
Actually, I wish I could it do it the other way around -- let the Gradle
do dependency management and correctly produce jars with as less as
possible other libraries being embedded, and as much as poosible
libraries being just dependencies in the pom.xml.

I tried to do so using `embedded` and self-made configurations but
desperately failed, because was getting to big
`kotlin-jps-plugin-classpath` jar. Probably, what I was getting is a
correct classpath, and currently hardcoded classpath may not be
correctly full. Well, at least current classpath is time-proven.
2022-05-30 17:13:56 +02:00
Nikita Bobko 4059b010f8 compilerModulesForJps: remove duplicated ":jps:jps-common"
It was duplicated in the only usage of `compilerModulesForJps` --
`prepare/ide-plugin-dependencies/kotlin-jps-plugin-classpath/build.gradle.kts`

This commit doesn't change any logic.
2022-05-30 17:13:56 +02:00
Nikita Bobko 6bbd007560 Refactoring: "suck in" kotlin-reflect and kotlin-daemon-client into compilerModulesForJps
This commit places all dependencies of JPS plugin into a single place --
`compilerModulesForJps`. I will need this small refactoring for the next
commits.

This commit doesn't change any logic because
`prepare/ide-plugin-dependencies/kotlin-jps-plugin-classpath/build.gradle.kts`
is the only `compilerModulesForJps` user right now.
2022-05-30 17:13:56 +02:00
Nikita Bobko 0cb256a999 JPS plugin: Cleanup dependencies
- Some unnecessary dependencies are dropped
- `api` is replaced with `implementation` when it's more appropriate (in
  our case more appropriate everywhere). `implementation` makes it
  easier to analyze dependencies because it doesn't export the
  dependencies
- Regarding: `// Workaround for Gradle dependency resolution error`.
  Actually, it's not longer needed for the successful project import.
  Confirmed by Yahor and tested locally.
2022-05-30 17:13:56 +02:00
Nikita Bobko b06aae229a Drop compiler-components-for-jps maven artifact
It actualy isn't used for a long time already in IDE
2022-05-30 17:13:56 +02:00
Nikita Bobko 2d5132b313 kotlin-dist-for-jps-meta: drop not needed dependencies
For elaboration on the list see KTIJ-20875

This commit won't be cherry-picked to old Kotlin version. Only 1.7.20
and bigger
2022-05-30 17:13:46 +02:00
Nikita Bobko 69cf454747 Drop org.jline and org.fusesource.jansi redundant dependencies
Reasons:
1. Those modules don't use this dependency
2. Unbundled JPS feature in IDE downloads all transitive dependencies of
   kotlin-dist-for-jps-meta => downloads org.jline and puts it into dist
   which is not needed
2022-05-30 17:09:28 +02:00
Nikita Bobko b033b9a48d Introduce kotlin-dist-for-jps-meta maven artifact
^KTIJ-20875 Fixed

This artifact is used to denote maven artifacts from which IDEA Kotlin
plugin should compose kotlinc dist layout to use it in unbundled JPS
(KTIJ-11633)

Right now kotlin-dist-for-jps-meta tries as close as possible to a real
dist except for:
```
   js.engines.jar
   kotlin-ant.jar
   kotlin-preloader.jar
   mutability-annotations-compat.jar

   // It's compiler/cli/cli-runner.
   // It is `kotlin` in CLI and not needed for JPS
   kotlin-runner.jar

   // JPS doesn't support KAPT
   kotlin-annotation-processing-cli.jar

   // Sources
   kotlin-annotations-jvm-sources.jar
   kotlin-reflect-sources.jar
   kotlin-script-runtime-sources.jar
   kotlin-stdlib-jdk7-sources.jar
   kotlin-stdlib-jdk8-sources.jar
   kotlin-stdlib-js-sources.jar
   kotlin-stdlib-sources.jar
   kotlin-test-js-sources.jar
   kotlin-test-junit5-sources.jar
   kotlin-test-junit-sources.jar
   kotlin-test-sources.jar
   kotlin-test-testng-sources.jar
```
^ for elaboration on the list see KTIJ-20875

This commit is going to be cherry-picked to a bunch of old Kotlin
versions, so it needs to be conservative

Alternative fix: I could create a Gradle module but I didn't do that,
because I can't refer to compiler plugin maven modules which are also
specified in Maven poms `libraries/tools/kotlin-maven-*/pom.xml`.
  1. `api(project(":kotlin-maven-allopen"))` in imaginary Gradle fix
     obviously doesn't work
  2. `api("org.jetbrains.kotlin:kotlin-maven-noarg:${project.version}")`
     kinda works... but at least breaks IDE import (most probably, it
     breaks something else as well)
2022-05-30 17:09:20 +02:00
Pavel Mikhailovskii 2ceccec2b8 KT-52551 Create a static initialization section in case of delegation to a property reference from a file class 2022-05-30 14:16:18 +00:00
Ilya Goncharov 0b9e5e14be [Gradle, JS] Use overlay with false warnings
Merge-request: KT-MR-6343
Merged-by: Ilya Goncharov <Ilya.Goncharov@jetbrains.com>

^KT-51527 fixed
2022-05-30 11:36:52 +00:00
Alexander Shabalin 3630d7f770 [K/N] Address races in timer tests
Merge-request: KT-MR-6368
Merged-by: Alexander Shabalin <Alexander.Shabalin@jetbrains.com>
2022-05-30 09:07:51 +00:00
Nkolay Krasko 388e55c198 Inability to load plugin from jcenter in testSubprojectWithAnotherClassLoader 2022-05-30 08:43:57 +00:00
Nkolay Krasko e7b31a0de0 Update docker file for fleet 2022-05-30 08:43:56 +00:00
Nkolay Krasko d8b6257736 Remove ancient knowledge about using bunch files for building plugins 2022-05-30 08:43:56 +00:00
Ivan Kochurkin 792aa24a04 [FIR] Throws by star import wins builtin Throws, ^KT-52407 Fixed, ^KT-52517 Fixed 2022-05-29 23:41:27 +03:00
Ivan Kochurkin 5fdf365ac4 [FIR] Use lazy initialization for OptionalAnnotationClassesProvider 2022-05-29 23:41:26 +03:00
Ivan Kochurkin 1b0af2cb0e [FIR] Make the lowest priority for OptionalAnnotationClassesProvider 2022-05-29 23:41:26 +03:00
Ivan Kochurkin e004c8e2d6 [FIR2IR] Pass value parameter name to createDefaultSetterParameter if it exists 2022-05-29 23:41:25 +03:00
Ivan Kochurkin feb3f41108 [FIR] Fix resolve inside lambda
The lambda is passed to extension function with type parameters
that defined inside this lambda

^KT-52197
^KT-52190 Fixed
2022-05-29 23:41:25 +03:00
Ivan Kochurkin e69250a9fe [FIR] Microoptimizations and clearing 2022-05-29 23:41:24 +03:00
Ivan Kochurkin ad7c213ab2 [FIR] Initialize type for annotation arguments during deserialization
Get rid of IrErrorTypeImpl creating in FIR2IR
2022-05-29 23:41:23 +03:00
Ivan Kochurkin 0ef043b074 [FIR2IR] Consider property init value from nested class, ^KT-52057 Fixed 2022-05-29 23:41:23 +03:00
Dmitriy Dolovov 48c4d4cf21 [Native][tests] Rename MemoryModel.DEFAULT to MemoryModel.LEGACY 2022-05-28 22:59:58 +03:00
Igor Yakovlev 6efd6f9346 Revert "[Wasm] Temporary disable wasm stdlib tests"
This reverts commit 68ef2f3242.
2022-05-28 13:26:29 +02:00
Igor Yakovlev 641b2c6974 [WASM] Remove redundant bootstrap code 2022-05-28 13:26:14 +02:00
Pavel Kunyavskiy 76da9df102 Bump klib ABI version
KLIB forward compatibility was broken during work related to
definitely not-null types, but version was not changed. This led to
exceptions in compiler instead of meaningful error.

^KT-52518
2022-05-28 07:30:54 +00:00
Alexander Udalov a7f4981fe5 Normalize virtual file paths to prevent duplicate sources
#KT-52465 Fixed
2022-05-27 23:40:57 +02:00
Ilya Kirillov e25dee558f [Analysis API] make KtDeclarationSymbol <: KtDeclarationSymbol
To simplify work with annotations
2022-05-27 16:39:38 +00:00
Ilya Kirillov f189fd1ff0 [Analysis API] make KtDeclarationSymbol <: KtSymbolWithTypeParameters
To simplify work with type parameters
2022-05-27 16:39:37 +00:00
Jiaxiang Chen 8f4554959e AA: make KtClassifierSymbol a subtype of KtAnnotatedSymbol 2022-05-27 16:39:37 +00:00
Jiaxiang Chen 866ebcfe2e AA: make KtCallableSymbol a subtype of KtAnnotatedSymbol 2022-05-27 16:39:37 +00:00
Alexander Likhachev e1f5dc483c [Gradle] Add test for KT-52392 2022-05-27 18:30:09 +03:00
Victor Petukhov 867ad24c86 [FE] Show causing types in the INFERRED_TYPE_VARIABLE_INTO_EMPTY_INTERSECTION diagnostic 2022-05-27 15:14:24 +00:00
Victor Petukhov 6a34b184ac [FE] Introduce warnings on possible empty intersection types, and improve errors reporting in general
^KT-52361 Fixed
2022-05-27 15:14:23 +00:00
Victor Petukhov e133ee3765 [FE] Cache checking intersection type emptiness results 2022-05-27 15:14:23 +00:00
Victor Petukhov 9a3b5e547b [FE] Add fast-paths for some types which are checked for intersection emptiness 2022-05-27 15:14:22 +00:00
Victor Petukhov 02a430875f [FE 1.0] Don't fail candidates which were marked with compatibility resolve previously
^KT-52431 Fixed
^KT-52393 Fixed
2022-05-27 15:14:22 +00:00
Victor Petukhov 73d676d9de [FE 1.0] Report errors or warnings for INFERRED_TYPE_VARIABLE_INTO_EMPTY_INTERSECTION depending on previously recorded kind of diagnostic 2022-05-27 15:14:21 +00:00
Alexander Shabalin 1535ab8eed [K/N] Tweak aligned allocation on all platforms ^KT-37272
Merge-request: KT-MR-6341
Merged-by: Alexander Shabalin <Alexander.Shabalin@jetbrains.com>
2022-05-27 15:10:32 +00:00
Mikhail Glukhikh d7ca7e17c9 FE 10: wrap ext. receiver inlining prohibition in the language feature
See KT-52502
2022-05-27 14:55:08 +00:00
pyos fad35b95d4 FE: forbid extension calls on inline functional parameters
Extension receivers are currently implicitly noinline, and changing that
would require modifying the syntax to allow marking them noinline or
crossinline.

^KT-5837 Open
^KT-25787 Fixed
^KT-47965 Fixed
^KT-50107 Fixed
^KT-52403 Fixed
2022-05-27 14:55:07 +00:00
Victor Petukhov efa267bf86 [FE] Fix tests after rebase 2022-05-27 13:56:34 +00:00
Victor Petukhov 0199c76c06 [FE 1.0] Check callable reference return type safety during resolution
^KT-51844
^KT-52503 Fixed
2022-05-27 13:56:34 +00:00
Victor Petukhov 51551998c7 Revert "[FE 1.0] Take care callable reference candidates with recursive candidate return type"
This reverts commit d04beaa8bb49c99ceb993f3f7b32169c393b39f4.
2022-05-27 13:56:33 +00:00
Victor Petukhov 06deaed3d5 Add test for KT-50498 2022-05-27 13:56:33 +00:00
Victor Petukhov b411eb36e8 [FE 1.0] Take care standalone lambdas during updating types in the builder inference
^KT-50520 Fixed
2022-05-27 13:56:32 +00:00
Victor Petukhov c25e07119c [FE 1.0] Skip improper constraints while determining READY_FOR_FIXATION_DECLARED_UPPER_BOUND_WITH_SELF_TYPES type variable readiness
^KT-51148 Fixed
2022-05-27 13:56:32 +00:00