Commit Graph

71896 Commits

Author SHA1 Message Date
Ilya Kirillov 2a9779cd89 FIR IDE: resolve reference to intersection override member to overridden members 2021-01-15 17:23:09 +01:00
Ilya Kirillov 95eb701f75 FIR: introduce symbols for intersection override 2021-01-15 17:23:08 +01:00
Ilya Kirillov 2ef8f58d90 FIR IDE: add KDoc for KtSymbolOrogin 2021-01-15 17:23:08 +01:00
Ilya Kirillov e060778528 FIR IDE: implement assignment statement references 2021-01-15 17:23:07 +01:00
Ilya Kirillov 14d2b1be49 FIR IDE: resolve by-name-parameter call 2021-01-15 17:23:07 +01:00
Ilya Kirillov 47894c6cc9 FIR IDE: invalidate LibraryModificationTracker in memory leak test 2021-01-15 17:23:06 +01:00
Ilya Kirillov 87e6dbf435 FIR IDE: generate heap dump on memory leak in memory leak test 2021-01-15 17:23:06 +01:00
Ilya Kirillov f454ec8e4a FIR IDE: introduce methods for working with annotations 2021-01-15 17:23:05 +01:00
Ilya Kirillov 191a1ee242 FIR: add fake source fir element to it parameter 2021-01-15 17:23:05 +01:00
Ilya Kirillov 132fc9e68b FIR IDE: invalidate caches between tests 2021-01-15 17:23:04 +01:00
Ilya Kirillov 861c9b8e45 FIR IDE: unmute passing tests
fix unmute passing
2021-01-15 17:23:04 +01:00
Ilya Kirillov c97c4fa99c FIR IDE: fix finding fir in container which have conflicting duplicate by name 2021-01-15 17:23:03 +01:00
Ilya Kirillov 601d5cbff8 FIR IDE: fix duplicating diagnostics collection 2021-01-15 17:23:03 +01:00
Ilya Kirillov 008260451c FIR: make FirNestedClassifierScopeWithSubstitution to be name aware 2021-01-15 17:23:03 +01:00
Ilya Kirillov c2866152bf FIR IDE: fix not initialized containingClassAttr for copied declaration 2021-01-15 17:23:02 +01:00
Ilya Kirillov a7903c64f1 FIR IDE: do not consider function literal as fqName-having declaration 2021-01-15 17:23:02 +01:00
Ilya Kirillov 1fb33207b8 FIR IDE: add meaningful error message when opening non-source file 2021-01-15 17:23:01 +01:00
Ilya Kirillov 1901436c96 FIR IDE: add more info to error messages 2021-01-15 17:23:01 +01:00
Ilya Kirillov c131983188 FIR IDE: implement FirIdeProvider.getClassNamesInPackage
#KT-41048 fixed
2021-01-15 17:23:00 +01:00
Ilya Kirillov a52674f181 FIR: use more meaningful error messages 2021-01-15 17:23:00 +01:00
Ilya Kirillov 4d07eb27bb FIR IDE: add incremental analysis test for function in companion object 2021-01-15 17:23:00 +01:00
Ilya Kirillov e63d084cdc FIR IDE: allow getting light class name from EDT 2021-01-15 17:22:59 +01:00
Ilya Kirillov d53af8170b FIR IDE: cache module libraries 2021-01-15 17:22:59 +01:00
Ilya Kirillov 8c113f02d5 FIR IDE: consider top level file change as out of block modification 2021-01-15 17:22:58 +01:00
Ilya Kirillov d3dd6e3b96 FIR IDE: delegate light classes is valid to corresponding symbol validity check 2021-01-15 17:22:58 +01:00
Ilya Kirillov a95f38569f FIR IDE: fix FirModuleWithDependenciesSymbolProvider recursive calls 2021-01-15 17:22:58 +01:00
Nikolay Krasko 5838357e61 Extract long project wizard tests to separate TC configuration (KTI-422) 2021-01-15 16:55:41 +03:00
Dmitry Petrov 2f30b0994a Minor: mute test in WASM 2021-01-15 15:31:41 +03:00
Jinseong Jeon 6b5ee6c9f9 FIR checker: warn redundant open in interface members properly 2021-01-15 14:38:37 +03:00
Jinseong Jeon 2e8b5f2380 FIR checker: make member property checker robust to conflict modifiers 2021-01-15 14:38:36 +03:00
Jinseong Jeon 39df3e2b0a FIR checker: introduce member function checker 2021-01-15 14:38:35 +03:00
Jinseong Jeon 5594af0d70 FIR checker: utilize modifier retrievals 2021-01-15 12:46:22 +03:00
Jinseong Jeon 3af820eaf4 FIR: utilize lookups of certain properties of classes/functions 2021-01-15 12:46:20 +03:00
Jinseong Jeon ec68ac36db FIR checker: use the aliased checker when possible 2021-01-15 12:46:17 +03:00
Jinseong Jeon 03cb0c3cd1 FIR checker: introduce PropertyChecker alias
and use it to add diagnostic
ININITIALIZER_REQUIRED_FOR_DESTRUCTURING_DECLARATION
2021-01-15 12:45:25 +03:00
Jinseong Jeon db65c787e5 FIR checker component generator: handle type parameters in alias arguments 2021-01-15 12:45:25 +03:00
Ilya Goncharov f3dfb38163 [Gradle, JS] Exclude transitive dependencies of semver4j
^KT-44204 fixed
2021-01-15 11:54:31 +03:00
Dmitriy Novozhilov e742af5444 [Test] Run fir diagnostics tests with light tree in sequential mode
In parallel mode many tests are failing so it's temporary workaround
2021-01-15 11:16:28 +03:00
Dmitriy Novozhilov 2f1e4862e5 [Test] Enable builtin parallel tests execution form JUnit5 in :compiler:tests-common-new 2021-01-15 11:16:26 +03:00
Dmitry Savvinov 78b2eb994b Deduplicate logic of computing orphan source sets in MPP Gradle Import
Set of compiled source sets is already available in
MultiplatformModelImportingContext via
'sourceSetsToParticipatedCompilations.keys', no need to recompute it

