Commit Graph

234 Commits

Author SHA1 Message Date
Andrew Kozlov
5d14989ac8 [kotlin] KTIJ-28619, KTIJ-28628 only exported libraries should be analyzed
GitOrigin-RevId: 6b25d254392712a332f88de8e6e86bc9fc89c93c
2024-07-02 21:40:21 +00:00
Andrew Kozlov
7af8a3d455 [kotlin] KTIJ-28619, KTIJ-28628 excess dependencies
GitOrigin-RevId: 7f24d11a7d1f43d1e3ed2ea6c892b15f0ebb3bca
2024-06-06 00:08:36 +00:00
Ilya Kirillov
a2bbe4d318 Remove snapshot kotlin stdlib from Kotlin plugin
^KT-62510
^KTIJ-20529 fixed

GitOrigin-RevId: a49099902566abb23dfb56a578b368b4973e332f
2023-10-20 20:53:09 +00:00
Pavel Kirpichenkov
2b2021cb29 [Kotlin] KTIJ-26526 Move K/N decompilers and stub builders to kotlin.git
GitOrigin-RevId: f752104548589cae46942e12ad708f372d8ddcf7
2023-08-23 07:52:46 +00:00
Pavel Kirpichenkov
4266b1c98c Reapply "[K2] plugin.xml changes"
This reverts commit 74f5685400b5107d82b4f34d79e7a1fd88533179.

GitOrigin-RevId: 380319bd125aa0b3d898df1d8ef29dbcccd5bd9b
2023-05-26 06:47:05 +00:00
Yan Zhulanow
d049545af7 [kotlin] Make 'NativeLibraryType' a class (KTIJ-24476)
Services are instantiated by the platform, breaking the objects' singleton contract.

GitOrigin-RevId: 9b3886bec28b8dbf9e16b394672d36fd5c338f7a
2023-02-14 10:15:56 +00:00
Vladimir Krivosheev
0af2e7b5c5 fix - reduce member visibility (public -> private)
GitOrigin-RevId: fe8a4740e27d192798a9fa55ff41112d1b633e49
2022-09-14 15:09:45 +00:00
Yan Zhulanow
4a3ecdebed [kotlin] Move base test classes to the 'kotlin.base.test' module (part 1)
GitOrigin-RevId: 7f77e95e54919243ded4b4a300b5f9a74b8a4068
2022-08-19 20:59:55 +00:00
Nikita Nazarov
4430b3bfe9 [kotlin] update copyright
GitOrigin-RevId: 9ac8c77e434655b5858bfa08c4dcc87395e9d39a
2022-07-28 16:57:08 +00:00
Ilya Kirillov
453eae19e2 [kotlin] fix mixed K1/K2 test in aggregator
^KTIJ-22193

