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

Let dev builds use future spec versions #4266

Merged
merged 1 commit into from
Nov 26, 2024

Conversation

HebaruSan
Copy link
Member

@HebaruSan HebaruSan commented Nov 26, 2024

Background

The spec_version metadata property defines the earliest version of the CKAN client that can properly handle a given module. As of #4155 it is populated programmatically based on analysis of the fields that are present or absent in a module. The CKAN client ignores modules with "future" spec versions indicating that it can't handle them properly.

When we add a new feature, it goes into the dev build immediately. So at any stage of development, all of the next release's functionality is already present in the dev build. But dev builds have a version that corresponds to the same spec version as the current release (but with an odd patch version), so they'll ignore modules with higher spec versions that they can in fact handle properly.

Motivation

#4260 updated the spec version analyzer to use v1.36 for modules with release_status set to something other than stable, to hide them from old clients. This has also hidden them from the dev build, which means it cannot be used for piloting the pre-release functionality from that PR. This defeats the purpose of having dev builds with respect to such changes.

Changes

  • Now Meta.SpecVersion is a static readonly field that represents the next highest minor version for dev builds and is the same as Meta.ReleaseVersion otherwise (thanks to regex magic)
  • Now CkanModule.IsSpecSupported compares modules' spec versions to Meta.SpecVersion instead of Meta.ReleaseVersion
  • Now Meta.GetProductName() is replaced by a static readonly field Meta.ProductName so we don't have to keep recalculating its value with reflection
  • Now Meta.IsNetKAN is a static readonly field so we don't have to keep recalculating its value with reflection

@HebaruSan HebaruSan added Enhancement New features or functionality Easy This is easy to fix Core (ckan.dll) Issues affecting the core part of CKAN labels Nov 26, 2024
@HebaruSan HebaruSan force-pushed the feature/dev-build-spec-version branch from 2c26ec9 to 4881021 Compare November 26, 2024 19:49
@HebaruSan HebaruSan merged commit fd1a50c into KSP-CKAN:master Nov 26, 2024
3 checks passed
@HebaruSan HebaruSan deleted the feature/dev-build-spec-version branch November 26, 2024 19:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Core (ckan.dll) Issues affecting the core part of CKAN Easy This is easy to fix Enhancement New features or functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant