platform/build-scripts/product-dsl/docs/errors.md
Complete reference of validation errors, their causes, and fixes.
| Error Type | Severity | Auto-Fix | Description |
|---|---|---|---|
| FileDiff | Warning | Yes | Generated file differs from disk |
| MissingDependenciesError | Error | No | Product missing required modules |
| SelfContainedValidationError | Error | No | Self-contained set has external deps |
| DuplicateModulesError | Error | No | Same module in multiple sets |
| PluginDependencyError | Error | Partial | Plugin has unresolvable dependencies |
| PluginDependencyNotBundledError | Error | No | Plugin depends on another plugin not bundled in same product |
| XIncludeResolutionError | Error | No | xi:include path cannot be resolved |
| MissingModuleSetsError | Error | No | Referenced module set not found |
| PluginizedModuleSetReferenceError | Error | No | Pluginized module set used through moduleSet() |
| Structural Violations | Error | Yes* | Loading mode constraint violations |
| MissingContentModulePluginDep | Error | No | Content module missing plugin dep |
| MissingTestPluginPluginDep | Error | No | Test plugin missing plugin dep |
| DSL Constraint Errors | Error | No | Invalid DSL usage |
| Suppressible Errors | Warning | Yes | Errors detected during generation |
Generated file content differs from what's on disk.
File diff detected: community/platform/platform-resources/generated/META-INF/intellij.moduleSets.vcs.xml
Change type: MODIFY
Cause: Running "Generate Product Layouts" detected changes that need to be applied.
Fix: The generator auto-applies diffs. Commit the changes or run the generator again.
Product: GoLand
✗ Missing: 'intellij.platform.polySymbols'
Needed by: intellij.platform.vcs.impl
Suggestion: Add module set: symbols
Cause: A module in the product depends on another module that isn't included.
Fixes (in order of preference):
getProductContentDescriptor()module() or embeddedModule() if no set existsknownPlugins❌ Module set 'core.platform' is marked selfContained but has unresolvable dependencies
✗ Missing: 'fleet.kernel'
Needed by: intellij.platform.kernel
💡 To fix:
1. Add the missing modules/sets to 'core.platform'
2. Or remove selfContained=true if this set composes with others
Cause: A module set with selfContained = true has dependencies outside the set.
Fixes:
selfContained = true if the set is designed to compose with others❌ ERROR: Duplicate modules found across 3 module set(s)
✗ Module 'intellij.platform.vcs.impl' appears in:
- vcs
- ide.common
→ Suggested fix: Remove from: ide.common
📋 Each module must belong to exactly one module set.
Cause: Same module is declared in multiple module sets or added via both moduleSet() and module().
Runtime impact: Causes "Plugin has duplicated content modules declarations" error.
Fix: Remove duplicate declarations. Keep module in only one set.
❌ Plugin 'intellij.settingsRepository' has unresolvable content module dependencies
✗ Missing: 'intellij.libraries.sshd.osgi' (not in any known plugin or module set)
Needed by:
└─ plugin.xml
Proposed patch: Add allowMissingDependencies to the product spec.
--- a/build/src/org/jetbrains/intellij/build/IdeaUltimateProperties.kt
+++ b/build/src/org/jetbrains/intellij/build/IdeaUltimateProperties.kt
@@ -379,1 +379,4 @@
override fun getProductContentDescriptor(): ProductModulesContentSpec = productModules {
+ allowMissingDependencies(
+ "intellij.libraries.sshd.osgi",
+ )
Fixes:
<content> in a plugin, or add to module setPlugin 'intellij.micronaut' has unresolvable content module dependencies
* Missing: 'intellij.javaee.jpa' (auto-inferred JPS dependency, filtered by config)
Needed by:
└─ intellij.micronaut.data (content module)
Cause: Dependency was auto-inferred from JPS but filtered or suppressed (e.g., by suppressions.json or allowed-missing config).
Fixes:
pluginAllowedMissingDependencies in config<module name="..."/> to content module descriptorsuppressions.json, no error should be reported; if it is, treat as validator bug❌ Plugin 'intellij.myPlugin' has unresolvable content module dependencies
✗ Missing: 'intellij.some.module'
Unresolved in products:
└─ GoLand (not bundled)
└─ CLion (not bundled)
Fix: Either bundle the dependency plugin in those products, or ensure it's in a module set.
❌ Plugin 'intellij.foo' has unresolvable plugin dependencies
* Unresolved plugin IDs:
* com.intellij.bar
* Missing in products:
* GoLand: com.intellij.bar
Cause: A plugin declared a dependency on another plugin that is not bundled in the same product, or the dependency plugin cannot be resolved to a plugin node in the graph.
Fixes:
plugin.xml so it registers in the graphEmitted by PluginContentStructureValidator (ruleName pluginContentStructureValidation).
❌ Plugin 'intellij.myPlugin' has structural violations
✗ intellij.my.required.module (REQUIRED) depends on:
└─ intellij.my.optional.module (OPTIONAL) - violates loading hierarchy
Cause: Module loading constraints are violated:
| Depending Module | Cannot Depend On | Reason |
|---|---|---|
EMBEDDED | Non-EMBEDDED siblings | Embedded modules merge into main JAR |
REQUIRED | OPTIONAL/ON_DEMAND siblings | Makes optional effectively required |
Auto-Fix: For non-DSL plugins, PluginContentStructureValidator automatically adds loading="required" to the dependency. See StructuralViolationFix.
Manual Fix (for DSL-defined plugins): Update the module set definition to use requiredModule() instead of module().
❌ xi:include resolution failed
Plugin: intellij.myPlugin
Path: META-INF/NonExistent.xml
Debug: Searched in: [module1, module2]
Cause: An xi:include directive references a resource that doesn't exist.
Fixes:
optional = true in deprecatedInclude() if file may not exist❌ Product references missing module sets
✗ Missing: 'nonexistent.set'
Cause: Product references a module set that doesn't exist.
Fix: Either create the module set or remove the reference.
❌ Product 'IDEA' references pluginized module set 'debugger.streams' as a regular module set
* Pluginized module sets are standalone bundled plugin wrappers and are not inlined through moduleSet(...) references
Fix:
1. Remove the moduleSet(...) reference to 'debugger.streams'
2. Bundle 'intellij.moduleSet.plugin.debugger.streams' in products that should ship it
Cause: A module set created via plugin(...) is still being used through moduleSet(...) in a product spec or nested under a regular module set.
Fix: Remove the moduleSet() reference and bundle the generated wrapper plugin module instead.
❌ Invalid loading overrides for module set 'commercialIdeBase'
The following 2 module(s) are not direct modules of this set:
✗ intellij.rd.platform
✗ intellij.rd.ui
Note: You cannot override nested set modules.
💡 Hint: You can only override direct modules, not modules from nested sets.
To override modules from nested sets, reference the nested set directly:
moduleSet(YourNestedSet()) {
overrideAsEmbedded("module.name")
}
Cause: Attempting to override loading mode for modules in nested sets.
Fix: Reference the nested set directly and apply overrides there.
❌ Duplicate module alias detected: 'com.intellij.modules.xml'
Already defined in: module set 'xml'
Attempted to redefine at: product level
💡 Hint: Module aliases must be unique across the entire product.
Cause: Same alias declared in multiple places.
Fix: Remove duplicate alias declaration.
❌ Product specification errors: Redundant module set references detected
✗ Product 'GoLand': module set 'ssh' is redundant (already nested in 'ide.ultimate')
💡 Hint: Remove redundant module sets from product's getProductContentDescriptor() method.
Example fix:
override fun getProductContentDescriptor() = productModules {
// moduleSet(ssh()) // ← REMOVE (already in ide.ultimate)
moduleSet(ideUltimate()) // ← KEEP (includes ssh)
}
Cause: Product explicitly references a module set that's already nested in another set it uses.
Fix: Remove the redundant moduleSet() call.
The generator can automatically fix structural loading violations in non-DSL plugins (those with handwritten plugin.xml files).
How it works:
PluginContentStructureValidator identifies loading constraint violationsfixStructuralViolations() in PluginContentStructureValidator modifies plugin.xml to add loading="required"Example auto-fix:
<!-- Before -->
<module name="intellij.my.optional.module"/>
<!-- After (auto-fixed) -->
<module name="intellij.my.optional.module" loading="required"/>
Note: DSL-defined plugins are skipped (their XML is auto-generated). Fix the module set definition instead.
Module intellij.platform.ide.impl depends on library 'Guava' directly.
Use library module 'intellij.libraries.guava' instead.
Auto-Fix: The generator modifies the .iml file:
<!-- Before -->
<orderEntry type="library" name="Guava"/>
<!-- After (auto-fixed) -->
<orderEntry type="module" module-name="intellij.libraries.guava"/>
Module intellij.platform.ide.impl has testing libraries in production scope:
- JUnit5 (COMPILE) → should be TEST scope
Run 'Generate Product Layouts' to fix automatically.
Auto-Fix: Run "Generate Product Layouts" to move test libraries to TEST scope.
❌ Content module 'intellij.react.ultimate' has IML dependencies on plugin main modules
but is missing corresponding XML plugin declarations:
✗ Missing: <plugin id="com.intellij.css"/>
IML dependency: intellij.css (main module of com.intellij.css)
💡 Fix: Add <plugin id="com.intellij.css"/> to the content module's XML descriptor
Or suppress temporarily:
- DSL-defined test plugin modules: add module-level allowedMissingPluginIds in the testPlugin DSL
- Non-DSL content modules: add suppressPlugins entry to platform/buildScripts/suppressions.json
Cause: Content module has compile dependency in .iml on a plugin's main module, but the module's XML descriptor doesn't declare the plugin dependency.
Runtime impact: NoClassDefFoundError when the content module tries to use classes from the plugin.
Fixes:
<plugin id="..."/> to the content module's descriptorallowedMissingPluginIdssuppressions.json (contentModules.<module>.suppressPlugins)Note:
--update-suppressions mode, non-DSL cases are reported as warnings and their suppressions are updated in suppressions.json.allowedMissingPluginIds) and are not written to suppressions.json.❌ Test plugin 'intellij.rider.tests' is missing plugin dependencies required by its content modules
✗ Missing: com.jetbrains.remoteDevelopment
Needed by: intellij.rider.test.cases.rdct.distributed._test
💡 Fix: Add <plugin id="com.jetbrains.remoteDevelopment"/> to the test plugin's plugin.xml
Cause: A DSL-defined test plugin has content modules whose JPS dependencies include modules
owned by production plugins that are resolvable in test scope, but the test plugin's plugin.xml
doesn't declare the required <plugin id="..."/> dependency.
Runtime impact: NoClassDefFoundError in tests because classes from the owning plugin are
missing from the test classpath.
Fixes:
<plugin id="..."/>.allowedMissingPluginIds in the test plugin spec
(or module-level allowedMissingPluginIds for a narrower scope).These errors are detected during generation and can be suppressed via suppressedErrors in suppressions.json.
Unlike validation errors that check constraints across the model, these errors report issues found during the actual generation process (e.g., when parsing module descriptors).
Error [NON_STANDARD_DESCRIPTOR_ROOT]
* Descriptor uses non-standard XML root element
Module: intellij.fullLine.yaml
Path: .../intellij.fullLine.yaml.xml
To suppress: Add to suppressedErrors in suppressions.json:
"nonStandardRoot:intellij.fullLine.yaml"
Cause: Module descriptor XML uses <dependencies> as root element instead of standard <idea-plugin>.
The dependency generator expects <idea-plugin> as the root element. Descriptors with non-standard roots (like <dependencies>) cannot be parsed for dependency generation.
Fixes:
<idea-plugin>suppressedErrors in suppressions.jsonSuppression key format: nonStandardRoot:{moduleName}
Example suppression (in suppressions.json):
{
"suppressedErrors": [
"nonStandardRoot:intellij.cmake.psi",
"nonStandardRoot:intellij.fullLine.yaml"
]
}
Use Plugin Model Analyzer MCP to debug dependency issues:
// Find dependency path between modules
mcp__PluginModelAnalyzer__find_dependency_path(
fromModule = "intellij.platform.vcs.impl",
toModule = "intellij.c.core"
)
// Check which module sets contain a dependency
mcp__PluginModelAnalyzer__suggest_module_set_for_modules(
moduleNames = ["intellij.c.core"]
)
// Check module reachability within a module set
mcp__PluginModelAnalyzer__check_module_reachability(
moduleName = "intellij.platform.kernel",
moduleSetName = "core.platform"
)
// Get module info including products/sets
mcp__PluginModelAnalyzer__get_module_info(
moduleName = "intellij.fullLine.cpp"
)
find_dependency_path to understand why dep is neededknownPlugins