Commit Graph

92830 Commits

Author SHA1 Message Date
Victor Petukhov b472ccd358 [FE 1.0] Introduce deprecation of inferred type variable into a declared upper bound within a builder inference call 2022-05-31 14:13:29 +00:00
Victor Petukhov 848075192c [FE 1.0] Don't use BuilderInferenceSubstitutionConstraintPosition for declared upper bound constraint with no substituted upper bound
It leads to further infer type variable into those upper bounds which is forbidden

Substituted upper bounds is ok because specific substituted types came from constraints of other proper positions, or if specific substituted type is from declared upper bound too, then there should be another declared upper bound with no substitution

^KT-51464 Fixed
^KT-47986 Fixed
2022-05-31 14:13:28 +00:00
Mikhail Glukhikh c3b5d83f31 FE10 Analysis API: create 17 separate test data files for resolve 2022-05-31 11:34:59 +00:00
Mikhail Glukhikh a3db2e13b2 FE10 analysis API: render type parameter bounds as FIR does 2022-05-31 11:34:58 +00:00
Mikhail Glukhikh d792c7b70c Reference analysis API: add stub for ReadWriteAccessChecker to run tests 2022-05-31 11:34:57 +00:00
Mikhail Glukhikh 1ae71a20f3 FE10 analysis API: support reference resolve for labels & 'this' 2022-05-31 11:34:56 +00:00
Mikhail Glukhikh 8cb3081bbd Analysis API: add KtReference..Provider to fix reference resolve in FE10 2022-05-31 11:34:56 +00:00
Mikhail Glukhikh d67e910ee8 FE10 Analysis API: don't render override for deserialized 2022-05-31 11:34:55 +00:00
Mikhail Glukhikh f4510773d0 FIR analysis API: add workaround for java.io.Serializable type 2022-05-31 11:34:54 +00:00
Mikhail Glukhikh ef5cfab655 FE10 analysis API: don't count static members of final class as final 2022-05-31 11:34:53 +00:00
Mikhail Glukhikh 446ee943e2 FIR analysis API: fix rendering of Java-based types 2022-05-31 11:34:53 +00:00
Mikhail Glukhikh 125de59e09 FE10 analysis API: create receiver parameter symbols for 'this' 2022-05-31 11:34:52 +00:00
Mikhail Glukhikh d112ab3f17 FE10 analysis API: fix parentheses using while rendering receiver 2022-05-31 11:34:51 +00:00
Mikhail Glukhikh 564d179cfb FE10 analysis API: fix flexible type pretty-printing 2022-05-31 11:34:50 +00:00
Mikhail Glukhikh fa0faa33a5 FE10 analysis API: create package symbols properly 2022-05-31 11:34:49 +00:00
Mikhail Glukhikh 213445347d Fix PsiType for local class in FE10 Analysis API
After this commit,
Fe10IdeNormalAnalysisSourceModuleAnalysisApiPsiTypeProviderTestGenerated
test group passes
2022-05-31 11:34:48 +00:00
Mikhail Glukhikh ffc17bea55 Add SymbolLightClassFacadeCache to FE10 Analysis API configuration 2022-05-31 11:34:48 +00:00
Mikhail Glukhikh 8fce239209 Generate even more FE10 analysis API tests 2022-05-31 11:34:47 +00:00
Alexander Udalov 22329c7124 Do not sort fake overrides in DescriptorSerializer
Sorting invokes descriptor renderer, so the fewer descriptors we are
sorting, the better. This helps to save a few percent of compilation
time in a synthetic project from KT-52326.
2022-05-31 13:22:13 +02:00
Victor Petukhov f5f398788d [FE 1.0] Add checker to report "unsupported range until operator" on declaration itself 2022-05-31 08:42:57 +00:00
Victor Petukhov c266303197 [FE 1.0] Introduce "range until operator" language feature, and report errors on its usages till 1.8 2022-05-31 08:42:57 +00:00
Victor Petukhov de9d1dc536 [Parser] Add additional parsing tests 2022-05-31 08:42:56 +00:00
Victor Petukhov 96d1f89836 [BE] Support until operator in back-ends 2022-05-31 08:42:56 +00:00
Victor Petukhov 2378979a99 [FE JS] Support until operator in WRONG_OPERATION_WITH_DYNAMIC error 2022-05-31 08:42:55 +00:00
Victor Petukhov 0b25ce4de9 [FE] Support resolve of until operator to rangeUntil
^KT-52420 Fixed
2022-05-31 08:42:55 +00:00
Victor Petukhov 19136019e4 [Parser] Support of parsing until operator
^KT-52419 Fixed
2022-05-31 08:42:54 +00:00
Vyacheslav Gerasimov 7360dff0da Build: Fix test forks and memory calculations for low memory cases 2022-05-30 21:43:23 +03:00
Stanislav Erokhin 2deb0cc237 FIR/Analysis API: Add KtValueParameterSymbol#generatedPrimaryConstructorProperty
This property are used to allow access to the property created from
the primary constructor parameter
2022-05-30 18:39:21 +00:00
Alexander Shabalin ed881f3f31 [K/N] Make PlatformManager serializable
Merge-request: KT-MR-6358
Merged-by: Alexander Shabalin <Alexander.Shabalin@jetbrains.com>
2022-05-30 15:52:08 +00:00
Ilya Kirillov 314d9b9477 [analysis] move DecompiledPsiDeclarationProvider to symbol light classes module to avoid circular dependencies 2022-05-30 17:48:34 +02:00
Jinseong Jeon 55e24451a4 AA: migrate PSI declaration provider (from IJ) 2022-05-30 17:48:34 +02:00
Svyatoslav Scherbina 3f6b386681 Native: make debug interface handle uninitialized threads
Generally, debug interface is not called from uninitialized threads,
but let's be on the safe side here.
2022-05-30 15:21:57 +00:00
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