Commit Graph

59 Commits

Author SHA1 Message Date
Tianyu Geng f217bb94de Use more consistent names for inheritors of BooleanIsMissing 2021-11-04 23:04:35 +01:00
Ilya Chernikov 5bdda9c7f8 Implement suppression cache based on IR tree, use it in reporter 2021-10-27 22:17:42 +02:00
Ilya Chernikov bfe31c97ac Add support for ASTs without parents to suppress cache 2021-10-27 22:17:42 +02:00
Ilya Chernikov 7ef806b2ed Extract AbstractKotlinSuppressCache to frontend.common 2021-10-27 22:17:42 +02:00
Ilya Chernikov 70366dc7a6 Refactor diagnostic & result reporters...
to better reflect actual roles
2021-10-27 22:17:41 +02:00
Ilya Chernikov ea1edc2bd9 Add equality to diagnostic context, simplifying deduplication 2021-10-27 22:17:41 +02:00
Ilya Chernikov fc176e9845 Refactor IR reporting and infrastructure 2021-10-27 22:17:41 +02:00
Ilya Chernikov da2d3f29da Add multiple renderer sources support to new diagnostics infrastructure 2021-10-27 22:17:41 +02:00
Ilya Chernikov 1ce4075112 Prepare CLI reporting infrastructure for non-PSI diagnostics 2021-10-27 22:17:40 +02:00
Ilya Chernikov 5446168770 Add path to FirFile to pass it to the DiagnosticContext 2021-10-27 22:17:40 +02:00
Ilya Chernikov 1e056a7aa8 Report IR errors via new diagnostic infrastructure 2021-10-27 22:17:40 +02:00
Ilya Chernikov 21ea92cd4a Extract mutable diagnostic context to separate interface 2021-10-27 22:17:40 +02:00
Ilya Chernikov 9e60c70db7 Add abstract source element and switch diagnostics to it 2021-10-27 22:17:40 +02:00
Ilya Chernikov 524e40708d Move report helpers to frontend.common 2021-10-27 22:17:40 +02:00
Ilya Chernikov e9f59e8d1d Move common diagnostics infrastructure to frontend.common 2021-10-27 22:17:39 +02:00
Ilya Chernikov a65beb2dc5 Move Fir*SourceElement to frontend.common, rename to Kt* (complete) 2021-10-27 21:44:11 +02:00
Ilya Chernikov c50c8ad270 Move FirSourceElement to frontend.common (only move to save history) 2021-10-27 21:43:15 +02:00
Jinseong Jeon 5af24dc6ce FIR/LC: use DataClassResolver when determining componentN/copy 2021-09-30 19:42:42 +02:00
Victor Petukhov b957831683 Use WarningAwareUpperBoundChecker independently
^KT-47920 Fixed
^KT-48290 Fixed
2021-09-30 20:08:58 +03:00
Vyacheslav Gerasimov ab146bd6d4 Build: Fix deprecated Gradle configurations usages
for migration to Gradle 7+ #KTI-559
2021-09-26 18:28:44 +03:00
Ilya Kirillov a8d321db63 FIR IDE: do not use FE1.0 compiler jars in frontend-independent-modules 2021-09-14 14:45:43 +02:00
Dmitriy Novozhilov 0260bf8767 [FE] Move diagnostic parameter renderers to common module 2021-09-09 17:20:20 +03:00
Dmitriy Novozhilov ddc6c70611 [FE 1.0] Move diagnostic parameter renderers to common module 2021-09-09 17:20:15 +03:00
Jinseong Jeon 5819959cce Consolidate arrayOf call names 2021-08-18 16:04:36 +03:00
Dmitriy Novozhilov f3116cb64a Fix NON_EXHAUSTIVE_WHEN_STATEMENT warnings in project code 2021-07-20 13:33:46 +03:00
Ilya Kirillov 75331b3448 FIR IDE: abstract low-level-api from dependency on idea 2021-06-20 22:07:11 +02:00
Jinseong Jeon 477c1c8cd7 Migrate CompileTimeType and OperationsMap to frontend.common 2021-06-19 21:58:47 -07:00
Ivan Kochurkin ef53f0e0b3 [FIR] Render diagnostics parameters instead of full text in debug messages (closer to old tests) 2021-05-25 00:07:32 +03:00
Ilya Kirillov 6e31ff4fb1 Introduce CallableId.asSingleFqName and use it instead CallableId.asFqNameForDebugInfo 2021-03-24 18:13:21 +01:00
Mikhail Glukhikh 5d3afbad54 Rename: BadNamedArgumentsTarget -> ForbiddenNamedArgumentsTarget 2021-03-11 22:57:57 +03:00
Tianyu Geng be0dd84a06 FIR: check NAMED_ARGUMENTS_NOT_ALLOWED
The check has already been partially implemented in
org.jetbrains.kotlin.fir.resolve.calls.FirCallArgumentsProcessor. This
change completes the missing piece that determines if a `FirFunction`
has stable parameter names.
2021-03-11 22:57:57 +03:00
Dmitriy Novozhilov 4222bb9af2 [FE] Make whens on expect sealed classes and enums not exhaustive 2021-02-25 14:56:08 +03:00
Ilya Kirillov f4371c670e Move WhenMissingCase from fir module to compiler.common to use in IDE 2021-02-24 20:13:42 +01:00
Alexander Udalov 837eb739ea IR: move CompilationErrorException to frontend.common 2021-02-24 19:07:37 +01:00
Mikhail Glukhikh 940588a9bb FE: commonize throw-related annotation FQ names 2021-02-16 12:38:46 +03:00
Victor Petukhov 0d40022d6d Add reporting of the warnings based on Java annotations for expanded type aliases
Before that, such warnings weren't reported as the corresponding errors were reported during type inference (only original types took part there)
2021-02-15 12:13:55 +03:00
Pavel Kirpichenkov ba4cc4e075 Minor: cleanup 2021-01-14 17:28:14 +03:00
Dmitriy Novozhilov db9f301eed [FE] Make DiagnosticFactory.name not null 2020-11-26 11:54:15 +03:00
Mikhail Glukhikh 037c505069 Unbind general FirDiagnostic from PsiFile & PsiElement 2020-11-26 08:37:49 +03:00
Mikhail Glukhikh 6f8947dd04 Extract UnboundDiagnostic, DiagnosticFactory/Renderer to frontend-common 2020-11-26 08:37:48 +03:00
Dmitriy Novozhilov 3a48265077 Move ModuleDescriptor.Capability to :core:descriptors.common module 2020-08-25 10:31:37 +03:00
Alexander Udalov a21f273570 Fix compiler warnings in compiler code 2020-08-17 21:18:20 +02:00
Ilya Kirillov 418903e9ef FIR IDE: Make KtReference class descriptors frontend independent
* The new idea-frontend-independent module created
* Moved KtReference and it inheritors to that module & implement them in idea-analysis module by using descriptors frontend
2020-06-09 16:19:12 +03:00
Alexander Udalov b6fdc96994 Reverse dependency 'psi' <-> 'frontend.common'
Move ParseUtils to 'psi', and ImportPath to 'frontend.common'.