^KT-37127
2021-01-15 11:12:46 +03:00
Dmitry Savvinov 1d0a696a62 Simplify building of source-sets during MPP Import
Build dependsOn closure straight away by using KotlinSourceSetProto
instead of building first KotlinSourceSetImpls with incorrect
dependsOn-names, and then discarding it

^KT-37127
2021-01-15 11:12:46 +03:00
Dmitry Savvinov 9e58e3c3fd Remove unused KotlinSourceSetImpl.defaultIsTestModule; simplify logic of test modules detection
^KT-37127
2021-01-15 11:12:46 +03:00
Dmitry Savvinov 58b2064295 Introduce MultiplatformModelImportingContext
Essentially it is responsible for returning various information about
the model being imported, such as:

- flags and properties, which configure the process of import
- "bulk" requests which might be needed multiple times during import,
but which are more convenient to be computed once, like various indices
(source sets by name, compilations by source-sets, etc.)

^KT-37127
2021-01-15 11:12:46 +03:00
Dmitry Savvinov f87aa4612b Minor: return map straight away 2021-01-15 11:12:45 +03:00
Dmitry Savvinov cf2bd75a73 Minor: reformat 2021-01-15 11:12:45 +03:00
Dmitry Savvinov 0aef3680c1 Remove useless function
Looks like it has been broken by 40633768bc
where 'KotlinCompilation.dependencies' switched its type from
KotlinDependency (which is alias to
org.jetbrains.plugins.gradle.model.ExternalDependency) to
KotlinDependencyId (which is alias to Long), leading to safe-cast in the
'reportUnresolvedDependencies' to be always evaluated to 'null'

Rationale for removing it completely instead of fixing:
No one has noticed that this function has been broken + I haven't
managed to find any user-visible behaviour it adds (tried fixing it and
checking project similar to one from
NewMultiplatformProjectImportingTest.testUnresolved, no difference for
me).
2021-01-15 11:12:45 +03:00
Dmitry Savvinov 824efe8498 Remove useless condition
Note that in previous line we already check for !isHmppEnabled and for
sourceSet.name == KotlinSourceSet.COMMON_TEST_SOURCE_SET_NAME, and if it
holds, then we continue to the next loop iteration. So, this conditional
here is essentually equal to 'false'
2021-01-15 11:12:45 +03:00
Dmitry Savvinov ecd96e14c9 Use all participated compilations for source-sets platform detection even in non-HMPP 2021-01-15 11:12:45 +03:00
Dmitry Savvinov 09286504b7 Add a bunch of tests on corner-cases in Gradle MPP Import
For most of those the behaviour isn't set in stone, though at the moment
of making that commit we're more or less sure that it's reasonable.

Behaviour in some cases might be more strictly enforces (as much as you
can enforce something in esoteric cases with misconfigured project
sturcture). Those are marked with comments with '!'.
2021-01-15 11:12:45 +03:00
Dmitry Savvinov 69261ca1e6 Add tests on precise platforms importing
Note the behaviour in 'precisePlatformsWithUnrelatedModuleHmpp': it is
incorrect, as set of platforms still contains unrelated platforms.

This is because in the current solution, some source-sets
(commonMain/commonTest) always receive COMMON platform and then it gets
coerced to set of targets actually seen in the project.This helps if
projects uses as much targets as current module (like in
precisePlatformsHmpp), but fails if it uses more targets than the
current module (like in precisePlatformsWithUnrelatedModuleHmppp)

The upcoming commits will fix that issue
2021-01-15 11:12:45 +03:00