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

Check compatibility of providing modules #3003

Merged
merged 1 commit into from
Feb 14, 2020

Conversation

HebaruSan
Copy link
Member

@HebaruSan HebaruSan commented Feb 13, 2020

Problem

In a KSP 1.9.0 install with no additional versions marked compatible, 115 modules are shown as compatible, but 21 of them can't be installed due to missing dependencies.

image

image

Cause

SVE-HighResolution has a bit of a crazy history. It currently depends on StockVisualEnhancements, but in versions 1:104–2:1.1.6 it provided StockVisualEnhancements.

The compatibility resolver from #2963 is confused by this. It tries to allow any compatible version of a module to satisfy a dependency, but circular dependencies are treated as tentatively compatible because otherwise they'd be impossible to resolve. This might be OK, except it also uses the provides-index from #2354 to resolve "provides"-based relationships, and that index is compatibility-agnostic; incompatible providing modules are included.

This means current versions of SVE-HighResolution can have their StockVisualEnhancements dependency satisfied by older versions of SVE-HighResolution, which is a circular dependency, so we treat SVE-HighResolution as tentatively compatible, and eventually we treat it as truly compatible.

This allows any module depending on StockVisualEnhancements to be considered compatible. As a bonus, those older SVE-HighResolution versions also provided Scatterer, so mods depending on Scatterer are also marked compatible.

Changes

Now a "provides" relationship will only be obeyed if the providing module is compatible.
We accomplish this by filtering out incompatible providers before running the compatibility checks.

@HebaruSan HebaruSan added Bug Something is not working as intended Core (ckan.dll) Issues affecting the core part of CKAN Pull request Registry Issues affecting the registry Relationships Issues affecting depends, recommends, etc. labels Feb 13, 2020
Copy link
Member

@DasSkelett DasSkelett left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, works fine.

@HebaruSan HebaruSan merged commit c28eef9 into KSP-CKAN:master Feb 14, 2020
@HebaruSan HebaruSan deleted the fix/compat-prov branch February 15, 2020 15:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something is not working as intended Core (ckan.dll) Issues affecting the core part of CKAN Registry Issues affecting the registry Relationships Issues affecting depends, recommends, etc.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants