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

Prompt for client upgrade when newer spec is found #4026

Merged
merged 1 commit into from
Feb 14, 2024

Conversation

HebaruSan
Copy link
Member

Motivation

  • The CkanModule.spec_version property allows us to handle backwards incompatible changes to metadata; if it is greater than your client version for a module, then that module is hidden. When this happens, it is not apparent to the user, and users sometimes ask us or mod authors why a mod version is missing.
  • If you configure CKAN to check for automated updates, you'll see the popup that shows the changelog, but if you update only via the button in the settings, you never get to see the changelog

Changes

  • Now if you update your repositories and they contain one or more modules with an unsupported spec version, we print a message along those lines to the log, check for a client update, and prompt the user to update if one is found:
    image
  • Now that popup opens centered on the main window instead of centered on the screen
  • Now if you click to install an update from the settings window, that popup appears first so you can see the changelog
  • While working on this, I found that CkanModule.IsSpecSupported retrieves the version from the executing assembly and parses it every single time, which is probably a small amount of wasted work, but might add up over a thousand-plus modules. This is now replaced by a public static variable that's only parsed once.

Fixes #3994.

@HebaruSan HebaruSan added Enhancement New features or functionality GUI Issues affecting the interactive GUI Core (ckan.dll) Issues affecting the core part of CKAN Metadata AutoUpdate Issues affecting the automatic updating labels Feb 14, 2024
@HebaruSan HebaruSan merged commit 6c5bf1f into KSP-CKAN:master Feb 14, 2024
8 checks passed
@HebaruSan HebaruSan deleted the feature/unsup-spec-notif branch February 14, 2024 16:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
AutoUpdate Issues affecting the automatic updating Core (ckan.dll) Issues affecting the core part of CKAN Enhancement New features or functionality GUI Issues affecting the interactive GUI
Projects
None yet
1 participant