GitOrigin-RevId: 73c8b458fb6de45c44106aa03df0c65f55d925cb
2022-07-09 23:07:02 +00:00
Yuriy Artamonov
195e2e831d [konan] IDEA-295978 Do not trigger NativeDefinitionsTypes class loading on parser definition init
GitOrigin-RevId: 38a340e8a3411d063d820f74018efcab9fa6074b
2022-07-08 18:10:09 +00:00
Yan Zhulanow
677337cf9e [kotlin] Untie 'kotlin.native' from FE10-dependent modules (KTIJ-21699)
GitOrigin-RevId: d310d676ff8dc0610222a1c63f6d2ee7b6bbbef3
2022-07-07 13:49:56 +00:00
Yan Zhulanow
1e93b17463 [kotlin] Extract frontend-agnostic parts of IdePlatformKindTooling implementations (KTIJ-21699)
GitOrigin-RevId: 750567dfcced72c48545b02516f647980e3a04a4
2022-07-07 13:49:54 +00:00
Yan Zhulanow
8a724c2ae4 [kotlin] Move IdePlatformKindTooling and its common implementation to 'kotlin.base.code-insight' (KTIJ-21699)
GitOrigin-RevId: 9890138c4caa888c2ebe520540849b3453b35fe6
2022-07-07 13:49:51 +00:00
Yan Zhulanow
7ec2c34bda [kotlin] Extract project configuration, preferences and updater functionality to separate modules (KTIJ-21699)
GitOrigin-RevId: b2481cb2607f4ad12b8dc145a696202e32a10f27
2022-07-07 13:49:48 +00:00
Yan Zhulanow
871c0d02a3 [kotlin] Move 'kotlin.project-model' inside the base part of the plugin (KTIJ-21699)
GitOrigin-RevId: dfb18fb37f4822024378e6080e519d6751e04b1b
2022-06-24 19:08:16 +00:00
Yan Zhulanow
72352d38f5 [kotlin] Move 'IdePlatformKindTooling' to the 'kotlin.base.platforms' module (KTIJ-21699)
GitOrigin-RevId: 444d139210784d409961f5e04f3d0e13a7b58d2d
2022-06-24 19:08:13 +00:00
Yan Zhulanow
954aa2614f [kotlin] Make 'IdePlatformKindTooling' signatures frontend-agnostic (KTIJ-21699)
GitOrigin-RevId: a2a447ad0812304f7a600fbeb904d7935d441af0
2022-06-24 19:08:11 +00:00
Yan Zhulanow
ea3f292392 [kotlin] Rename 'includeSlowProviders' parameter to 'allowSlowOperations' (KTIJ-21699)
GitOrigin-RevId: 2cb153285b0abc38907e351bb1d713afa79431ae
2022-06-24 19:08:08 +00:00
Yan Zhulanow
a5f0ff7389 [kotlin] Make 'includeSlowProviders' parameter not-null (as it is never null) (KTIJ-21699)
GitOrigin-RevId: 42164f6f7fd555dbd682e40ad777c88906f6e509
2022-06-24 19:08:05 +00:00
Yan Zhulanow
d52d539645 [kotlin] Split 'kotlin.fir.analysis-api-providers-ide-impl' into common and FIR parts (KTIJ-22014)
GitOrigin-RevId: 6c33e86ac7cbd53672502b277fa54c8e8aaecef1
2022-06-15 06:45:56 +00:00
Yan Zhulanow
3b2658a7b9 [kotlin] Move contents of 'kotlin.fir.analysis-project-structure-ide-impl' to 'kotlin.base.project-structure' (KTIJ-22014)
GitOrigin-RevId: e23302cc11c5d71ffe9f4fd8ca6afc716a62b953
2022-06-15 06:45:50 +00:00
Yan Zhulanow
a8c5734a9c [kotlin] Move main contents of the 'kotlin.base.util' module to the conventionally named package (KTIJ-21699)
GitOrigin-RevId: 1a9d465cf7c9475c695fe83621e9451d740ac54e
2022-06-15 06:45:47 +00:00
Yan Zhulanow
a84b0bfc49 [kotlin] Move name suggestion utilities to the 'kotlin.base.code-insight' and 'kotlin.base.fe10.code-insight' modules (KTIJ-21699)
GitOrigin-RevId: 04cd30923da109f3507084c93337affa0495b94a
2022-06-14 06:28:39 +00:00
Yan Zhulanow
00e8ff1c70 [kotlin] Extract classes related to analysis and project model handling to base modules (KTIJ-21699)
GitOrigin-RevId: 6c28e30f796068b6c9c843e367c7a0f9ff42ad68
2022-06-14 06:28:05 +00:00
Yan Zhulanow
667654d10d [kotlin] Move certain multiplatform-related utilities to the 'kotlin.base.facet' module (KTIJ-21699)
GitOrigin-RevId: a03006c5fe31608d77e7aa082b9bedb251e92698
2022-06-14 06:27:57 +00:00
Yan Zhulanow
a9de3e25f1 [kotlin] Remove 'kotlin.common' module (KTIJ-21699)
GitOrigin-RevId: 4ab36f052c63b9b37bd114b07f69b985a9472360
2022-06-14 06:27:51 +00:00
Yan Zhulanow
12c3ad80e9 [kotlin] Extract facet and platform-related classes to kotlin.base.* modules (KTIJ-21699)
GitOrigin-RevId: c2cd56198d67d4a9e28315dd0c115f18d0f1dbd9
2022-06-14 06:27:37 +00:00
Yan Zhulanow
30e1e6e323 [kotlin] Move base Kotlin icons to the 'kotlin.base.resources' module (KTIJ-21699)
GitOrigin-RevId: 8bd4e54efa96b73342d176983b4a48f417dfd78b
2022-06-14 06:27:34 +00:00
Alexey Belkov
9b5e8782f3 Run Kotlin inspection "Redundant nullable return type" on whole project
Plus some minor cleanups due to changed nullability.

