module-set-pluginization
Convert Product DSL module sets into generated plugin wrappers and handle the surrounding generation flow. Use when pluginizing a module set like `recentFiles` or `grid.core`, updating bundled plugin registration, regenerating wrapper artifacts, or fixing validation/build ordering bugs where wrapper plugin descriptors are needed before generated files exist on disk.
安装与使用
请根据来源仓库和你的 AI 工具说明安装此技能。先阅读技能文件和依赖要求,再添加到工作流。
查看来源 ↗使用指南技能说明
Module Set Pluginization
Use this workflow when a Product DSL ModuleSet should become a generated plugin wrapper.
Before Editing
- Read
community/platform/build-scripts/product-dsl/.claude/rules/product-dsl.mdbefore changing product-dsl sources. - Find an existing pluginized example first, usually
recentFiles()orvcsFrontend(), and mirror its packaging pattern before inventing a new one. - Confirm whether the target should stay inlined inside a parent module set. Pluginized wrappers usually stop being emitted through the old generated
intellij.moduleSets.<name>.xmlpath.
Convert the DSL Definition
- Change the module-set function from
moduleSet("name")toplugin("name"). - Keep the content modules unchanged unless the product layout itself is also changing.
- Remove stale
moduleSet(...)inclusions from aggregate module sets if the wrapper should no longer be inlined there. - If the wrapper should be bundled by default, add
intellij.moduleSet.plugin.<name>toDEFAULT_BUNDLED_PLUGINSinProductModulesLayout.kt.
Fix Ordering Bugs When Validation Runs Before Generation
If pluginization causes failures like "plugin missing" or unresolved dependencies before generated wrapper files exist on disk, preload wrapper plugin content in memory.
- Add a cache path for precomputed plugin content in
PluginContentCache. - Build
PluginContentInfoobjects for pluginized module sets from the same data used byModuleSetPluginGenerator. - Inject those precomputed wrapper descriptors in
ModelBuildingStagebefore plugin extraction and validation start. - Prefer this over reordering the entire pipeline. The goal is to make validation independent from already-generated wrapper files being present on disk.
Expected Generated Churn
- New wrapper directory under
community/module-set-plugins/generated/intellij.moduleSet.plugin.<name>/with:-
<module>.iml -
plugin-content.yaml -
resources/META-INF/plugin.xml -
BUILD.bazelafter JPS-to-Bazel sync
-
- Update of
community/module-set-plugins/generated/intellij.moduleSet.plugin.main/ - Deletion of the legacy generated
community/platform/platform-resources/generated/META-INF/intellij.moduleSets.<name>.xml - Updates to any generated aggregators or xi:include-based product descriptors that previously referenced the legacy module-set XML
-
.idea/modules.xmlandcommunity/.idea/modules.xmlupdates after generator + JPS-to-Bazel sync
Required Commands
Run these in order after the source edits:
bazel run //platform/buildScripts:plugin-model-tool
./build/jpsModelToBazel.cmd
./build/jpsModelToBazel.cmd is required because generated wrapper .iml files and BUILD.bazel files change together.
Verification
- Run
get_file_problems(errorsOnly=false)on every changed Kotlin source and test file. - Run
IdeaUltimatePackagingTestfirst viamcp__ijproxy__execute_run_configurationwithconfigurationName = "IdeaUltimatePackagingTest". - Run the
Fast Project Structure Testsrun configuration viamcp__ijproxy__execute_run_configurationwithconfigurationName = "Fast Project Structure Tests". - Run
UltimateProjectTestsStructureTestafter that viamcp__ijproxy__execute_run_configurationwithconfigurationName = "UltimateProjectTestsStructureTest". - Run
IdeaUltimatePluginModuleDependenciesTestafter that viamcp__ijproxy__execute_run_configurationwithconfigurationName = "IdeaUltimatePluginModuleDependenciesTest". - Run
All Packaging Testsafter that viamcp__ijproxy__execute_run_configurationwithconfigurationName = "All Packaging Tests". - Add or update a regression test that proves the wrapper exists in memory before generated files are written if you touched pipeline ordering.
- Use targeted tests with fully qualified names:
./tests.cmd -Dintellij.build.test.patterns=org.jetbrains.intellij.build.productLayout.generator.ModuleSetPluginGeneratorTest
./tests.cmd -Dintellij.build.test.patterns=org.jetbrains.intellij.build.productLayout.pipeline.ModelBuildingStageTest
./tests.cmd -Dintellij.build.test.patterns=org.jetbrains.intellij.build.productLayout.validator.ModuleSetPluginizationValidatorTest
./tests.cmd -Dintellij.build.test.patterns=org.jetbrains.intellij.build.productLayout.dependency.PluginDependencyGraphTest
Add product-specific packaging tests only if the generated diff or failing tests show downstream expectations need updates.
使用示例
查看来源仓库中的使用示例与配置说明。
查看来源 ↗来源历史
- 收录时间
- 2026-03-11
- 索引更新时间
- 2026-03-11
- Branch
- main
收录与同步日期属于本站记录。源码修改历史请查看来源仓库。
GitHub ↗chat Comments (0)
Sign in to join the discussion and leave a comment.
No comments yet. Be the first to share your thoughts!