[platform ml] convert intellij.platform.ml.impl to a content module (IJPL-190495)

This is needed to have an explicit dependency on the backend in it (IJPL-188916).

The new module is registered in common-ide-modules.xml to include it in all IntelliJ-based IDEs as before. It's also explicitly included in Fleet Backend to keep the old behavior. Existing plugins which depend on intellij.platform.ml.impl are updated to have an explicit dependency. 'jetbrains.mlapi*' and 'ngram' libraries which are used by the module are also moved to its content module, and other plugins which use these libraries now do it via dependency on the module.

GitOrigin-RevId: be9dc19406b87f8978f7a922e950f9009e1aabda
This commit is contained in:
Nikolay Chashnikov
2025-06-04 17:06:40 +02:00
committed by intellij-monorepo-bot
parent e81c802169
commit d7adc875de
17 changed files with 26 additions and 12 deletions

View File

@@ -77,7 +77,6 @@ private val PLATFORM_IMPLEMENTATION_MODULES = java.util.List.of(
"intellij.platform.feedback",
"intellij.platform.usageView.impl",
"intellij.platform.buildScripts.downloader",
"intellij.platform.ml.impl",
"intellij.platform.runtime.product",
"intellij.platform.bootstrap",

View File

@@ -40,11 +40,15 @@ jvm_library(
"@lib//:jetbrains-mlapi-ml-tools-suspendable",
],
exports = [
"@lib//:ngram-slp",
"@lib//:jetbrains-mlapi-catboost-shadow-need-slf4j",
"@lib//:jetbrains-mlapi-ml-tools",
"@lib//:jetbrains-mlapi-ml-tools-suspendable",
],
runtime_deps = [":ml-impl_resources"]
runtime_deps = [
":ml-impl_resources",
"//platform/backend",
]
)
jvm_library(

View File

@@ -33,7 +33,7 @@
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="kotlin-stdlib" level="project" />
<orderEntry type="library" name="ngram-slp" level="project" />
<orderEntry type="library" exported="" name="ngram-slp" level="project" />
<orderEntry type="module" module-name="intellij.platform.util" />
<orderEntry type="module" module-name="intellij.platform.util.ex" />
<orderEntry type="module" module-name="intellij.platform.core" />
@@ -41,6 +41,7 @@
<orderEntry type="module" module-name="intellij.platform.analysis" />
<orderEntry type="module" module-name="intellij.platform.ide.impl" />
<orderEntry type="module" module-name="intellij.platform.ide.internal" />
<orderEntry type="module" module-name="intellij.platform.backend" scope="RUNTIME" />
<orderEntry type="module" module-name="intellij.platform.testFramework" scope="TEST" />
<orderEntry type="library" scope="TEST" name="assertJ" level="project" />
<orderEntry type="module" module-name="intellij.platform.util.text.matching" />

View File

@@ -1,4 +1,7 @@
<idea-plugin>
<dependencies>
<module name="intellij.platform.backend"/>
</dependencies>
<extensions defaultExtensionNs="com.intellij">
<projectService serviceInterface="com.intellij.internal.statistic.local.FileTypeUsageSummaryProvider"
serviceImplementation="com.intellij.internal.statistic.local.FileTypeUsageLocalSummary"

View File

@@ -155,10 +155,6 @@
<xi:fallback/>
</xi:include>
<xi:include href="/META-INF/ml.xml">
<xi:fallback/>
</xi:include>
<xi:include href="/META-INF/xdebugger.xml">
<xi:fallback/>
</xi:include>

View File

@@ -9,6 +9,7 @@
<module name="intellij.platform.collaborationTools"/>
<module name="intellij.platform.tasks"/>
<module name="intellij.platform.tasks.impl"/>
<module name="intellij.platform.ml.impl"/>
<module name="intellij.libraries.microba"/>
<module name="intellij.libraries.skiko"/>
<module name="intellij.platform.compose"/>

View File

@@ -14,7 +14,6 @@ jvm_library(
srcs = glob(["src/**/*.kt", "src/**/*.java"], allow_empty = True),
deps = [
"@lib//:kotlin-stdlib",
"@lib//:ngram-slp",
"//platform/analysis-api:analysis",
"//platform/editor-ui-api:editor-ui",
"//platform/platform-impl:ide-impl",
@@ -65,7 +64,6 @@ jvm_library(
"//platform/ml-impl",
"//platform/ml-impl:ml-impl_test_lib",
"//platform/core-ui",
"@lib//:ngram-slp",
"//platform/platform-impl/internal",
"//platform/ml-api:ml",
]

View File

@@ -31,7 +31,6 @@
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="kotlin-stdlib" level="project" />
<orderEntry type="library" name="ngram-slp" level="project" />
<orderEntry type="module" module-name="intellij.platform.analysis" />
<orderEntry type="module" module-name="intellij.platform.editor.ui" />
<orderEntry type="module" module-name="intellij.platform.ide.impl" />

View File

@@ -15,7 +15,6 @@
<orderEntry type="module" module-name="intellij.platform.testFramework" scope="TEST" />
<orderEntry type="module" module-name="intellij.platform.ml.impl" scope="TEST" />
<orderEntry type="module" module-name="intellij.platform.core.ui" />
<orderEntry type="library" name="ngram-slp" level="project" />
<orderEntry type="module" module-name="intellij.platform.ide.internal" scope="TEST" />
<orderEntry type="module" module-name="intellij.platform.ml" scope="TEST" />
</component>

View File

@@ -19,6 +19,7 @@
<dependencies>
<plugin id="com.intellij.modules.lang"/>
<module name="intellij.platform.ml.impl"/>
<module name="intellij.platform.vcs.impl"/>
</dependencies>

View File

@@ -5,7 +5,9 @@
<resource-bundle>messages.FilePredictionBundle</resource-bundle>
<description><![CDATA[Predicts next file which will be open in IDE to start long running analysis and pre-load caches.]]></description>
<dependencies>
<module name="intellij.platform.ml.impl"/>
</dependencies>
<depends optional="true" config-file="file-prediction-java.xml">com.intellij.java</depends>
<depends optional="true" config-file="file-prediction-vcs.xml">Git4Idea</depends>

View File

@@ -18,6 +18,7 @@
<dependencies>
<!-- IJ/AS-DEPENDENCY-PLACEHOLDER -->
<plugin id="com.intellij.java"/>
<module name="intellij.platform.ml.impl"/>
<module name="intellij.platform.collaborationTools"/>
</dependencies>

View File

@@ -14,6 +14,10 @@
<resource-bundle>messages.marketplaceMlBundle</resource-bundle>
<dependencies>
<module name="intellij.platform.ml.impl"/>
</dependencies>
<extensions defaultExtensionNs="com.intellij">
<registryKey
defaultValue="-1"

View File

@@ -2,6 +2,7 @@
<resource-bundle>messages.searchEverywhereMlBundle</resource-bundle>
<dependencies>
<module name="intellij.platform.ml.impl"/>
<module name="intellij.searchEverywhereMl.ranking.ext"/>
</dependencies>

View File

@@ -5,6 +5,7 @@
<incompatible-with>com.intellij.modules.androidstudio</incompatible-with>
<dependencies>
<module name="intellij.platform.ml.impl"/>
<plugin id="tanvd.grazi"/>
<module name="intellij.libraries.ai.grazie.spell.gec.engine.local"/>
</dependencies>

View File

@@ -16,6 +16,7 @@
</content>
<dependencies>
<module name="intellij.platform.ml.impl"/>
<plugin id="com.intellij.completion.ml.ranking"/>
</dependencies>

View File

@@ -1,4 +1,7 @@
<idea-plugin package="com.intellij.python.ml.features">
<dependencies>
<module name="intellij.platform.ml.impl"/>
</dependencies>
<extensions defaultExtensionNs="com.intellij">
<statistics.counterUsagesCollector implementationClass="com.intellij.python.ml.features.imports.PyCharmImportsRankingLogs"/>
<registryKey