This better reflects the fact that all the services
from that module are actually strictly for K1
Note how the common module was not actually
used by corresponding `gradle` or `maven`
modules, so its common-ness is more about
plugin support required both for Gradle
and Maven projects
Also rename the test module because it seems
to be K1-specific also
This was a "low-hanging fruit" rename; the other
modules in the compiler plugins support are
more convoluted and require more work to be
properly organized
GitOrigin-RevId: 3f071ea918890a3f576d4e3f5a7fee7ee34bfecf
Since we want to enable maven support modules in the K2 plugin,
it's a good idea to make sure that those modules do not in fact
depend on FE10.
`kotlinx-serialization.maven` still has a dependency on FE10,
but it should not be an issue since it does not seem to
actually use any FE10-specific APIs
Similar Gradle EPs (`GradleProjectImportHandler`) are not
enabled because gradle projects seem to work fine without it
(see KTIJ-28200 for the further investigation details)
GitOrigin-RevId: 008063946589c16e4529752645c92fc9a250e7e4
Avoid altering copies of compiler arguments. Instead, the upstream function is now utilised. In addition, it ensures any changes made to these arguments are persisted as needed to the workspace entity. These changes fix the compiler arguments for storage in the entity structure.
GitOrigin-RevId: 0b98f1d84b816afec06dea0dc422285eac92e652
... to allow data importers to always produce the same
result, even if data nodes are retrieved from cache.
Also, variant switching in Android Studio relies on this.
It restores data nodes from the cache, to avoid invoking
full Gradle sync.
closes https://github.com/JetBrains/intellij-community/pull/2582
#KTIJ-27235 Fixed
GitOrigin-RevId: c03227a1c6cd3177ed9f7f5438075ac482743878
Use KotlinFacetSettings instead. This change is needed because new workspace model does not provide facet.
#KTIJ-24647 In Progress
GitOrigin-RevId: 2b4bd46438404e518b780acc0b3e3c5bae8030db
IDE Serialization plugin basic logic is to find serialization plugin JAR in the plugins classpath determined by the current module's compiler options.
This logic isn't applicable for scripting modules. In particular, `unwrapModuleSourceInfo` returns null for `ScriptModuleInfo`, and it's reasonable.
So solution is to add an extension point to support determining "enable-ness" of serialization plugin by scripting configuration option.
GitOrigin-RevId: 41bf6d8a66c2c682a4a00375dcabf0a1ffc7ccc3
This is the only quickfix that requires analysis. The analysis-related
code has been split out into a resolver object that, given a context
object (BindingContext for K1, KtAnalysisSession for K2), answers
analysis queries.
^KTIJ-25177
GitOrigin-RevId: 42f68cebbc9bb62d8435d0d86720f97a4d05bba3
For quickfixes that do not rely on analysis (everything except
ParcelMigrateToParcelizeQuickFix), register those quickfixes against the
diagnostics generated by the K2 Parcelize plugin.
^KTIJ-25177
GitOrigin-RevId: 9a11c28db219459adc4bbe5895faf21e46d38d4a
Remove AbstractQuickFixFactory and its subobjects, and use
a QuickFixesPsiBasedFactory instead. Add a factory() helper method that
handles the common parent-element lookup logic.
^KTIJ-25177
GitOrigin-RevId: 6e0501192e57edea85e903a028e8243ecbeb57f5
Create a new `kotlin.compiler-plugins.parcelize.k1` module, wire it up
to be loaded under the K1 plugin, and move some K1-specific classes
there. Note that we can't yet get rid of the FE1.0 dependencies from the
common module - the quickfix factories depend on them, and need to be
refactored.
^KTIJ-25177
GitOrigin-RevId: 005cf692a2b031f408b186a01bc8cafd4b577027
The bulk of the existing Parcelize quick fixes only rely on PSI, not on
analysis (the exception being ParcelMigrateToParcelizeQuickFix). To
enable running these quick fixes on K2, create a base class derived from
KotlinPsiOnlyQuickFixAction, and change the PSI-only quick fixes to
derive from that base class.
In addition, change the shortenReferences extension function to use
ShortenReferencesFacility, so that it will work on K2.
^KTIJ-25177
GitOrigin-RevId: 8305fc4bfda786c8ed37efbee1c774d12f098403
The in-use version of this class lives in parcelize/common. The version
directly under the parcelize directory does not appear to even be
compiled, let alone used.
^KTIJ-25177
GitOrigin-RevId: 3120f60b7e978a460253a4d4f82ebae38c8d5518
Note that this commit depends on changes made for KT-57468.
The problem affected `ImportOptimizer` (correct import statement was
recognized as unused) and `Import[Quick]Fix` (missing import was not
suggested). Both were mostly caused by the inability to provide
a `Name` of the function for overridden assignment [1].
This commit introduces the following changes:
1. Module `kotlin.compiler-plugins.assignment.common` was split to
manage K1 and K2 dependencies properly. Extensions we re-registered
accordingly [2].
2. K1- and K2- plugin specific import quick fixes introduced [3]
3. K2 plugin added to bundled (so far, it's the way to make it active) [4]
4. Support for `KtCompilerPluginsProvider` extension [5]
5. Tests for import quick fixes and unused import inspection.
--------------------------------------------------------------------
[1]: KtSimpleNameReference.getResolvesByNames
[2]: IdeAssignPluginResolutionAltererExtension and
IdeAssignmentContainerContributor
[3]: AssignmentPluginImportFix, FirAssignmentPluginQuickFixRegistrar
[4]: KotlinK2BundledCompilerPlugins
[5]: KtCompilerPluginsProviderIdeImpl, KtFe10CompilerPluginsProvider
^KTIJ-24390 fixed
GitOrigin-RevId: 8fec44b5c43b11aa6741c3d9cac1549886645433
Update import to support separately published Kotlin compiler plugins that are not embedded into related Gradle/Maven plugins.
^KT-52811
GitOrigin-RevId: 5111708cd7bb6f363a34bafd7fafef5a95e2111a