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

fix(plugin): merge cond property of import specs #1963

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

overhacked
Copy link

Description

When a spec had an import property, the cond property was treated the same as enabled; any specs to be imported were ignored and treated as uninstalled if cond evaluated to false. This is inconsistent with how cond behaves in a plugin spec without an import property.

To make the behavior consistent when using import to manage submodules of plugin specs, merge the cond property of the "parent" spec(s) containing an import property with any cond property found on the imported "child" spec(s), including nested import specs. The parent and child cond properties are evaluated and combined with boolean and.

Related Issue(s)

None

Screenshots

N/A

When a spec had an `import` property, the `cond` property was treated
the same as `enabled`; any specs to be imported were ignored and treated
as uninstalled if `cond` evaluated to false. This is inconsistent with
how `cond` behaves in a plugin spec without an `import` property.

To make the behavior consistent when using `import` to manage submodules
of plugin specs, merge the `cond` property of the "parent" spec(s)
containing an `import` property with any `cond` property found on the
imported "child" spec(s), including nested `import` specs. The parent
and child `cond` properties are evaluated and combined with boolean
`and`.

Signed-off-by: Ross Williams <ross@ross-williams.net>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant