Commit Graph

91707 Commits

Author SHA1 Message Date
Roman Golyshev 644db43e67 [FIR IDE] Filter non-implicit smart-casts in KtSmartCastProviderMixIn
Also, make `getSmartCastInfo` work more like SMART_CAST slice for
binding context

^KTIJ-21013 Fixed
2022-03-18 01:01:46 +04:00
sebastian.sellmair 1b45c00fc7 Add :kotlin-tooling-core and :kotlin-tooling-metadata to 'toolsTest' 2022-03-17 16:53:41 +00:00
sebastian.sellmair a87c2ace29 kotlin-tooling-core: Remove plugin jps-compatible 2022-03-17 16:53:41 +00:00
sebastian.sellmair f540b4bc82 KotlinToolingVersion: Evaluate maturity eagerly 2022-03-17 16:53:40 +00:00
sebastian.sellmair 6800475202 KotlinToolingVersion: Support -release in versions 2022-03-17 16:53:40 +00:00
sebastian.sellmair 87c339f637 [Minor] KotlinMetadataCompilationData: Use LinkedHashMap directly
Previously commonCompilationDataPerFragment and
nativeCompilationDataPerFragment were declared as using
`mutableMapOf`, which will not offer the necessary 'compute' function
in IDE analysis.

KT-51386
2022-03-17 15:39:55 +00:00
sebastian.sellmair 85998f8857 [KPM] Consistently use uppercase factory style for idea model builders
KT-51386
2022-03-17 15:39:55 +00:00
sebastian.sellmair 03cf978b77 [KPM] Consistently seal interfaces in :kotlin-gradle-plugin-idea
KT-51386
2022-03-17 15:39:54 +00:00
sebastian.sellmair 1a0d8f777c [KPM] Remove IdeaKotlinModuleIdentifier in favor of consistent IdeaKotlinFragmentCoordinates
KT-51386
2022-03-17 15:39:54 +00:00
sebastian.sellmair ef3a3d71b9 [KPM] Remove duplicate KotlinGradleFragmentInternal.refinesClosure
KT-51386
2022-03-17 15:39:54 +00:00
sebastian.sellmair fc0b78e106 [KPM] Share run configuration for updating kgp-idea binary reference
KT-51386
2022-03-17 15:39:53 +00:00
sebastian.sellmair e1ead6b8bf [KPM] Integrate refines dependencies into IdeaKotlinSourceDependency
KT-51386
2022-03-17 15:39:53 +00:00
sebastian.sellmair 0f8f61c373 [KPM] Introduce separate IdeaKotlinDependencyCoordinates entity
This splits IdeaKotlinSourceCoordinates from the actual
IdeaKotlinSourceDependency

KT-51386
2022-03-17 15:39:52 +00:00
sebastian.sellmair 588ea65d66 [KPM] Replace .containingModule.variantsContainingFragment with .containingVariants
KT-51386
2022-03-17 15:39:52 +00:00
sebastian.sellmair f65c61472b [KPM] Remove now unused IdeFragmentDependencyResolver
KT-51386
2022-03-17 15:39:51 +00:00
sebastian.sellmair edbf5c5cd8 [KPM] Document IdeaKotlinProjectModelBuilder
KT-51386
2022-03-17 15:39:51 +00:00
sebastian.sellmair cf19261173 [KPM] Document IdeaKotlinPlatformDependencyResolver
KT-51386
2022-03-17 15:39:51 +00:00
sebastian.sellmair e2d61e7f94 [KPM] Document IdeaKotlinDependencyTransformer
KT-51386
2022-03-17 15:39:50 +00:00
sebastian.sellmair fce0145753 [KPM] Document IdeaKotlinDependencyEffect
KT-51386
2022-03-17 15:39:50 +00:00
sebastian.sellmair 882c1186f2 [KPM] Document AbstractLightweightIdeaDependencyResolutionTest
KT-51386
2022-03-17 15:39:49 +00:00
sebastian.sellmair d7ce7387f7 [KPM] Implement SimpleProjectToProjectDependencyResolutionTest
KT-51386
2022-03-17 15:39:49 +00:00
sebastian.sellmair e55bba9c4c [KPM] kotlin-gradle-plugin-idea: Bump minimalBackwardsCompatibleVersion
KT-51386
2022-03-17 15:39:48 +00:00
sebastian.sellmair a5a68543c2 [KPM] Update kotlin-gradle-plugin-idea.txt API reference
KT-51386
2022-03-17 15:39:48 +00:00
sebastian.sellmair 235062aeec [KPM] MviKotlinIdeaDependencyResolutionTest: Assume androidSdk for android test
KT-51386
2022-03-17 15:39:48 +00:00
sebastian.sellmair 05d33d9df6 [KPM] MviKotlinIdeaDependencyResolutionTest: Take host into account for platform libaries
KT-51386
2022-03-17 15:39:47 +00:00
sebastian.sellmair a4eb62e317 [KPM] kotlin-gradle-plugin-idea: Use special publication for backwards compatibility tests
KT-51386
2022-03-17 15:39:47 +00:00
sebastian.sellmair 555db121fa [KPM] Ensure local stdlib is resolvable in gradle functionalTest
KT-51386
2022-03-17 15:39:46 +00:00
sebastian.sellmair 1a5fc84080 [KPM] Implement initial kpm/idea dependency resolution
^KT-51386 Verification Pending
2022-03-17 15:39:46 +00:00
sebastian.sellmair 8b84ed4978 [KPM] Suppress unused serialVersionUID in Empty
KT-51386
2022-03-17 15:39:45 +00:00
sebastian.sellmair 207f510cca [KPM] IdeaKotlinProjectModelObjectGraphTest: Implement WriteReplacedModel annotation
KT-51386
2022-03-17 15:39:45 +00:00
sebastian.sellmair b353533ee1 [KPM] Run Configuration: Test / Kotlin Gradle Plugin / idea: Continue
KT-51386
2022-03-17 15:39:45 +00:00
sebastian.sellmair 1aa8c11301 [KPM] IdeaKotlinCompilationOutput: Fix missing serialVersionUID
KT-51386
2022-03-17 15:39:44 +00:00
sebastian.sellmair 1e5d398d6e [KPM] IdeaKotlinProjectModelObjectGraphTest: Include subtypes when resolving nodes
KT-51386
2022-03-17 15:39:44 +00:00
Anton Lakotka 2be85610a3 [Gradle] Add reminder to remove kotlinExtension check in consumerApiUsage
The `kotlinExtension` check in consumerApiUsage function can be removed
when legacy MPP plugin `kotlin-platform-common` is also removed from
the code base.
2022-03-17 11:13:02 +00:00
Anton Lakotka c42cedc0d0 [Gradle] Use METADATA attribute when no compatibility variant enabled
Consumer configurations with following set of attributes:

* org.gradle.usage = 'kotlin-api'
* org.jetbrains.kotlin.platform.type = 'common'

are supposed to consume legacy `*.kotlin_metadata` artifacts.
And can be consumed by HMPP project with
"Compatibility Metadata Variant Enabled" flag. For such purpose
`metadataCompileClasspath` configuration is configured with attributes
mentioned above.
There is no sense to consume such artifacts in HMPP projects without
compatibility metadata variant. And in order to prevent
breaking changes in KGP ecosystem, legacy configurations are
reconfigured to consume new KLIB metadata artifacts. Instead of failing
on resolution.

^KT-50925 Verification Pending
2022-03-17 11:13:02 +00:00
Anton Lakotka 9d754d7631 [Gradle][test] Unignore test that fails due to the ^KT-50925
This reverts commit 74ac51a4cb.
2022-03-17 11:13:01 +00:00
Anton Lakotka 32f01999b1 [Gradle] Add test for KT-50925 2022-03-17 11:13:01 +00:00
Yan Zhulanow dd2afb558e Port stub-relating changes from 'master' of IntelliJ 2022-03-17 17:44:55 +09:00
wrongwrong a1b6c9f546 Fixed a bug where DEFAULT_CONSTRUCTOR_MARKER appeared twice as an argument
#KT-27598 Fixed

