Commit Graph

80109 Commits

Author SHA1 Message Date
Vladimir Dolzhenko 36ff952a0f Ignore when failed to get file text
Relates to #KTIJ-706
2021-03-05 17:12:56 +01:00
Andrei Klunnyi a0b901b23a Revert "[FIR]: sealed hierarchy processor for IDE"
This reverts commit e6ccdff2
2021-03-05 16:37:47 +01:00
Dmitriy Novozhilov 4ed341b152 Advance bootstrap to 1.5.20-dev-1608 2021-03-05 17:23:29 +03:00
Ilya Kirillov 1d42c70056 FIR IDE: generate diagnostics 2021-03-05 15:04:07 +01:00
Igor Yakovlev b744f41c0d [ULC] Fix annotations invalid parents
Fixed #KT-45287
2021-03-05 14:33:10 +01:00
Igor Yakovlev 179cf303da [ULC] Fix annotations with no site for ctor
Fixed #KT-45291
2021-03-05 14:33:10 +01:00
Yahor Berdnikau 297aa17b6e Fix Jvm target tries to use removed configuration.
KT-44949 In Progress
KT-44957 Fixed
2021-03-05 16:28:03 +03:00
Yahor Berdnikau 117cfc763a Fix JS target configuration triggers task creation too early.
This raised the problem that task, compilation task depends on, has not
been yet created and Gradle fails the build with exception.

KT-44949 In Progress
2021-03-05 16:28:01 +03:00
Yahor Berdnikau d06ec61b79 Migrate to the actual workers api available from Gradle 5.6.
Old api was removed in Gradle 7 and causes build crashes.

KT-44949 In Progress
2021-03-05 16:28:00 +03:00
Tianyu Geng 8158a07063 FIR IDE: add quickfix for NESTED_CLASS_NOT_ALLOWED 2021-03-05 13:27:36 +01:00
Svyatoslav Scherbina 27904c0fb9 Native compiler source: replace inline classes by value classes
The former are deprecated.
2021-03-05 12:15:22 +00:00
Svyatoslav Scherbina b45de517c4 Native stdlib build: fix using OptionalExpectation in Interop/Runtime
Current build for kotlin-native/Interop/Runtime sources is not truly
MPP, so explicit -Xcommon-sources flags are required for the compiler
to allow using OptionalExpectation annotations.
2021-03-05 12:15:22 +00:00
Bingran 03df752e8e Update min supported gradle version to 6.1
This PR also updates the min agp version we test with because older agp
versions are using gradle apis which doesn't exist in gradle 6.0+.

GH PR: #4155
2021-03-05 14:11:10 +03:00
Roman Artemev 9bdfbc948c [KLIB] Support assignable value parameters in deserializer
- fix KT-44945
2021-03-05 13:47:07 +03:00
Andrei Klunnyi e6ccdff2f7 [FIR]: sealed hierarchy processor for IDE
From now on sealed declarations get resolved with the help of
FirIdeSealedHierarchyProcessor. This change entails correct IDE side
check for sealed when exhaustiveness.
2021-03-05 10:20:19 +00:00
Dmitriy Novozhilov aa829c2321 [FIR2IR] Fix using default values of annotation arguments 2021-03-05 13:00:12 +03:00
Dmitriy Novozhilov ca26c193ae Make all hierarchies of JavaAnnotationArgument sealed 2021-03-05 13:00:12 +03:00
Dmitriy Novozhilov 1f6ce874a1 Don't fail on unsupported default values of java annotations 2021-03-05 13:00:12 +03:00
Dmitriy Novozhilov 745aa620d0 Reformat annotationArgumentsImpl.kt 2021-03-05 13:00:11 +03:00
Dmitriy Novozhilov bd7689d381 [FIR] Properly compute default arguments of java annotations 2021-03-05 13:00:11 +03:00
Dmitriy Novozhilov 8324f499cd [FIR] Fix serializing annotation metadata on setters value parameters 2021-03-05 13:00:11 +03:00
Vasily Levchenko ee1bc45bd6 [performance] disable fat framework compilation 2021-03-05 09:53:27 +00:00
Vasily Levchenko ab68bb6ddb [performance] enable "swift run" 2021-03-05 09:53:26 +00:00
Jinseong Jeon 8368812432 Minor cleanup: avoid vague util names 2021-03-05 10:06:22 +03:00
Jinseong Jeon 8b24f4b5c6 Minor cleanup: place modifier strategies close to each other 2021-03-05 10:06:22 +03:00
Jinseong Jeon 1ba943eb4a Minor cleanup: prefer actual body with return statement 2021-03-05 10:06:22 +03:00
Ilya Gorbunov 7e2c365b79 Generate docs for floorDiv and mod and improve docs for div and rem
Refactor operator documentation generation for primitives and unsigned
types so that it is easier to specialize it.

