Split out K1 manifest.

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
This commit is contained in:
Justin Paupore
2023-04-05 16:59:33 -07:00
committed by intellij-monorepo-bot
parent bedd7300cd
commit 85a1e7a26a
13 changed files with 52 additions and 18 deletions

View File

@@ -7,15 +7,4 @@
area="IDEA_PROJECT"
/>
</extensionPoints>
<extensions defaultExtensionNs="org.jetbrains.kotlin">
<irGenerationExtension implementation="org.jetbrains.kotlin.parcelize.ParcelizeIrGeneratorExtension"/>
<syntheticResolveExtension implementation="org.jetbrains.kotlin.idea.compilerPlugin.parcelize.IdeParcelizeResolveExtension"/>
<storageComponentContainerContributor
implementation="org.jetbrains.kotlin.idea.compilerPlugin.parcelize.IdeParcelizeDeclarationCheckerComponentContainerContributor"/>
<ultraLightClassModifierExtension
implementation="org.jetbrains.kotlin.idea.compilerPlugin.parcelize.ParcelizeUltraLightClassModifierExtension"/>
<quickFixContributor implementation="org.jetbrains.kotlin.idea.compilerPlugin.parcelize.quickfixes.ParcelizeQuickFixContributor"/>
</extensions>
</idea-plugin>

View File

@@ -0,0 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/resources" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="kotlinc.kotlin-stdlib" level="project" />
<orderEntry type="library" name="kotlinc.kotlin-compiler-common" level="project" />
<orderEntry type="library" name="kotlinc.kotlin-compiler-fe10" level="project" />
<orderEntry type="library" name="kotlinc.parcelize-compiler-plugin" level="project" />
<orderEntry type="module" module-name="intellij.java.psi" />
<orderEntry type="module" module-name="intellij.java.psi.impl" />
<orderEntry type="module" module-name="intellij.platform.analysis" />
<orderEntry type="module" module-name="intellij.platform.core" />
<orderEntry type="module" module-name="kotlin.base.fe10.analysis" />
<orderEntry type="module" module-name="kotlin.base.fe10.code-insight" />
<orderEntry type="module" module-name="kotlin.base.project-structure" />
<orderEntry type="module" module-name="kotlin.base.util" />
<orderEntry type="module" module-name="kotlin.code-insight.api" />
<orderEntry type="module" module-name="kotlin.core" />
<orderEntry type="module" module-name="kotlin.compiler-plugins.parcelize.common" />
<orderEntry type="module" module-name="kotlin.idea" />
</component>
</module>

View File

@@ -0,0 +1,15 @@
<!-- Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. -->
<idea-plugin xmlns:xi="http://www.w3.org/2001/XInclude">
<xi:include href="parcelize.xml" xpointer="xpointer(/idea-plugin/*)"/>
<extensions defaultExtensionNs="org.jetbrains.kotlin">
<irGenerationExtension implementation="org.jetbrains.kotlin.parcelize.ParcelizeIrGeneratorExtension"/>
<syntheticResolveExtension implementation="org.jetbrains.kotlin.idea.compilerPlugin.parcelize.IdeParcelizeResolveExtension"/>
<storageComponentContainerContributor
implementation="org.jetbrains.kotlin.idea.compilerPlugin.parcelize.IdeParcelizeDeclarationCheckerComponentContainerContributor"/>
<ultraLightClassModifierExtension
implementation="org.jetbrains.kotlin.idea.compilerPlugin.parcelize.ParcelizeUltraLightClassModifierExtension"/>
<quickFixContributor implementation="org.jetbrains.kotlin.idea.compilerPlugin.parcelize.quickfixes.K1ParcelizeQuickFixContributor"/>
</extensions>
</idea-plugin>

View File

@@ -1,5 +1,4 @@
// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
// Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
package org.jetbrains.kotlin.idea.compilerPlugin.parcelize
import org.jetbrains.kotlin.analyzer.moduleInfo

View File

@@ -1,4 +1,4 @@
// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
// Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
package org.jetbrains.kotlin.idea.compilerPlugin.parcelize

View File

@@ -1,5 +1,4 @@
// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
// Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
package org.jetbrains.kotlin.idea.compilerPlugin.parcelize.quickfixes
import org.jetbrains.kotlin.idea.quickfix.QuickFixContributor
@@ -8,7 +7,7 @@ import org.jetbrains.kotlin.idea.quickfix.RemoveModifierFix
import org.jetbrains.kotlin.lexer.KtTokens
import org.jetbrains.kotlin.parcelize.diagnostic.ErrorsParcelize
class ParcelizeQuickFixContributor : QuickFixContributor {
class K1ParcelizeQuickFixContributor : QuickFixContributor {
override fun registerQuickFixes(quickFixes: QuickFixes) {
quickFixes.register(
ErrorsParcelize.PARCELABLE_CANT_BE_INNER_CLASS,