Co-authored-by: Alexander Udalov <alexander.udalov@jetbrains.com>
2022-03-17 00:54:09 +01:00
Pavel Punegov 5851f757f5 [K/N][build] Add comment about dependency and cross build 2022-03-16 10:46:16 +00:00
Pavel Punegov ce5094e586 [K/N][build] Don't rewrite same stdlib parts during copy 2022-03-16 10:46:16 +00:00
Martin Petrov 2a1d5d3e0a [Native] Explicitly use Foundation in ObjC export. (#4762)
This enables using exported Frameworks with `-fmodules-decluse`.
One use-case for this is ensuring that distributed builds are
explicitly providing all required modules; this is important for
reproducibility.

For more background on `use` declarations, see:
https://clang.llvm.org/docs/Modules.html#use-declaration

The easiest way to reproduce this locally is by compiling a framework,
and emitting a pcm file with `swiftc`. Note that this requires a
reference to a pcm for Foundation, which can be found in the clang
ModuleCache.

```
kotlin-native/dist/bin/kotlinc-native ~/test.kt -produce framework -o /tmp/TestFramework.framework
swiftc -emit-pcm -module-name TestFramework -o /tmp/TestFramework.pcm /tmp/TestFramework.framework/Modules/module.modulemap -Xcc -fmodules-decluse -Xcc -fmodule-file=Foundation=$HOME/Library/Developer/Xcode/DerivedData/ModuleCache.noindex/1IQ2SWDEIAPH0/Foundation-2FJBXN8U6QRTS.pcm
```
2022-03-16 12:15:50 +03:00
Roman Golyshev 7bcd67068c [FIR IDE] Resolve explicit invoke calls more correctly
Also, enable some muted tests

^KTIJ-21343 Fixed
2022-03-15 21:29:36 +03:00
Mads Ager 0c4f2711d6 Avoid reading /tmp/build.txt in standalone compiler invocations.
^KT-51627 Fixed

kotlinc will currently read /tmp/build.txt in an attempt to
determine an IDEA version number for IDEA plugin compatibility
checking. If that file exists and does not match the expected
format kotlinc will fail.

Since standalone kotlinc is not IDEA, this change explicitly
sets the system property for the build number to a fallback
value. That avoids reading /tmp/build.txt.

closes https://github.com/JetBrains/kotlin/pull/4763
2022-03-15 18:37:01 +01:00
Ilya Kirillov 8b8d81cf2f [symbol lc] fix compilation of SymbolLightClassesForLibraryFrontendApiTestConfiguratorService 2022-03-15 19:50:19 +03:00
Jinseong Jeon a106ec6530 Do not create FastJarFileSystem when USE_PSI_CLASS_FILES_READING
because the intention of that configuration is to use "slower" class
reading.

In the near future, even though FIR is enabled, which uses experimental
faster jar file system, FIR clients (e.g., FIR UAST or Android Lint) may
still need to use slower class reading. So, we need to handle that
configuration before checking others.
2022-03-15 19:50:18 +03:00
Jinseong Jeon 24ec1e0cab AA: include root when populating files for scope of KtLibraryModule 2022-03-15 19:50:18 +03:00
Jinseong Jeon 6ec6def8e3 AA: reuse CoreJarFileSystem from KotlinCoreEnvironment in tests 2022-03-15 19:50:17 +03:00
Jinseong Jeon 89725941df AA: showcase an error in resolution to stdlib in standalone mode 2022-03-15 19:50:16 +03:00
Yahor Berdnikau b5a5f25b99 Distribute SimpleKotlinGradleIT test to other tags
^KT-45745 In Progress
2022-03-15 15:19:18 +01:00