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

Resolve compatibility conflicts after multi-host merge #3991

Merged
merged 1 commit into from
Jan 2, 2024

Conversation

HebaruSan
Copy link
Member

Problems

Cause

  • SpaceDock adds a ksp_version / ksp_version_max based on the game version the uploader selects that isn't available on GitHub, so the GitHub branch of the netkan inflates with just ksp_version_min, while the SpaceDock branch has ksp_version, and the two branches are merged just by combining their JSON properties, which creates inconsistent metadata with both ksp_version and ksp_version_min set.
  • NetKAN.Model.Metadata.MergeJson was generating an array regardless of how many download URLs it had. Single-host netkans weren't affected because that function is only called for multi-host.

Changes

  • Now after we merge the properties, NetKAN.Services.ModuleService.ApplyVersions (which is the logic we use elsewhere to combine compatibility from different sources) is used to reconcile these properties. This should make SpaceDock's compatibility carry through to the merged netkan without the need for overrides.
  • Now if a merged module only has one download URL, the download property will be a string rather than an array

I'll remove the overrides from KSP-CKAN/KSP2-NetKAN#125 in a subsequent pull request.

@HebaruSan HebaruSan added Bug Something is not working as intended Easy This is easy to fix Netkan Issues affecting the netkan data labels Jan 2, 2024
@HebaruSan HebaruSan merged commit 507e0dd into KSP-CKAN:master Jan 2, 2024
8 checks passed
@HebaruSan HebaruSan deleted the fix/nk-merge-compat branch January 2, 2024 16:51
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 Easy This is easy to fix Netkan Issues affecting the netkan data
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant