Commit Graph

79971 Commits

Author SHA1 Message Date
Mikhael Bogdanov 8764bb09f2 Generate synthetic annotation method in interface if -Xjvm-default is on 2021-03-01 16:20:19 +01:00
Mikhail Glukhikh a101d12c78 Simplify PositioningStrategy in FIR diagnostic DSL 2021-03-01 16:57:56 +03:00
Mikhail Glukhikh 6fee46316e FIR: fix MANY_COMPANION_OBJECTS positioning 2021-03-01 16:57:55 +03:00
Tianyu Geng 724ca1d3ee FIR: introduce diagnostic NESTED_CLASS_NOT_ALLOWED 2021-03-01 16:57:54 +03:00
Jinseong Jeon c5cabce2d5 FIR: check visibility properly for CANNOT_CHANGE_ACCESS_PRIVILEGE 2021-03-01 16:57:51 +03:00
Andrei Klunnyi f45af5ea0e KT-44821 [Sealed Interfaces]: when-exhaustiveness failure in IDE
Compiler check for 'when' exhaustiveness requires that module
descriptors of a sealed class and its inheritors are the same (reference
identity matters). Prior to this commit and under some conditions they
were not. Details follow below.

Resolution related data structures (resolution facades) are organized
into trees (sdks, libs, and modules have their own nodes/facades,
module/class descriptors are stored inside). And the trees themselves
are put into a map associating so called PlatformAnalysisSettings and
GlobalFacades (plays a role of a root). PlatformAnalysisSettings is an
abstraction describing target platform and sdk of a module. The more
combinations exist for a project the more facades are used. Please, see
KotlinCacheService for more details.

So why a module can have multiple ModuleDescriptor-s?
Every tree mentioned above is an isolated resolution environment
containing its own instances of the outer world descriptors. Say, if a
project has modules X, Y, Z and we consider X then all three might have
their own vision of X, i.e. 3 descriptors exist at a time.

What descriptor instance does compiler get?
The path starts when the user opens a file in the editor and
highlighting pass starts (see usages of
ResolutionUtils#analyzeWithAllCompilerChecks). Module descriptor stored
in the resolution tree of the file's module gets injected into the
compiler's context. Starting from this moment compiler sees other
modules through the prism of a single resolution facade (tree).
Descriptors residing outside are alien.

This commit allows IdeSealedClassInheritorsProvider to figure out what
PlatformAnalysisSettings are associated with the resolution facade (read
ModuleDescriptor) seen by the compiler. Later on the same facade is used
to provide correct instances of sealed inheritors back to the compiler.
2021-03-01 12:12:00 +01:00
Roman Golyshev 6ebd4b954c Add new reference resolve tests
The main purpose is to show that old frontend and FIR work differently
in the case of the conflicts of local and top level classes/objects

See the tests that marked with // IGNORE_FIR

Corresponding ticket is ^KT-45192
2021-03-01 10:23:57 +00:00
anastasiia.spaseeva fb83c491bb Update compose version to 0.3.1 2021-03-01 11:19:23 +01:00
anastasiia.spaseeva cd23498cc4 Fix tests after libraries and wrappers versions updating 2021-03-01 11:19:23 +01:00
Ilya Goncharov 0a444bbc43 [Wizard, JS] Fix kotlin-redux version 2021-03-01 13:08:17 +03:00
Victor Turansky bc42ab8a2c Use optimized Ktor client (-0.5MB)
[Details](https://youtrack.jetbrains.com/issue/KTOR-1084)
2021-03-01 11:33:26 +03:00
Victor Turansky 180f924989 Use appropriate kotlin wrappers version (1.4.21 -> 1.4.30) 2021-03-01 11:33:04 +03:00
Nikolay Krasko 3022fb396b Add fasutil to the list of package to relocate (KT-44758)
#KT-44758 Fixed
2021-02-26 20:21:26 +03:00
anastasiia.spaseeva 1bb31bb36f Update libraries and wrappers versions for 1.5.0 2021-02-26 17:28:37 +01:00
Vasily Levchenko d2c9116b51 [fir][test] ignore native tree 2021-02-26 15:32:43 +01:00
Stanislav Erokhin f77ba914c7 [MERGE] Kotlin/Native history merged into kotlin/master 2021-02-26 15:30:58 +01:00
Alexander Likhachev 9d140cacc0 [Gradle, K/N] Create compiler download temp dir inside target dir
Motivation is to make directory moving more likely atomic
Relates to KT-39016
2021-02-26 16:11:19 +03:00
Alexander Likhachev 172b5f9621 [Gradle, K/N] Unpack compiler into temp directory then move to proper place
#KT-39016 Fixed
2021-02-26 16:11:14 +03:00
Yahor Berdnikau 45d423e78c Fix test is failing to run on CI.
Remove mistakenly added 'wait for debugger' flag.
2021-02-26 15:55:57 +03:00
Vasily Levchenko b05e742238 [commonizer-api] workaround for old k/n artifacts 2021-02-26 12:51:54 +01:00
Vasily Levchenko e123127a4a (!fixup)[build] cache repository fix 2021-02-26 12:51:53 +01:00
Alexander Udalov 417eb60ed3 Revert "Change order of WITH_RUNTIME and FILE. Wrong order brakes module pattern."
This reverts commit 073a500370.

(cherry picked from commit eec98314c8)
2021-02-26 12:51:53 +01:00
Vasily Levchenko f87132fff4 [performance] don't override user defined properties with fixed values 2021-02-26 12:51:53 +01:00
Vasily Levchenko be08e29cb3 [.idea][artifacts] added kotlinx_cli_jvm 2021-02-26 12:51:53 +01:00
Vasily Levchenko c9e0928038 [performance] enable project performance
(cherry picked from commit 947c3bd92b2ee8d252619cf987427a7e195191cb)
2021-02-26 12:51:53 +01:00
Vasily Levchenko f2524dbb8d [gradle][properties] default kotlin.native.home 2021-02-26 12:51:52 +01:00
Vasily Levchenko ed749f9b4a [.gitignore] add kotlin-native output folders 2021-02-26 12:51:52 +01:00
Vasily Levchenko 8eff15c8c2 [.idea][misc.xml] update after kotlin-native folder appear
- it isn't affected with kotlin.native.enable
2021-02-26 12:51:52 +01:00
Vasily Levchenko fe896619d9 [editorconfig] added for k/n 2021-02-26 12:51:52 +01:00
Aleksei.Cherepanov 710a6fb7f3 [JPS] Fix import for Kotlin Native
(cherry picked from commit 049045e5fefba86221273f64b7fd0b3c5d1792d2)
2021-02-26 12:51:52 +01:00
Vasily Levchenko f051119c4b [tests][kotlin-gradle-plugin] workaround for old k/n artifacts 2021-02-26 12:51:52 +01:00
Vasily Levchenko 5c80dbfd4b [kotlin-gradle-plugin] workaround for old k/n artifacts 2021-02-26 12:51:52 +01:00
Pavel Punegov 7ad656ea7f Fix cyclic dependency in run task configuration. 2021-02-26 12:51:51 +01:00
Nikolay Krasko c4178daf48 Remove Bintray kotlin-dev usage from kotlin-native
(cherry picked from commit ec4ac192a822949af55264157cf6f03d0c4f0c20)
2021-02-26 12:51:51 +01:00
Nikolay Krasko 29e1390720 Remove Bintray ktor usage from kotlin-native
(cherry picked from commit 8a5987d82191da66b31ef10363cebc1a784e31b3)
2021-02-26 12:51:51 +01:00
Nikolay Krasko f1aa75ffed Remove @author tag to conform with the repository policy
(cherry picked from commit d99a9c057712b3318350a9b4cd97f1e9ab63d13f)
2021-02-26 12:51:51 +01:00
Nikolay Krasko 4f3fa9f9ee Ignore kotlin-native during licences check in Kotlin
(cherry picked from commit b1c740cac791ee571dec887956de4b56c478b47a)
2021-02-26 12:51:51 +01:00
Vasily Levchenko 905c0c3dd3 [build] version of kotlin native stored in resouces 2021-02-26 12:51:51 +01:00
Vasily Levchenko bdc87edfd0 [build] cache repository fix 2021-02-26 12:51:51 +01:00
Vasily Levchenko f27e3b8c26 [build][conformance][test] ignore kotlin-native/runtime licence check 2021-02-26 12:51:50 +01:00
Vasily Levchenko fe2799273d [build] drop dead repositories 2021-02-26 12:51:50 +01:00
Vasily Levchenko dac76e606d [build][conformance][test] ignore not related to build repositories 2021-02-26 12:51:50 +01:00
Ilya Goncharov 80a0545ac2 [Gradle, JS] Fix ProcessedFilesCache.kt according to configuration cache 2021-02-26 14:32:51 +03:00
Mikhail Glukhikh b138b166e3 FIR: use EQUALS & TO_STRING from OperatorNameConventions 2021-02-26 13:50:26 +03:00
Jinseong Jeon e6cfd5d06f FIR: move data class synthetic members' names 2021-02-26 13:50:25 +03:00
Jinseong Jeon 856838f82c FIR: refactor delegate unwrapping
Not implemented override checker will use those to pretend to make
delegeted members (before checking similarly pretended fake overrides)
2021-02-26 13:50:24 +03:00
Alexander Udalov dbce28053c IR: move frontend-dependent code into implementations in psi2ir 2021-02-26 11:49:28 +01:00
Alexander Udalov 2566aa9db2 IR: remove TranslationPluginContext.bindingContext
This removes another dependency of 'ir.tree' on 'frontend', and among
other things, makes it possible to implement TranslationPluginContext
for FIR in the future.
2021-02-26 11:49:28 +01:00
Alexander Udalov e00660a789 Extract control flow analysis to separate module 2021-02-26 11:49:28 +01:00
Alexander Likhachev ef890464d8 [Gradle] Rework KotlinTestReport to be compatible with configuration cache
Minimal supported version is effectively changed to 6.1 due to usage of Gradle build services
Relates to #KT-43605
2021-02-26 13:49:01 +03:00