Commit Graph

88599 Commits

Author SHA1 Message Date
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
Mikhail Glukhikh 2fc372413e AbstractMany...InferenceSession -> FirInferenceSessionForChainedResolve 2021-12-22 22:21:43 +03:00
Mikhail Glukhikh 6342eb96c0 FIR: replace constraint with NotFixedTypeToVariableSubstitutor properly
In this commit we add nullability to upper type of a substituted
constraint in the situation like (Stub<_L> <: SomeType),
where _L is fixed to nullable Stub<_L>?.
We have to change this constraint to L <: SomeType? and not to
L <: SomeType as before, otherwise nullability become broken
(direct substitution of Stub<_L> to L is illegal here).

#KT-50470 Fixed
2021-12-22 22:21:43 +03:00
Mikhail Glukhikh dafc6d849c FIR: code cleanup in integrateConstraintToSystem 2021-12-22 22:21:42 +03:00
Mikhail Glukhikh 6614e1f3af FIR: extract some inference-related type substitutors to classes 2021-12-22 22:21:41 +03:00
Mikhail Glukhikh 97ed14cdee FIR: add ConeStubTypeForSyntheticFixation branch to withNullability 2021-12-22 22:21:40 +03:00
Mikhail Glukhikh 30ea1601d5 FIR: commonize builder & inference sessions 2021-12-22 22:21:39 +03:00
Mikhail Glukhikh e872cfa69a FIR: add test repeating problem from KT-50470 2021-12-22 22:21:39 +03:00
Sergej Jaskiewicz 3fb1096c18 [JS IR] Support IR dump in JS tests 2021-12-22 17:55:33 +00:00
Stanislav Erokhin 2436ca3d8b Temporary workaround for failing tests on teamcity.
This commit should be reverted later with testdata update
2021-12-22 18:51:20 +01:00
sebastian.sellmair 96e893223f Revert "[MPP] Improve performance of ExpectedActualDeclarationChecker.kt"
This reverts commit 8880ea1c16.
2021-12-22 17:22:14 +01:00
sebastian.sellmair d7445dc59c Revert "[MPP][Test] MPPCompositeMode: Include transitive dependsOn dependencies"
This reverts commit a6bc8807e5.
2021-12-22 17:22:13 +01:00
sebastian.sellmair a6bc8807e5 [MPP][Test] MPPCompositeMode: Include transitive dependsOn dependencies
^KT-50156
2021-12-22 16:01:37 +00:00
sebastian.sellmair 8880ea1c16 [MPP] Improve performance of ExpectedActualDeclarationChecker.kt
^KT-50156 Verification Pending
2021-12-22 16:01:37 +00:00
Vyacheslav Gerasimov 03a3e7c68e Build: Workaround java-rt loading into Gradle daemon
Fixes IDEA diff for tests not showing diff transfer buttons in the
 "Click to see difference" window for a failed test
2021-12-22 16:23:08 +03:00
Dmitriy Novozhilov d7c7d1efd2 Advance bootstrap to 1.6.20-dev-7317 2021-12-22 16:00:31 +03:00
Ilya Goncharov 0b871d7534 [IR] Be ready if message of CompilationException throw exception 2021-12-22 10:50:36 +00:00
Pavel Punegov d13f6744a6 [Native] Improve skipped and filed tests reporting in GTestLogger
List skipped tests appropriately like the GTest does
2021-12-22 10:11:36 +00:00
Anton Bannykh 0274192241 [JS] shorten the paths
Otherwise test path lengths exceed 255 limit on Windows
2021-12-22 10:14:33 +03:00
Anton Bannykh 4c33cb8016 [JS IR] IC: support per-module in K2JsIrCompiler 2021-12-22 10:14:33 +03:00
Anton Bannykh ca60caa7e9 [JS IR] IC: pass through the main args 2021-12-22 10:14:32 +03:00
Anton Bannykh 106d3c4c9c [JS IR] minor: eliminate obsolete namer creation 2021-12-22 10:14:08 +03:00
Anton Bannykh aa628ae7b3 [JS IR] tests both per-module and regular mode 2021-12-22 10:14:08 +03:00
Anton Bannykh 95b5c44fba [JS IR] IC: emit source maps 2021-12-22 10:13:07 +03:00
Anton Bannykh 4d8926cf26 [JS IR] IC: support per-module layout 2021-12-22 10:13:07 +03:00
Anton Bannykh 434c23a343 [JS IR] IC: avoid conflicts in local declaration signatures 2021-12-22 10:13:07 +03:00
Anton Bannykh 670572bbc6 [JS IR] IC: test private declarations with same names 2021-12-22 10:13:07 +03:00
Anton Bannykh 9b47a321d5 [JS IR] assert there are no clashing declarations 2021-12-22 10:13:07 +03:00
Anton Bannykh 175d722097 [JS IR] save JsIrProgramFragment definitions 2021-12-22 10:13:07 +03:00
Dmitry Petrov 915e949dbc JVM KT-49092 fix stack corruption in redundant boxing elimination 2021-12-22 05:32:26 +00:00
Xin Wang c74453d8d2 JVM_IR KT-48987 handle star projection arguments in smart casts 2021-12-22 00:48:15 +01:00
Xin Wang 944fa7e2f8 JVM IR: recover accidentally lost backingField (KT-49998) 2021-12-22 00:35:33 +01:00
sebastian.sellmair b6b5ecc352 [MPP] Remove unnecessary ExpectActualResolver receiver
^KT-50120
2021-12-21 21:31:49 +00:00
sebastian.sellmair 760c33bd43 [MPP] Fixup ExpectDeclarationsRemoving after changes to ExpectActualResolver
^KT-50120
2021-12-21 21:31:48 +00:00
sebastian.sellmair a4fd317f9e [MPP][Test] Rename MULTIPLATFORM_COMPOSITE_ANALYSIS_MODE_ENABLED
... to ENABLE_MULTIPLATFORM_COMPOSITE_ANALYSIS_MODE

^KT-50120
2021-12-21 21:31:48 +00:00
sebastian.sellmair 3d4439a2dc [MPP][Test] Enable 'FIR_IDENTICAL' default directive for AbstractDiagnosticsWithMultiplatformCompositeAnalysisTest
^KT-50120
2021-12-21 21:31:48 +00:00
sebastian.sellmair bd303007f8 [MPP][Test] Fix style issue in MultiplatformAnalysisConfiguration
https://jetbrains.team/im/review/rkiO80z6BKm?message=9COoK0SQK6G&channel=1roPNU0orOwc

^KT-50120
2021-12-21 21:31:47 +00:00
sebastian.sellmair 601026fb51 [MPP][Test] Remove dangling comma in ClassicFrontendFacade
^KT-50120
2021-12-21 21:31:47 +00:00
sebastian.sellmair 760c496000 [MPP][Test] Enable 'SKIP_TXT' default directive for AbstractDiagnosticsWithMultiplatformCompositeAnalysisTest
^KT-50120
2021-12-21 21:31:46 +00:00