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

Treat installed DLC as compatible dependency #2424

Merged
merged 1 commit into from
Apr 25, 2018

Conversation

HebaruSan
Copy link
Member

@HebaruSan HebaruSan commented Apr 24, 2018

Problem

Modules that depend on MakingHistory-DLC are treated as incompatible in mod listings, even if you have the DLC.

You are still able to install such modules via CmdLine, even though they are displayed as incompatible.

Relatedly, the MakingHistory-DLC entry in the relationships tab always shows up as red and "(not indexed").

image

Cause

DLC checks were only added to functions that check whether an identifier is installed. To determine whether a module is compatible, we look up all of its dependencies via LatestAvailableWithProvides regardless of whether they're already installed, which returns a module, and there are no modules for Dlc objects, so this function doesn't find anything for MakingHistory-DLC.

The relationships tab in GUI also checks dependencies itself, and also wasn't updated.

Changes

Now the helper function that checks dependencies treats installed DLC identifiers as compatible.

The relationships tab also now checks for installed DLC and shows it as compatible if it's installed.

image

Fixes https://forum.kerbalspaceprogram.com/index.php?/topic/154922-ckan-the-comprehensive-kerbal-archive-network-v1250-wallops/&do=findComment&comment=3362539

Tests are added:

  • When no DLC is installed, make sure we consider a mod depending on MakingHistory-DLC as incompatible
  • When MakingHistory-DLC is installed, make sure we consider a mod depending on MakingHistory-DLC as compatible
  • When MakingHistory-DLC 1.1.0 is installed, make sure we consider a mod depending on MakingHistory-DLC 1.1.0 as compatible
  • When MakingHistory-DLC 1.0.0 is installed, make sure we consider a mod depending on MakingHistory-DLC 1.1.0 as incompatible

@HebaruSan HebaruSan added Pull request Bug Something is not working as intended Registry Issues affecting the registry In progress We're still working on this and removed Pull request labels Apr 24, 2018
@HebaruSan HebaruSan force-pushed the fix/dlc-depends-avail branch from b85b539 to 0fd9586 Compare April 24, 2018 18:32
@HebaruSan HebaruSan added GUI Issues affecting the interactive GUI In progress We're still working on this and removed In progress We're still working on this labels Apr 24, 2018
@HebaruSan HebaruSan force-pushed the fix/dlc-depends-avail branch from 0fd9586 to bff4a67 Compare April 24, 2018 18:35
@HebaruSan HebaruSan removed the In progress We're still working on this label Apr 24, 2018
@HebaruSan HebaruSan force-pushed the fix/dlc-depends-avail branch from bff4a67 to d0e8249 Compare April 24, 2018 20:08
@HebaruSan HebaruSan added the Tests Issues affecting the internal tests label Apr 24, 2018
@politas
Copy link
Member

politas commented Apr 25, 2018

Sounds like a good candidate for a 1.25.1 release.

@politas politas merged commit d0e8249 into KSP-CKAN:master Apr 25, 2018
@politas politas removed Bug Something is not working as intended Pull request labels Apr 25, 2018
@HebaruSan HebaruSan deleted the fix/dlc-depends-avail branch April 25, 2018 16:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
GUI Issues affecting the interactive GUI Registry Issues affecting the registry Tests Issues affecting the internal tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants