`maybeCreateResolvable` with `also` each time configures configuration.
But we cannot add new dependencies after the configuration is resolved.
Thus, it is more correct to add init block for a case when it is a newly created configuration.
^KTIJ-28742 Fixed
Review: https://jetbrains.team/p/kt/reviews/14224/timeline
Timeline:
**(1)** Kotlin 1.1.60 https://github.com/JetBrains/kotlin/commit/59efedf610a25b004edf3d19897ce4dfca28ddb2 `header` keyword is introduced (committed on Dec 13, 2016)
**(2)** Kotlin `header`/`impl` has been deprecated (warning) at least since 1.1.60 https://github.com/JetBrains/kotlin/commit/5d251062677e09d607f295189b7978d5833e448f (committed on Sep 15, 2017)
**(3)** 1.1.60 release https://repo1.maven.org/maven2/org/jetbrains/kotlin/kotlin-compiler/1.1.60/ Nov 13, 2017
It sounds stupid but it looks like `header` was introduced and
deprecated right in the same release. Though it may be possible that we
had a release between **(1)** and **(2)** that I couldn't find
Anyway the keywords have been deprecated since basically forever
The fix is not perfect
"The perfect fix" would be:
1. Introduce a separate `DEPRECATED_MODIFIER_ERROR` diagnostic
2. Introduce LanguageVersionSettings for the `DEPRECATED_MODIFIER_ERROR`
diagnostic
But "the perfect fix" requires:
1. Adopting `ReplaceModifierFix` in the IDE to make it work with the new
diagnostic. `ReplaceModifierFix` is only implemented in K1 IDE. So
there are two ways:
1. Create a KTIJ ticket to port the diagnostic to K2 IDE (it needs to
be ported anyway), and **mention** in the ticket that
`DEPRECATED_MODIFIER_ERROR` also needs to be supported in K2 IDE.
It's the ticket that nobody will probably find and fix
2. Go and port `ReplaceModifierFix` to K2 IDE myself. It's fairly
simple task, but I've not worked in intellij for quite a while,
and it will take me too much time to index and compile
Considering that DEPRECATED_MODIFIER diagnostic is used only to report
`header`/`impl`, and there are literally 0 known cases when people use
it. It's just easier to convert the diagnostic to error in K2
Related tests:
- compiler/testData/diagnostics/tests/multiplatform/deprecated/header.kt
^KT-59839 Fixed
Shared source sets do not have related compilation tasks, so configuring
them via an extension is the only possible way. Otherwise, a KGP
checker will complain on incompatible configuration.
Also, should fix rare cases for kapt when the related KotlinJvmCompile
task is not created, so it does not propagate configured values to kapt
tasks.
^KT-65528 In Progress
This commit is intended to deal with inconsistency in K1/K2
star projection handling.
K1 star projection includes a 'type' property.
This type from a star projection can be used for relevant
functions / properties return types,
and already includes some approximation for recursive generics.
In contrast, K2 star projection is an object,
and return types of relevant functions / properties are
represented as captured types.
To prevent recursion in them in recursive generic case,
this commit includes additional replacement of their type arguments.
See more details in added comments.
#KT-65057 Fixed
They are important for overridability rules, so can't be just ignored.
Some arguments are still different on different platforms, so
commonized version is a bit strange.
But the only important part is selector, which should be same on
all platforms.
^KT-57588