diff --git a/docs/diagnostics.md b/docs/diagnostics.md index 0752d8f..80a961f 100644 --- a/docs/diagnostics.md +++ b/docs/diagnostics.md @@ -73,6 +73,20 @@ Help links in the IDE point to this page (`#dp###` anchors). See also [Registry key conventions](./registry-key-conventions.md). +## Plugin assemblies (DP033) {#dp033} + +| ID | Severity | When | +|----|----------|------| +| **DP033** | Error | The same **strategy key** for the same contract is registered in **more than one referenced provider assembly** | + +**Where it applies:** host (or any) compilations that reference multiple plugin provider assemblies contributing `[RegisterStrategy]` / `[RegisterStrategy]` for the same contract with an identical key string. + +**Message:** includes the key, contract type, and conflicting assembly names. + +**Fix:** use distinct keys per provider assembly, or reference only one provider per contract dimension. Duplicate keys within a **single** assembly remain **DP003** (generator). + +See [Plugin assemblies sample](https://github.com/Skymly/DesignPatterns.Samples/tree/main/DesignPatterns.Samples.PluginAssemblies) and the main repo [PluginAssemblies.md](https://github.com/Skymly/DesignPatterns/blob/main/docs/PluginAssemblies.md). + ## State transition table (DP026–DP031) {#state-transition-table-dp026-dp031} | ID | Severity | When | diff --git a/docs/zh/diagnostics.md b/docs/zh/diagnostics.md index e9bc291..d4b5a41 100644 --- a/docs/zh/diagnostics.md +++ b/docs/zh/diagnostics.md @@ -72,6 +72,18 @@ IDE 帮助链接指向本页(`#dp###` 锚点)。 另见 [注册表 Key 命名约定](./registry-key-conventions.md)。 +## 插件程序集(DP033) {#dp033} + +| ID | 级别 | 触发条件 | +|----|------|----------| +| **DP033** | Error | 同一契约的相同 **strategy key** 在**多个被引用的供应商程序集**中重复注册 | + +**作用范围:** 宿主编译引用多个插件供应商程序集,且对同一契约使用了相同的 `[RegisterStrategy]` key。 + +**消息:** 包含 key、契约类型与冲突程序集名称。 + +**修复:** 各供应商使用不同 key,或每个契约维度只引用一个供应商。单程序集内重复 key 仍由 **DP003**(生成器)报告。 + ## State 转换表(DP026–DP031) {#state-转换表-dp026-dp031} | ID | 级别 | 触发条件 |