Commit Graph

88613 Commits

Author SHA1 Message Date
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
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