GitOrigin-RevId: 406cf3bb86a9d1d57aa088bc0ff43cca5a8c2254
2022-05-27 22:07:13 +00:00
Yan Zhulanow
c4574efb8a [kotlin] Move KotlinAbstractBundle to the 'kotlin.base.util' module
GitOrigin-RevId: 0e332f89b67355de18201242fccd6d90d28d2845
2022-04-15 19:39:01 +00:00
Yan Zhulanow
8438013494 [kotlin] Extract plugin-related utilities to the 'kotlin.base.plugin' module
GitOrigin-RevId: 3b64666cf5769ca3a08beba186631e0fb9a2b319
2022-04-15 19:38:58 +00:00
Dmitry Gridin
0ea388f3b8 [kotlin] fix deprecation in NativeDefinitions.kt
GitOrigin-RevId: f38544fb942bfcc95a6cc23119db1910b0b69976
2022-04-08 06:31:01 +00:00
Yan Zhulanow
d9fbcf9b40 [kotlin] Refactor Kotlin compiler version support (KTIJ-21348)
Fix multiple problems with Kotlin artifact version handling in the Kotlin IDE plugin, including:

- Ad-hoc version handling, lack of common set of utilities.
- String typing and clunky transformations (for instance, artifact version -> language version).
- Usage of embedded compiler's 'LanguageVersion.LATEST_STABLE' and similar constants. Although we plan to switch to the bootstrap compiler version, the IDE plugin shouldn't expose new language features by default. JPS compiler version is used instead, as it's guaranteed to be stable (or ~stable).

GitOrigin-RevId: 3abde796c58680fd6873af68e02d9b5a8edf6ed1
2022-03-23 07:43:15 +00:00
Vladimir Dolzhenko
6baeb79e23 [kotlin] Move slow kotlin test class icon calculation to getSlowInfo
Slow kotlin test class provider is based on LightClasses and therefore very expensive, it should be calculated on a slow path

#KTIJ-20396

GitOrigin-RevId: 084c7f5278e7036374c92b986702fc9943b6cd1e
2022-03-10 16:53:13 +00:00
Dmitry Batkovich
69137280d4 kotlin: do not use possibly heavy index queries (filetype index with module scope) when trying do check is kotlin configured in module
GitOrigin-RevId: 89a6137254e19c134758b819f380b54d2ce5de13
2022-02-21 10:40:15 +00:00
Yan Zhulanow
a73802740f Split kotlinc.kotlin-compiler library to common/fe10/fir/ir
GitOrigin-RevId: 6611c04934c6d6623d7a892ed41e957dc90b69fd
2022-02-08 08:51:09 +00:00
Yan Zhulanow
50e3886f5d Remove obsolete module kotlin.resources-fe10
GitOrigin-RevId: ba6d7f665b6933f9c5cbdb5ec23652a1b365603b
2022-01-22 11:10:29 +00:00
Nikita Bobko
b20897b97d Move kotlin.resources* imls into subdirectories
imls shouldn't be in same directory otherwise it's not
possible to generate build.gradle.kts files from imls

GitOrigin-RevId: 9a611fe57b7665e5fbf25cbed38b965a700dd4fe
2022-01-22 11:01:39 +00:00
Dmitry Savvinov
6422e41a98 Add debug strings to frontend scopes-related structures
Such as:
- PackageFragmentProviders, and, in particular,
CompositePackageFragmentProviders
- JavaPackageFragments
- Scopes produced by those providers

The rationale is that a lot of frontend-facing bugs (like red code) are
easily recognizeable in resolution. But at that point you just see a
bunch of scopes, without meaningful toStrings, you don't know who has
produced them, and what's exactly wrong.

With this commit it should make debugging slightly easier: now at least
you'll be able to see that "this scope is a scope of package fragment
for foo.bar of module baz" and decide whether the declaration should or
should not have been resolved from such scope.

Original commit: 708fead1cc8ff47c6af7a1b78a3ab113a1491f06

GitOrigin-RevId: fc6a4e7ed96e9303b8efa3ed65873cf425ac6728
2022-01-22 11:00:22 +00:00
Nikita Bobko
f305e773dc tests-common: move all classes in subpackage
tests-common was copy-pasted from kotlin repo some time ago cause it had a lot of infrastructure
code inside and we needed to adopt this infrastructure code for new infra for Kotlin
plugin + intellij repo. Now kotlin created new test infrastrucutre `:compiler:tests-common-new`,
`:compiler:test-infrastructure`, `:compiler:test-infrastructure-utils` and FIR started depending
on it (pain screams). Some classes from `:compiler:tests-common` was moved to moduled of new
compiler infrastructure. In order to avoid FQN classes slashing let's move our `tests-common`
into subpackage

