Repository navigation
No built-in way to tell whether a plugin loaded and activated #10776
Replies: 2 comments
|
同意这个需求,并且补一个你那张清单里没有的第三种状态 —— 我今天刚在自己的插件上踩到。 「加载失败」不等于「没加载」
它读的是
用户能看到的只有一条提示,而那条提示恰恰是另一个插件(管理器自己)弹出来的。也就是说:插件越是有问题,越不可能自己报告问题。 所以清单要这么列
给插件作者的一条反向经验同一件事的另一半在我这边:那个上限是猜的,不是量出来的。我们从这个包里只 import 一个 如果这个帖最后变成一个提案,第 1 条的三档计数是最小可用版本:它不需要宿主暴露新 API,只需要在现有加载流程的每个早退点上报一次。 |
|
This is the missing third state, and the framing "failed" vs "refused" is the part I got wrong — I assumed everything that does not show up in Worse: my own plugin had the same trap waiting for it. After reading this I checked my "peerDependencies": {
"@deepseek-ai/cordis": ">=4.0.0-rc <5",
"@deepseek-ai/dsh-client-ui-slots": ">=0.0.1-rc <2"
}Both upper bounds are guesses, exactly like the one you describe. If the harness ever ships What I changed in response (already pushed to
On the proposal, I agree the three-bucket startup line is the minimum viable version, and I like that it needs no new host API — one report at each early exit. Two additions from my side:
Happy to help write this up as a concrete proposal if it heads that way — the three exit points (resolve failure / refusal / activation failure) map cleanly onto what the loader already knows. Context for whoever else reads this: |
Uh oh!
There was an error while loading. Please reload this page.
Problem
After adding a plugin to a profile patch, there is no built-in way to answer the most basic question: did it actually load?
I've assumed "it didn't work" three times when the real cause was something else — a stale module, a bad path, or the wrong profile. Each time, finding out took a restart cycle or a look at host logs.
What I built to work around it
The plugin appends a line to a local file whenever it activates, so any script can confirm it:
That's a plugin-side workaround every author has to invent separately. On the consumer side (someone who just installed a plugin from the market), there's nothing comparable.
What I'd find useful
loaded 12 plugins, 1 failed (id: live-workbench, error: cannot resolve package)Why it matters for DX
"My plugin doesn't work" is the most common question in any plugin ecosystem, and right now the answer is usually invisible unless the author already added their own logging. A minimal activation report would turn a debugging session into a single glance.
Environment
desktop,web) with localfile://pluginsAll reactions