Commit Graph

87184 Commits

Author SHA1 Message Date
Pavel Punegov ac5e818c26 [K/N][build] Put get to input annotations 2021-10-22 09:29:20 +00:00
Pavel Punegov 3183b7a499 [K/N][build] Fix endorsed libs dependencies 2021-10-22 09:29:20 +00:00
Pavel Punegov 42aa8b1337 [K/N][build] the field was protected but why 2021-10-22 09:29:19 +00:00
Pavel Punegov bc89921fdd [K/N][build] Fix cache location 2021-10-22 09:29:19 +00:00
Pavel Punegov 634812f96f [K/N][build] Split stdlib and endorsed libraries build and caching
Due to the usage of dist as an input and output at the same time by
different tasks Gradle issued warning about Execution optimizations
turning off. The fix is to split inputs and outputs in the build and
cache tasks of stdlib and endorsed libs.
2021-10-22 09:29:19 +00:00
Yahor Berdnikau ae2d447ef4 Update KGP tests readme.
Reflect actual test setup information.

^KT-45745 In Progress
2021-10-22 07:18:43 +00:00
Yahor Berdnikau 2b53965f11 Add tasks and annotations for Gradle/Jvm and Gradle/Js tests.
We will split our tests into supported platforms, like JVM, Js, etc...
Tests for supported Gradle features should be added per platform.

To run any test (except daemons) also "all" task was added.

^KT-45745 In Progress
2021-10-22 07:18:43 +00:00
Dmitry Petrov d5f6674d2d JVM_IR KT-49335 run RepeatedAnnotationLowering per module
Otherwise, we drop annotation constructors in AnnotationLowering,
which breaks RAL in case of annotation container declared in different
file.
2021-10-21 21:22:36 +03:00
Dmitriy Novozhilov a2b8493f47 [FE 1.0] Prohibit using non exhaustive if and when in rhs of elvis expression
^KT-44705
^KT-49349 Fixed
2021-10-21 19:39:51 +03:00
Dmitriy Novozhilov 06a26a5a74 [FE 1.0/FIR] Fix message of SEALED_SUPERTYPE_IN_LOCAL_CLASS diagnostic
^KT-46285 Fixed
2021-10-21 19:39:49 +03:00
Dmitriy Novozhilov 94664694df [FIR] Prohibit confusing syntax inside when branches
^KT-48385
2021-10-21 19:39:46 +03:00
Dmitriy Novozhilov bf453674b9 [FIR] Make LighterASTNode.getChildren utility return list of not null nodes 2021-10-21 19:39:42 +03:00
Dmitriy Novozhilov f52361ac2b [FE 1.0] Properly report NON_TRIVIAL_BOOLEAN_CONSTANT on parenthesized expressions
^KT-39883
2021-10-21 19:39:39 +03:00
Dmitriy Novozhilov 1513e739c6 [FE 1.0] Prohibit confusing syntax inside when branches
^KT-48385 Fixed
2021-10-21 19:39:36 +03:00
Pavel Kunyavskiy 653fc85461 [K/N] Move basic blocks with lazy init to middle of function
CoreSymbolication heuristics assume that last instruction in function
corresponds to last function line. This is not always true anyway,
but with this hack this will happen more often.
2021-10-21 12:18:40 +00:00
Pavel Kunyavskiy 6d3158b275 [K/N] Adjust addresses when passing to source line resolution 2021-10-21 12:18:39 +00:00
Ilya Goncharov f6ba2a958a [JS IR] No generate exportness for overridden properties
[JS IR] Add check on existence of overridden property in tests

^KT-49326 fixed

[JS IR] Add details to comment with exporting properties

^KT-49326 fixed

[JS IR] No generate exportness for overridden properties,

if only no override val -> var

^KT-49326 fixed

Merge-request: KT-MR-4810
2021-10-21 10:52:48 +00:00
Sergey Igushkin 8868738ac8 KT-48709: Fix CInterop configurations ambiguity with user variants
* Introduce a new org.gradle.usage value: kotlin-cinterop

* Add compatibility+disambiguation rules to ensure that kotlin-cinterop
  consumers can also fall back to ordinary (kotlin-api) published
  variants, but not vice versa

  * This ensures that ordinary kotlin-api consumers don't encounter
    equally-compatible candidates where one is the normal API elements
    and the other is C interop API elements

* Set org.gradle.usage = kotlin-cinterop in the C interop API elements
  configurations and dependency-consuming configurations

Issue #KT-48709
2021-10-21 10:17:52 +00:00
Sergey Igushkin a474e8a00b KT-49189: fix project(...) dependencies on MPP from pure-Java consumers
* Don't set the localToProject attribute anymore, as it prevents proper
  disambiguation if not set properly on all configurations, while all
  the intentionally-public configurations
  should already have the same value.

* Disambiguate o.j.k.platform.type Android vs JVM preferring JVM, as
  Android should have other attributes which make pure-Android consumers
  match the Android MPP variants.

* With Gradle 7.0+, set the attribute
  `org.gradle.api.attributes.java.TargetJvmEnvironment` on the JVM &
  Android elements configurations, which helps pure-Android consumers
  to match the Android, not JVM variants. This fixes KT-30961 for
  Gradle 7.0+ and AGP 7.0+

Issues: KT-49189, KT-30961
2021-10-21 10:17:52 +00:00
Yan Zhulanow f0e703e1ee [FIR IDE] Add artifacts with base components of Analysis API implementations 2021-10-21 18:05:01 +09:00
Mikhail Glukhikh 7962acd3e2 FIR: temporarily downgrade NO_EXPLICIT_VISIBILITY_IN_API_MODE to warning
This commit is intended to fix broken bootstrap build
2021-10-21 11:44:44 +03:00
Artem Kobzar 876d358fe6 fix(KT-46961): add support of nested external enums. 2021-10-21 06:40:00 +00:00
Artem Kobzar 3dbf996ec6 fix(KT-49225): remove unnecessery boxing. 2021-10-21 06:38:42 +00:00
Mikhail Glukhikh 9515011365 Minor: make when in 'isExtension' a bit more clear 2021-10-21 00:07:50 +03:00
Tianyu Geng c262f17d75 FIR checker: report violations related to API mode 2021-10-21 00:01:14 +03:00
Tianyu Geng 52b247937e FIR checker: fix positioning of CONFLICTING_IMPORT
FE1.0 puts it on the alias when applicable.
2021-10-21 00:00:29 +03:00
Denis.Zharkov 4ad5f01324 FIR: Support overrides of generic-typed members with raw-typed ones
^KT-49070 Fixed
2021-10-20 22:05:25 +03:00
Denis.Zharkov a0a57581ec FIR: Do not add alias for variables with explicit type 2021-10-20 22:05:24 +03:00
Denis.Zharkov 5317cf3af1 FIR: Minor. Extract helpers 2021-10-20 22:05:24 +03:00
Denis.Zharkov fba44759c0 FIR: Refine visibility check for class members 2021-10-20 22:05:23 +03:00
Denis.Zharkov d702365632 Regenerate FIR tree 2021-10-20 22:05:22 +03:00
Denis.Zharkov f441024fd4 FIR: Derive FirMemberDeclaration from FirAnnotatedDeclaration
It's necessary to have the sane logic that FirMemberDeclaration is a subtype of FirDeclaration
The only kind of controversial change here is making FirAnonymousObject
also be FirMemberDeclaration, thus having its own declaration status
2021-10-20 22:05:20 +03:00
Tianyu Geng 603655d63f FIR IDE: add option to render type without type args
This is useful for rendering type annotation for `super`, which does
not require type arguments.
2021-10-20 19:16:49 +02:00
Tianyu Geng bdc71a3281 FIR IDE: pass candidate super types for AMBIGUOUS_SUPER
This way the IDE quickfix do not need to do resolution again to figure
out what super type to offer in the quickfix.
2021-10-20 19:16:48 +02:00
Yan Zhulanow 7c3706dd3f [FIR IDE] Disable dependent analysis session tests for FE10 implementation 2021-10-20 19:41:30 +03:00
Yan Zhulanow b7044803d2 [FIR IDE] Move out-of-block modification trigger to FrontendApiTestConfiguratorService 2021-10-20 19:41:29 +03:00
Yan Zhulanow 2894f87541 [FIR IDE] Move test configurators as constructor parameters 2021-10-20 19:41:29 +03:00
Yan Zhulanow 8f39640237 [FIR IDE] Move test file analysis in FE10 Analysis API implementation to FrontendApiTestConfiguratorService 2021-10-20 19:41:28 +03:00
Yan Zhulanow a1280ed723 [FIR IDE] Move testPrefix to FrontendApiTestConfiguratorService 2021-10-20 19:41:27 +03:00
Yan Zhulanow e12c7d1292 [FIR IDE] Extract Fe10AnalysisFacade from KtFe10AnalysisSession 2021-10-20 19:41:26 +03:00
Yan Zhulanow e06a75c197 [FIR IDE] Add separate test data for descriptor-based Analysis API implementation 2021-10-20 19:41:26 +03:00
Yan Zhulanow 1272c6aa33 [FIR IDE] Update Analysis API test data, untie it from the FIR implementation 2021-10-20 19:41:25 +03:00
Yan Zhulanow 516dd825c2 [FIR IDE] Initial descriptor-based implementation of the Analysis API 2021-10-20 19:41:24 +03:00
Yan Zhulanow e2c9be0932 [FIR IDE] Extract common components of the Analysis API to separate modules 2021-10-20 19:41:23 +03:00
Yan Zhulanow 44a1fe668e [FIR IDE] Extract implicit set parameter name to reuse it in Analysis API 2021-10-20 19:41:21 +03:00
Ilmir Usmanov 2b8963455f Use a separate diagnostic for 'suspend fun' sequence
instead of reusing existing one, since existing one
is ERROR, and we cannot turn code red without deprecating
it with WARNING.
 #KT-49264
2021-10-20 18:12:10 +02:00
Nikolay Lunyak dbfe3524ce [FIR] Add FirDelegateUsesExtensionPropertyTypeParameterChecker 2021-10-20 16:49:51 +03:00
Nikolay Lunyak f97e666608 [FIR] Add property delegate positioning strategy 2021-10-20 16:49:48 +03:00
Aleksei.Cherepanov 276fb77155 Fix incremental build after changing Java const used as class property
Report Java static final constant with InlineConstantTracker, used as class property in Kotlin for further registration in JPS

#KT-49177 Fixed
2021-10-20 15:06:19 +03:00
Mikhail Glukhikh 931779f1c6 Fix OPT_IN_IS_NO_ENABLED message (see KT-48534) 2021-10-20 12:17:12 +03:00