GitOrigin-RevId: 4ce8485ca94d27c304c1fc9f08ecb1bc8a10ddbe
2022-01-22 10:56:41 +00:00
Nikita Bobko
b06aade9ba 1/2 Replace source dependency on Kotlin JPS plugin with binary dependency
Kotlin JPS plugin is going to be migrated to Kotlin repo (in scope of KTIJ-11633),
so let's replace all dependencies on sources with dependencies on binaries

GitOrigin-RevId: 83fa7ffc92b40fc9740d103013ef3341068593b5
2021-12-21 22:10:43 +00:00
Nikita Bobko
098573c57c Split kotlin-stdlib-jdk8 and kotlin-reflect libraries
Some facts:
1. Kotlin plugin bundles own version of kotlin-stdlib and reflect (see KotlinPluginBuilder.groovy).
   We bundle own version of stdlib and reflect (but not use the one which comes with IDEA) because
   otherwise we would have runtime errors in compiler frontend which we depend on
   (kotlinc.kotlin-compiler)
2. Kotlin plugin exists in two release cycles. We have special `kt-xxx-[kotlin_compiler_version]`
   branches (e.g. kt-212-1.5.30 branch) in the repository where we put Kotlin plugin fixes which
   should be delivered in KT release cycle.
   2.1 The fact that we publish Kotlin plugin artifacts to marketplace from special kt-branches
       leads to the fact that stdlib may be different in Kotlin plugin and IntelliJ IDEA. By
       separating `kotlin-stdlib-jdk8` and `kotlinc.kotlin-stdlib` we make it obvious that Kotlin
       plugin has it's own stdlib

This commit fixes broken incremental compilation in kt-212-master
on TeamCity because now we have to bootstrap only kotlinc.kotlin-stdlib.
Previously, we had to bootstrap kotlin-stdlib-jdk8 which caused problems
with incremental compilation because whole monorepo depends on this artifact.

Also now during kotlinc updates in `intellij/master` we don't have to update kotlin-stdlib-jdk8
every time to keep kotlinc version the same among different imls/xmls in the monorepo
https://jetbrains.team/im/code/258iod1xjiFZ?message=BK9Aq0SIM1A&channel=152Z1w0RwrFp

(cherry picked from commit 23b2a70604c5c578983b0d76cb8634b9ed301a59)

GitOrigin-RevId: 773c01c405f2eb9db8d88ce3c58e4bdcee66c085
2021-11-10 13:52:22 +00:00
Vladimir Dolzhenko
bbd2523d62 [kotlin] Utility method usages clean up
Reuse shortcuts for runReadActionInSmartMode, isApplicationInternalMode, isUnitTestMode

GitOrigin-RevId: be3430726ff1e7e07d047766c4c121d915dc5291
2021-09-08 09:27:59 +00:00
Yan Zhulanow
087acbed70 [kotlin] Remove extra dependencies on kotlin.gradle.gradle-tooling
GitOrigin-RevId: 12cb9dfbd8aa1f9156da0f1a2b2a306481e52562
2021-09-03 08:11:39 +00:00
Yan Zhulanow
c1376f46d0 [kotlin] Extract Kotlin project model classes to a separate module
GitOrigin-RevId: 4d3b10f5039111b067750a947ced0075550bde5f
2021-09-03 08:11:27 +00:00
Yan Zhulanow
ef1c5d97ce [kotlin] Move classes in kotlin.gradle.gradle-tooling to org.jetbrains.kotlin.idea.gradle package
GitOrigin-RevId: 42c8c347c095253115314f31fd251f4dbc66de0c
2021-09-03 08:11:25 +00:00
Yan Zhulanow
4bfc2688a2 [kotlin] Remove unneeded Kotlin facets in newly created modules
GitOrigin-RevId: 6d9e6476490ef2f0046377e052338b31a84d582e
2021-08-30 05:20:26 +00:00
Yan Zhulanow
e37805033d [kotlin] Move tests of the kotlin.native module to kotlin.native.tests to avoid circular dependencies
GitOrigin-RevId: b5ceacfd6a390f6fbc70ff790f6bd931a6cc69dc
2021-08-30 05:20:05 +00:00
Yan Zhulanow
fb7a7da32c [kotlin] Add kotlin.plugin to test classpath of Kotlin modules with tests
GitOrigin-RevId: b3304bd1aadde1fa89aaceec70fc54f0a976a7f8
2021-08-30 05:19:47 +00:00