-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature: Service dependencies mismatch warnings between "package.json" and cordis "using" #241
Comments
你说的对,但是子插件怎么算,子插件可能不是在 apply 时加载,可能在其他事件发生时被 plugin,子插件不一定随着包的启用而启用,这将导致检测操作不准确,不确定,做这个检测是没有必要的 而且 package.json 中的 koishi 字段 仅适用于 koishijs/webui 中的 config 和 market 等浏览器端插件,cordis 如果要检查相关内容,则只能支持一种Plugin.Package(差不多是这个意思)类型的插件,如果要 Koishi 进行检查,将会引起很多不必要的 hook |
第一,这里是Koishi项目的Issue,不是Cordis项目的Issue。所以我的想法是不会在Cordis内进行检查,而是由Cordis提供相关Event,由Koishi完成检查 First, this is a isuue for koishi repository , not for cordis , which means I think the checking process should implement in Koishi and cordis should provide some Events. |
所以没用到的服务不算了?( |
就怕每用一次服务都得 emit ( |
|
我的建议是检查包含关系,即:
|
支持。 Sounds good! Хорошо! |
全部 Optional.png (非常合理 |
咦,我刚刚想到,现在可以声明 required 和 optional 的话,是不是没有必要在 package.json 中声明服务依赖了? |
I think it should be still required, since you don't have approaches to get the 我認爲它依舊是必要的,因爲在安裝插件之前你並沒有方法得到 |
安装插件之前也不需要这些数据吧…… |
Describe the problem related to the feature request
自从Cordis 2.11,在插件中访问没有在"using"字段中定义的依赖会产生一个警告。我认为有必要检查package.json和"using"字段中定义的依赖的一致性,因为Koishi插件管理器会读取和展示package.json中的以来信息并在控制台展示,这对于使用插件的人来说很重要。
Since Cordis 2.11, access the dependencies which did not declared in the "using" field of the plugin will cause a warning. I think it's nesseary to check the consistency between the package.json and "using" field because the koishi plugin manager reads and displays them in the console page. It's important for user who using these plugins.
Describe the solution you'd like
无
None
Describe alternatives you've considered
无
None
Additional context
无
None
The text was updated successfully, but these errors were encountered: