Skip to content
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:安装插件时应允许同时选择安装提供了该插件依赖的服务的其他插件 #95

Open
Lipraty opened this issue Feb 2, 2023 · 3 comments

Comments

@Lipraty
Copy link
Member

Lipraty commented Feb 2, 2023

在插件市场中添加某个插件时,有些插件会依赖其他插件 (比如 translator 系列均需要依赖 @koishijs/translator ),但是目前插件市场仅会添加当前插件,并不会同时添加被依赖插件。这会导致用户添加后在配置页面发现还需要回到插件市场添加被依赖的插件,比较繁琐(

@shigma
Copy link
Member

shigma commented Feb 2, 2023

目前是否会安装取决于包管理器的行为。确实有必要由 Koishi 进行安装或提示。下面先列举一些想到的问题:

  1. 如何处理 peerDep 标注的版本?
    考虑到我们目前没有(也不太可能)支持全部的 semver range,我建议当存在插件型 peerDep 时直接提示存在前置插件依赖,无法安装。
  2. 非插件型的包是否要进行提示?
    个人倾向于不装,由包管理器默认行为决定。这是因为 1 我们无法提供版本选择 2 非插件型的 peerDep 大概率是其他插件的依赖,这种情况下直接写其他插件更合理。对于类似 assets, translator 这种情况,即使不预装也不应该在运行时访问。

@MaikoTan
Copy link
Member

MaikoTan commented Feb 2, 2023

I think a checkbox that says "also install dependencies" would be a better workflow, and then shows a dropdown menu allowing users to choose one of the versions.
As the version range issues, maybe showing a warning message if the versions mismatch?

@shigma
Copy link
Member

shigma commented Jan 24, 2024

标题与问题描述不符。问题描述所对应的标题应当是「安装插件时应允许同时选择安装提供了该插件依赖的服务的其他插件」。

一个插件的依赖可以有两种:

  1. peerDep,这种情况已有 issue Feature: enhance installation experience of plugins with peer deps #10
  2. service,本 issue 将用于讨论这种情况

@shigma shigma changed the title Feature:从 market 添加插件时应同时添加该插件依赖的(未安装的)其他插件 Feature:安装插件时应允许同时选择安装提供了该插件依赖的服务的其他插件 Jan 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants