platform/build-scripts/product-dsl/docs/validation-rules.md
Validation ensures module and plugin dependencies are resolvable at runtime and that descriptors remain consistent with the graph. The authoritative, validator-level specs live in docs/validators/.
| # | Validator | Scope | Spec |
|---|---|---|---|
| 1 | Self-contained module set | Module set | self-contained-module-set.md |
| 2 | Product module set | Product | product-module-set.md |
| 3 | Pluginized module-set references | Product / module set | pluginized-module-set-reference.md |
| 4 | Content module dependencies | Bundled plugins | content-module-dependency.md |
| 5 | Plugin content dependencies | Plugin | plugin-content-dependency.md |
| 6 | Plugin-to-plugin dependencies | Plugin | plugin-plugin-dependency.md |
| 7 | Plugin dependency declaration duplicates | Plugin | plugin-dependency-declaration.md |
| 8 | Test plugin plugin dependencies | Test plugin | test-plugin-plugin-dependency.md |
| 9 | Duplicate plugin content modules | Product | plugin-content-duplicates.md |
| 10 | Test plugin descriptor ID conflicts | Product | plugin-descriptor-id-conflicts.md |
| 11 | Library module replacement | Module | library-module.md |
| 12 | Test library scope | Module | test-library-scope.md |
| 13 | Suppression config keys | Config | suppression-config.md |
| 14 | Plugin content structural validation | Plugin | plugin-content-structure.md |
UltimateModuleSets.main() or CommunityModuleSets.main()bazel run //platform/buildScripts:plugin-model-tool.iml or Bazel target; not validated directly.See docs/validators/README.md for the full glossary.
Validation uses the plugin graph after generation, filtering, and suppression. If a dependency is not represented as a graph edge, it is not validated.
| Loading | Meaning | Validation scope |
|---|---|---|
| embedded | Core module, main classloader | Per-product (must resolve in bundling product) |
| required | Required at startup | Per-product (must resolve in bundling product) |
| optional | Loaded if deps available | Global existence |
| on_demand | Loaded when requested | Global existence |
| (default) | Defaults to optional | Global existence |
Critical modules are those with embedded/required loading on any incoming content edge.
Orphan dependencies are always errors. For non-critical modules, availability is checked globally; for critical modules, availability must be within the bundling product.
Suppressions are explicit contracts: dependencies intentionally omitted from XML (via suppressions.json or allowlists) must not produce validation errors. Validators operate on the graph after filtering and suppression, not on raw JPS dependencies.
allowMissingDependencies (product): allow missing module deps in a product.pluginAllowedMissingDependencies (config): allow missing module deps for a plugin.allowedMissingPluginIds (DSL test plugins): allow missing plugin IDs for specific DSL-defined test modules or the whole test plugin.suppressions.json (contentModules.<module>.suppressPlugins): allow missing plugin IDs for non-DSL content modules.suppressions.json: suppress module deps, plugin deps, library replacements, or test-library scope fixes.