feat(plugin): dont include plugin spec fragments for disabled or optional plugins (#1058)

* feat(plugin): dont include plugin spec fragments for disabled or optional plugins

* test: fixed tests

* fix(plugin): calculate handlers after disabling plugins

* fix(plugin): clear Plugin._.super when rebuilding

* fix(ui): dont process handlers for disabled plugins

* test: added tests for disabling fragments

* fix(plugin): ignore any installed deps of a disabled conditional plugin. Fixes #1053
This commit is contained in:
Folke Lemaitre 2023-09-29 16:11:56 +02:00 committed by GitHub
parent 6b55e4695a
commit f3c7169dd6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 181 additions and 80 deletions

View file

@ -411,13 +411,15 @@ function M:plugin(plugin)
else
self:append(" ")
local reason = {}
for handler in pairs(Handler.types) do
if plugin[handler] then
local trigger = {}
for _, value in ipairs(plugin[handler]) do
table.insert(trigger, type(value) == "table" and value[1] or value)
if plugin._.kind ~= "disabled" then
for handler in pairs(Handler.types) do
if plugin[handler] then
local trigger = {}
for _, value in ipairs(plugin[handler]) do
table.insert(trigger, type(value) == "table" and value[1] or value)
end
reason[handler] = table.concat(trigger, " ")
end
reason[handler] = table.concat(trigger, " ")
end
end
for _, other in pairs(Config.plugins) do