Manually sync docs of numeric types in js-ir stdlib.

 KT-26234
2021-03-05 07:32:16 +03:00
Ilya Gorbunov 50d4979531 Floor division and remainder for numeric types KT-26234
- floorDiv/mod for unsigned types
- floorDiv/mod for signed types
- mod for floating point types

- mod return type: same as divisor for integer types

- Update JS API dump
- Avoid triggering division overflow in tests due to K/N
- Workaround failing test in JS-legacy
2021-03-05 07:32:16 +03:00
Ilya Gorbunov 284e6f5bb3 Add runtime dependency on junit-jupiter-engine to kotlin-test-junit5
It is required to run tests authored with kotlin-test, so it seems
convenient to have it as a runtime dependency of kotlin-test-junit5
variant.

Depend on the version 5.6.0, which is approx. one year old.
Can be upgraded in the consumer project if necessary.

Also upgrade junit-jupiter-api dependency to 5.6.0, so that users could
use more recent JUnit functionality in JVM tests,
but continue compiling the artifact against 5.0.0 to leave a
possibility to downgrade JUnit platform dependency if needed.

KT-45107
2021-03-05 02:22:24 +03:00
scaventz 28452fc38e Kotlinc: catch FileNotFoundException caused by problematic destination. 2021-03-04 11:25:35 -08:00
Dmitriy Dolovov 149282a888 [Commonizer] Fix: Stats not logged for "native-dist-commonize" CLI task 2021-03-04 22:24:11 +03:00
Dmitriy Dolovov 1c06972ec6 [Commonizer] Minor. Formatted 2021-03-04 22:24:05 +03:00
Dmitriy Dolovov d6961a6e60 [Commonizer] Rework MetadataDeclarationsComparator API
1. Formalize all possible variants of entities where mismatch could happen via sealed interface MetadataDeclarationsComparator.EntityKind
2. Track the path to the place of mismatch in terms of MetadataDeclarationsComparator.PathElement
2021-03-04 22:23:57 +03:00
Alexander Likhachev 70d434e992 Update tests after compiler properties rework
#KT-43605 Fixed
2021-03-04 19:36:18 +03:00
Alexander Likhachev 3537c699b5 [Gradle] Read system properties at configuration time using Gradle providers
The change is a step to fully support Gradle configuration cache.
Relates to #KT-43605
Relates to #KT-44611
2021-03-04 19:36:11 +03:00
Ivan Gavrilovic d73f5d299a KAPT - Make StructureTransformAction cacheable
When computing classpath structure ignore absolute
paths and timestamps. This also makes the transform
cacheable and it should increase cache hit rate.

Test: existing BuildCacheRelocationIT
2021-03-04 19:00:14 +03:00
Jinseong Jeon 9badbfc30d FIR checker: simplify isExpect|isExternal checks
Those resolve information are different from modality/visibility, which
could have conflicting modifiers.
2021-03-04 17:56:30 +03:00
Jinseong Jeon 774ba58062 FIR checker: pluralize top-level/member function/property checkers 2021-03-04 17:56:30 +03:00
Jinseong Jeon d348e58183 FIR: rename util to retrieve primary constructor 2021-03-04 17:56:30 +03:00
Jinseong Jeon 1090eca086 RAW FIR: record property accessors' own modality properly 2021-03-04 17:56:30 +03:00
Jinseong Jeon e009b71f88 FIR checker: report uninitialized member/extension properties 2021-03-04 17:56:29 +03:00
Jinseong Jeon e8028e7825 FIR checker: report nullable/non-class LHS of class literals 2021-03-04 17:09:52 +03:00
Dmitriy Novozhilov a6d1d47918 [FIR] Fix clearing info about DF variable after reassignment 2021-03-04 17:09:17 +03:00
Dmitriy Novozhilov f8adce8b96 [FIR] Cleanup data flow analysis of safe calls 2021-03-04 17:09:17 +03:00
Dmitriy Novozhilov 2cb24fbd49 Fix compiler warning in ide test utils 2021-03-04 17:09:17 +03:00
Mikhail Glukhikh 48001dbbb2 FirConstPropertyChecker: add some TODOs 2021-03-04 16:13:50 +03:00
Mikhail Glukhikh 6470b713d5 FIR: set isConst on primary constructor properties 2021-03-04 16:13:50 +03:00
Mikhail Glukhikh d7a6fc80b0 FIR: don't report CONST_VAL_NOT_TOP_LEVEL_OR_OBJECT on variables 2021-03-04 16:13:50 +03:00
Br0mm dd3bc1a964 FIR: Introduce CONST_VAL_NOT_TOP_LEVEL_OR_OBJECT diagnostic 2021-03-04 16:13:50 +03:00
Mikhail Zarechenskiy 6c2eaf2df8 Increase stub versions for major release
^KT-41056 Fixed
2021-03-04 16:03:19 +03:00