Now 'psi' depends on 'frontend.common', and that allows to remove
dependency of 'fir:tree:tree-generator' on 'psi', allowing the former to
compile in parallel with the old frontend code.
2020-03-28 21:30:07 +01:00
Alexander Udalov 4dcd0d1cb6 Extract module 'config' out of 'frontend'
Also move deprecated TargetPlatform there. This allows to get rid of the
dependency cli.common -> frontend, and even on frontend.common.
2020-03-28 21:30:05 +01:00
Dmitry Savvinov f9b8ab3a3a [Resolve] Introduce CompositeResolver
This commit introduces CompositeResolverForModuleFactory, which should
work under so-called "composite resolution mode", where sources of all
all modules are analyzed in one global facade.

This allows to:
- avoid re-analyzation of common sources
- avoid retaining memory for all platforms (which can be very bad as
soon as we'll start distinguishing various flavours of platforms,
especially "flavours" of common platform)
- support running platform-specific checks in common modules (e.g.,
report JVM_PLATFORM_DECLARATION_CLASH if common sources are going to have
it)
- support analysis of shared platform modules, like commonNative

This mode heavily depends on so-called "type refinement" support in the
compiler, which is introduced in other series of commits.

In this commit, CompositeResolver and related codepaths are left unused.
Also, this commit misses several important pieces of logic in
resolvers-setup code, which should be different for CompositeResolver
- computation of 'firstDependency'
- computation of built-ins
- computation of modules owned by facade

They will be covered in the following commits
2019-07-30 12:41:40 +03:00
Dmitry Savvinov 29beed9b21 [Expect/Actual] Support matching of expect/actual in hierarchical MPP 2019-06-10 13:34:27 +03:00
Dmitry Savvinov 9d0f518d62 Rename PlatformDependentCompilerServices -> PlatformDependentAnalyzerServices 2019-05-28 13:08:09 +03:00
Dmitry Savvinov 2caa1c3dd6 [Compatibility] Restore old TargetPlatform and subtypes for compatibility 2019-05-28 13:08:08 +03:00
Dmitry Savvinov 1606b3bf23 [Platform API] Make 'ModuleInfo.platform' non-nullable 2019-05-28 13:08:07 +03:00