[FIR] Make FirNotImplementedOverrideChecker to run only for non-expect classes or in metadata compilation

^KT-64187 Fixed
Review: https://jetbrains.team/p/kt/reviews/14807

I also checked that IDE sets metadataCompilation to `true` (Actually, it
looks like IDE performs analysis two times with the flag having
different values, but whatever, maybe it's even better this way)
This commit is contained in:
Nikita Bobko
2024-03-04 14:53:02 +01:00
committed by Space Team
parent 9d566465e6
commit 989ec97bb0
17 changed files with 167 additions and 31 deletions
@@ -9,6 +9,22 @@ object AnalysisFlags {
@JvmStatic
val skipMetadataVersionCheck by AnalysisFlag.Delegates.Boolean
/**
* Metadata compilation is run for every non-platform fragment (for common and intermediate fragments).
*
* The initial purpose of the metadata compilation is to produce metadata artifacts for non-platform source sets.
* These metadata artifacts are needed only for IDE.
*
* But metadata compilation is also used to report diagnostics when regular compilation can't do that for whatever reason (My opinion,
* that the reason is broken design of `expect`/`actual` KT-64130).
* E.g. `ABSTRACT_NOT_IMPLEMENTED` (KT-66205)
*
* This flag is true in two case:
* 1. Metadata compilation (`:compile*KotlinMetadata` Gradle task)
* 2. IDE analysis
*
* Known metadata compilation problems: KT-66382
*/
@JvmStatic
val metadataCompilation by AnalysisFlag.Delegates.Boolean