fix(boot): restore consumer-owned startup requirements

This commit is contained in:
Yichen Jiang committed 2026-09-11 18:17:44 +08:00
1 parent fa240e7372
commit f747ada426
44 files changed
+224 -455

No files matched your search

+2 -2
View File
@@ -2,5 +2,5 @@
# side as of the last confirmed-consistent state. Both languages carry equal authority;
# after editing either side, bring the other along and re-record with:
# pnpm run verify-translation-pairing --write docs/user/develop/basic/publish.md
publish.md: 82a13cb9ae14bfcc121dc47d7c31590b8d8f0b5a
publish.zh.md: 196d55746af68ec65eabcd64f76323a4c8baf367
publish.md: 5b32e40fce38905f77efe2bc0c4b7ffd67fdb9d7
publish.zh.md: b03322b805c9310d28206d1ab1b4687cd8cd93b3
+1 -1
View File
@@ -111,7 +111,7 @@ dsh --profile demo
`dsh plugin --profile demo remove dsh-hello-plugin` removes both the dependency and the layer.
An installed bundle mounts as an external layer: the dump shows its rows inside one group named `bundle/dsh-hello-plugin`, and each row keeps the id your patch declares, so the row above is `hello` in the mounted tree and a user patch that targets it names that id. Row ids are shared across every layer: if another layer already declares one of yours, or your patch declares one twice, the whole bundle is left out and the reason is printed at boot and shown in the plugin list. A row of yours that fails to start is isolated and reported in the plugin list instead of stopping `dsh`; if your bundle provides a service the built-in rows inject, declare `dsh.bundle.stage: boot` so it mounts like a built-in one and fails loud.
A bundle mounts its rows under the parents declared in its patch and keeps their ids: the row above remains `hello`. Layers claim ids in profile order; a bundle that repeats an id or declares an earlier layer’s id is omitted whole and reported at startup and in the plugin list. A failed row outside the [required startup ids](../../../architecture.md) produces a warning while successful siblings remain active. A required consumer that cannot activate, including because its provider failed, still rejects startup.
## The loading order
+1 -1
View File
@@ -111,7 +111,7 @@ dsh --profile demo
`dsh plugin --profile demo remove dsh-hello-plugin` 会同时移除依赖和对应的层。
已安装的组合包作为外部层挂载:dump 会把它的行显示在一个名为 `bundle/dsh-hello-plugin` 的组里,每一行保持你的 patch 所声明的 id,因此上面那一行在挂载后的树里仍是 `hello`,针对它的用户 patch 就写这个 id。行 id 在所有层之间共用:如果别的层已经声明了你的某个 id,或者你的 patch 把一个 id 声明了两次,整个组合包会被排除,原因在启动时打印并显示在插件列表里。你的某一行启动失败时会被隔离并在插件列表里报告,而不是让 `dsh` 停下;如果你的组合包提供内置行所注入的服务,请声明 `dsh.bundle.stage: boot`,让它像内置行一样挂载并明确失败。
组合包按 patch 声明的父节点挂载行并保留 id:上面的行仍为 `hello`。各层按 profile 顺序占用 id;组合包重复声明 id 或声明前面层已占用的 id 时会被整层排除,并在启动时和插件列表中报告。不在[启动必需 id](../../../architecture.zh.md) 中的行失败只产生警告,成功的兄弟条目继续运行。必需消费者无法激活时仍拒绝启动,包括其提供方失败导致无法激活的情况。
## 加载顺序