Commit Graph

88637 Commits

Author SHA1 Message Date
Roman Golyshev 287c23269a FIR IDE: Make getContainingPsi work with ItLambdaParameter source
It prevented the code completion to work in positions like
`"hello".let { <caret> }`
2021-12-24 16:19:30 +03:00
Sergey Bogolepov 1dd76fa637 [K/N] Re-enable Hypervisor framework
^KT-50045
2021-12-24 12:44:36 +00:00
Sergey Bogolepov 2f6b367e25 [K/N] Enable Kernel framework
Export only minimal set of headers that is required for Hypervisor.
2021-12-24 12:44:36 +00:00
Yahor Berdnikau 8bdb19a11e Deprecate 'kotlin.coroutines' property and extension
Deprecation 'kotlin.coroutines' property and related
'kotlin.experimental.coroutines' extension DSL. These properties
are not doing anything since 1.5.0 release and has to be removed long
time ago.

^KT-50369 Fixed
2021-12-24 11:55:56 +00:00
Alexander Shabalin 5de0f78350 [K/N] Extract SingleThreadExecutor.
^KT-48537

Merge-request: KT-MR-5338
Merged-by: Alexander Shabalin <Alexander.Shabalin@jetbrains.com>
2021-12-24 11:04:45 +00:00
Victor Petukhov d3ee284461 [FE 1.0] Check for readiness to fix for all type variables after try analysing a lambda with the builder inference
^KT-50498 Fixed
2021-12-24 13:37:45 +03:00
Ilya Muradyan bb34a74abb REPL: Fix completion for protected members 2021-12-24 08:34:40 +03:00
Evgeniy.Zhelenskiy 610429a278 [Tests] Move non-value class test to the corresponding folder 2021-12-24 00:26:18 +00:00
Stanislav Erokhin 61526c9700 Move AbstractJsScriptlikeCodeAnalyser to the kotlin-scripting-compiler-js module 2021-12-23 20:10:19 +03:00
Ilya Goncharov 52ccf3d6ec [JS IR] Not export fun with stable name and default argument
if it is not exported, but just with stable name

^KT-50464 fixed

Merge-request: KT-MR-5324
Merged-by: Ilya Goncharov <Ilya.Goncharov@jetbrains.com>
2021-12-23 15:21:00 +00:00
Mikhail Glukhikh 61e0375900 Drop YIELD_IS_RESERVED diagnostic in 1.7.0 #KT-27750 Fixed 2021-12-23 17:45:50 +03:00
Mikhail Glukhikh 0739925869 Drop QUALIFIED_SUPERTYPE_EXTENDED_BY_OTHER_SUPERTYPE diagnostic in 1.7.0
#KT-49016 Fixed
2021-12-23 17:45:49 +03:00
Mikhail Glukhikh f53cd22253 FIR: copy builder inference session when creating snapshot for locals
This commit fixes one builder inference case from KT-49925
2021-12-23 17:28:01 +03:00
Mikhail Glukhikh 3f02309dad FIR: add example 2 from KT-49925 (fails yet) 2021-12-23 17:27:59 +03:00
Mikhail Glukhikh dde4c46df7 FIR: add original test from KT-49925 (passes) 2021-12-23 17:27:56 +03:00
Ilya Matveev 2f32214106 [K/N][Runtime] Fix deadlock in file initialization
Issue #KT-50491 Fixed
2021-12-23 13:21:01 +00:00
Pavel Kunyavskiy fd63fed8b4 [K/N] Filecheck test for EnumWhenLowering 2021-12-23 11:09:29 +00:00
Pavel Kunyavskiy 60cb8543f0 [K/N] Add test for tls load optimisation
^KT-50139
2021-12-23 11:09:28 +00:00
Pavel Kunyavskiy 1956fcb14f [K/N] Add test for inlining of adopted function reference
^KT-48179
2021-12-23 11:09:28 +00:00
Pavel Kunyavskiy c97f4a4d20 [K/N] Support -Xsave-llvm-ir-after compiler option 2021-12-23 11:09:27 +00:00
Victor Petukhov 0689d74353 [Compiler CLI] Use LanguageVersion.LATEST_STABLE instead of KotlinVersion.CURRENT for java type enhancement settings to prevent dependency on kotlin version. 2021-12-23 13:42:58 +03:00
Victor Petukhov 2c51799e0a Revert "Temporary workaround for failing tests on teamcity."
This reverts commit 2436ca3d8b.
2021-12-23 13:42:56 +03:00
Yahor Berdnikau 6c02ef0a44 Provide Android SDK with accepted licenses
For benchmarks using Android provide Android SDK via environment.

^KT-49921 In Progress
2021-12-23 11:03:13 +01:00
Yahor Berdnikau 10a1d2ca1d Pass current Kotlin version to benchmark script
Allows using different current Kotlin versions in benchmark.
For example, SNAPSHOT version when current branch is master and
dev version on CI build.

^KT-49921 In Progress
2021-12-23 10:00:23 +01:00
sebastian.sellmair ba201a249e [MPP] allModulesProvidingActualsFor: Support non-hmpp ide case
^KT-50156
2021-12-23 08:57:54 +00:00
sebastian.sellmair 429e1dad9f [MPP][Test] MPPCompositeMode: Include transitive dependsOn dependencies
^KT-50156

(cherry picked from commit a6bc8807e5)
2021-12-23 08:57:54 +00:00
sebastian.sellmair 5e657784db [MPP] Improve performance of ExpectedActualDeclarationChecker.kt
A project like OKIO might have a lot (~700) module-dependsOn-paths
Prior this commit `findActualForExpected` was called for all modules
in all said module-dependsOn-paths  which resulted in several thousand
invocations.

The new approach is to call `findActualForExpected` only for known
leaf modules to find all reachable actuals. From there, the actuals
get associated with intermediate modules in this paths and reported
accordingly.

^KT-50156 Verification Pending
2021-12-23 08:57:54 +00:00
Mikhael Bogdanov 8324330823 Substitute hardcoded getJdkXXHome with test jdkHome 2021-12-23 07:26:03 +00:00
Mikhael Bogdanov faa2a67180 Add Java17ModulesIntegrationTest tests, fix problem with wrong diagnostic 2021-12-23 07:26:03 +00:00
Mikhael Bogdanov 78597912c0 Update tests for Java modules to be compatible with JDK 17 2021-12-23 07:26:02 +00:00
Mikhael Bogdanov 913c7ad956 Rename Java11ModulesIntegrationTest into base JavaModulesIntegrationTest 2021-12-23 07:26:02 +00:00
Mikhael Bogdanov 860d0a4296 Add cli test with default JDK8 and -Xjdk-release=1.8 2021-12-23 07:26:01 +00:00
Mikhael Bogdanov 9221810d7f -Xjdk-release. Review fixes. Pass nullable jdkRelease 2021-12-23 07:26:01 +00:00
Mikhael Bogdanov a6052dce44 -Xjdk-release. Review fixes 2021-12-23 07:26:01 +00:00
Mikhael Bogdanov 3593e45b97 Rename 'RELEASE' fields into 'JDK_RELEASE' 2021-12-23 07:26:00 +00:00
Mikhael Bogdanov b8ca22da87 Update extraHelp test 2021-12-23 07:26:00 +00:00
Mikhael Bogdanov f5da166d7c Switch -jvm-target default to null 2021-12-23 07:25:59 +00:00
Mikhael Bogdanov 6379ed22d1 Calculate proper roots for JDK 10-11
#KT-29974
2021-12-23 07:25:59 +00:00
Mikhael Bogdanov a062eb04ac Release flag. Check conflicts with `-jvm-target' 2021-12-23 07:25:59 +00:00
Mikhael Bogdanov c2d17ded33 Release flag. Add diagnostics 2021-12-23 07:25:58 +00:00
Mikhael Bogdanov e5e3e9d326 Advanced modules supports
#KT-29974
2021-12-23 07:25:58 +00:00
Mikhael Bogdanov ae81aaa7b0 Tune module graph dependencies building 2021-12-23 07:25:57 +00:00
Mikhael Bogdanov 409d36c911 Basic -Xrelease option support
#KT-29974 Fixed
2021-12-23 07:25:57 +00:00
Mikhael Bogdanov 6026a96349 Add flag for ct.sym serch 2021-12-23 07:25:56 +00:00
Mikhael Bogdanov 22b3688493 Support sig files processing 2021-12-23 07:25:56 +00:00
Nikolay Krasko 1e378ed136 Stop publication for kotlin-scripting-compiler-js
Library is in undefined status and might be removed soon.

^KTI-741 Fixed
2021-12-23 03:46:33 +03:00
Nikolay Krasko 8ef20aa045 Remove test dependencies from kotlin-scripting-compiler-js 2021-12-23 03:46:31 +03:00
konstantin.tskhovrebov e955fa429b Add groovy friendly DSL for kotlin artifacts. 2021-12-23 01:04:37 +03:00
Alexander Udalov 898c46c124 Minor, uncomment UInt in annotation instantiation test
KT-49998 is fixed so now it works.
2021-12-22 22:21:00 +01:00
Alexander Udalov 56fe62b7fb Reflection: don't use Annotation.equals where identity equals works
In KT-50198, Spock generates a method named `$spock_feature_0_0` which
is annotated with `org.spockframework.runtime.model.FeatureMetadata`.
The problem is that for some reason (probably a bug in Spock or some
kind of version mismatch), this annotation lacks value for the method
`dataVariableNames`, which has no default value.

If an annotation lacks a non-default value, it's OK for the JVM, but not
OK for Java reflection. Specifically, `Annotation.equals` for annotation
proxy classes created at runtime checks that values are equal for each
annotation method. If there's no value for some annotation method
without a default value, it fails with NPE.

kotlin-reflect used `Annotation.equals` in `ReflectJavaAnnotation`,
however there was no intention to perform structural equals on
annotations; equals/hashCode were implemented only to make stuff like
`LazyJavaAnnotations.annotationDescriptors` work, which is a hash map
where `JavaAnnotation` (`ReflectJavaAnnotation` in kotlin-reflect) is
the key.

This commit changes equals/hashCode to use identity instead, since this
is cheaper, and safer because of cases like the one described above.
This is also consistent with other implementations, e.g. PSI-based
`JavaAnnotationImpl` which naturally checks if the underlying PSI
elements are the same, without any kind of structural equality.

I'm not entirely sure why this appeared as a regression in 1.5.30, but
the most likely candidate is the signature enhancement refactoring,
after which we (supposedly) started to load more annotations on
declarations coming from Java, just in case they are annotated with some
nullability annotations.

No test added because to replicate the issue, we basically need to
generate an incorrect annotation proxy class _at runtime_, which is
difficult.

 #KT-50198 Fixed
2021-12-22 22:20:20 +01:00