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

Enforce spec version requirements for more install properties #3494

Merged

Conversation

HebaruSan
Copy link
Member

@HebaruSan HebaruSan commented Dec 19, 2021

Background

The spec says:

https://github.com/KSP-CKAN/CKAN/blob/master/Spec.md#install

  • filter_regexp : (v1.10) A string, or list of strings, which are treated as case-sensitive C# regular expressions which are matched against the full paths from the installing zip-file. If a file matches the regular expression, it is not installed.
  • include_only : (v1.24) A string, or list of strings, of file parts that should be installed. These are treated as literal things which must match a file name or directory. Examples of this may be Settings.cfg, or Plugin. These are considered case-insensitive.
  • include_only_regexp : (v1.24) A string, or list of strings, which are treated as case-sensitive C# regular expressions which are matched against the full paths from the installing zip-file. If a file matches the regular expression, it is installed.

The version numbers in parentheses are supposed to be the minimum spec_version required to use the given property.

Problem

Currently you can use these properties with any spec_version and Netkan will not complain. This means that a client supporting an old spec version might be presented with metadata that it can't handle (but this is very unlikely to ever be a real problem because there is really only the one client, and versions of it that old won't even run anymore thanks to TLS changes on GitHub).

Changes

Now Netkan's InstallValidator enforces these requirements.

@HebaruSan HebaruSan added Enhancement New features or functionality Easy This is easy to fix Pull request Spec Issues affecting the spec Netkan Issues affecting the netkan data labels Dec 19, 2021
@HebaruSan HebaruSan requested a review from DasSkelett December 19, 2021 18:40
Copy link
Member

@techman83 techman83 left a comment

Choose a reason for hiding this comment

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

This seems sensible to me, a founding principle of the project has been ensuring we produce consistent metadata.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Easy This is easy to fix Enhancement New features or functionality Netkan Issues affecting the netkan data Spec Issues affecting the spec
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants