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

AnyResContinued has max version set automatically because it's on SpaceDock #7697

Closed
linuxgurugamer opened this issue Feb 14, 2020 · 9 comments

Comments

@linuxgurugamer
Copy link
Contributor

This happens on a lot of mods, but here is one case:

AnyRes, the KSP_VERSION_MIn is 1.8.0.
CKAN allows it to be installed

When launching game, I get a warning:
image

@HebaruSan
Copy link
Member

No, it's not just the min that's set; this module is compatible only with 1.8.0:

https://github.com/KSP-CKAN/CKAN-meta/blob/ca0103d6ad2040cbc7c93bcc904892d32b8f176f/AnyResContinued/AnyResContinued-2.0.3.3.ckan#L8

    "ksp_version": "1.8.0",

Presumably this is yet another repeat of #7166, the fact that SpaceDock doesn't do unbounded ranges. Solution is the same:

If you want an open-ended version range defined completely by the AVC file, then a host that requires selection of the compatible game version is not for you. GitHub is a better fit.

@HebaruSan HebaruSan transferred this issue from KSP-CKAN/CKAN Feb 14, 2020
@HebaruSan HebaruSan changed the title [Bug] Mod with min version set to 1.8.0 getting incompatible warning AnyResContinued has max version set automatically because it's on SpaceDock Feb 14, 2020
@linuxgurugamer
Copy link
Contributor Author

linuxgurugamer commented Feb 22, 2020

Why doesn’t the ckan bot respect the .version file? This seems like a big bug, and your solution will require that I update ALL of my mods to use github. This is not ideal, since the advantage of Spacedock is that when updating a mod there, the indexing gets updated almost immediately, while github has a significant delay.
To me, it seems that a .version file should override the Spacedock setting specifically because of the limitation of the website

@linuxgurugamer
Copy link
Contributor Author

I just reviewed #7166 and while I still think its bad logic, I will have to spend several hours updating all of my .netkan files.
This is a real problem because I depend on several values being read from the Spacedock settings.

@HebaruSan
Copy link
Member

In how many cases is an unbounded range actually appropriate? Didn't you have a bunch of mods for 1.7 that broke with 1.8's Unity upgrade?

@HebaruSan
Copy link
Member

The forum thread implies that this mod is one of them:

image

@HebaruSan
Copy link
Member

Historical side note, the current behavior is from KSP-CKAN/CKAN#1299 (4.5 years ago)

@linuxgurugamer
Copy link
Contributor Author

In how many cases is an unbounded range actually appropriate? Didn't you have a bunch of mods for 1.7 that broke with 1.8's Unity upgrade?

Yes, but I have accepted the fact that I don't have time to rebuild all mods every release. It's only a real problem with the engine upgrade, 1.8 to 1.9 is no problem

@HebaruSan
Copy link
Member

Just curious, are you aware that you can use remote version files to update compatibility after a release, without having to rebuild anything? That might be the best solution here.

Example: I do this with Astrogator. If you download v0.10.0, it contains this version file indicating compatibility only with KSP 1.8:

{
	"NAME": "Astrogator",
	"URL": "https://raw.githubusercontent.com/HebaruSan/Astrogator/master/Astrogator.version",
	"DOWNLOAD" : "https://github.com/HebaruSan/Astrogator/releases",
	"GITHUB": {
		"USERNAME": "HebaruSan",
		"REPOSITORY": "Astrogator",
		"ALLOW_PRE_RELEASE": false
	},
	"VERSION": {
		"MAJOR": 0,
		"MINOR": 10,
		"PATCH": 0
	},
	"KSP_VERSION_MIN": {
		"MAJOR": 1,
		"MINOR": 8
	},
	"KSP_VERSION_MAX": {
		"MAJOR": 1,
		"MINOR": 8
	}
}

The "URL" property points here, which contains an updated copy of the file with KSP_VERSION_MAX.MINOR changed from 8 to 9:

https://raw.githubusercontent.com/HebaruSan/Astrogator/master/Astrogator.version

{
	"NAME": "Astrogator",
	"URL": "https://raw.githubusercontent.com/HebaruSan/Astrogator/master/Astrogator.version",
	"DOWNLOAD" : "https://github.com/HebaruSan/Astrogator/releases",
	"GITHUB": {
		"USERNAME": "HebaruSan",
		"REPOSITORY": "Astrogator",
		"ALLOW_PRE_RELEASE": false
	},
	"VERSION": {
		"MAJOR": 0,
		"MINOR": 10,
		"PATCH": 0
	},
	"KSP_VERSION_MIN": {
		"MAJOR": 1,
		"MINOR": 8
	},
	"KSP_VERSION_MAX": {
		"MAJOR": 1,
		"MINOR": 9
	}
}

Netkan reflects that update (as does KSP-AVC):

https://github.com/KSP-CKAN/CKAN-meta/blob/97b275ff21e4d42225557e5677f97b4ca2e71fe4/Astrogator/Astrogator-v0.10.0.ckan#L10-L11

    "ksp_version_min": "1.8",
    "ksp_version_max": "1.9",

If a mod released for a previous version of KSP turns out to be compatible with a newer version, this is a very convenient way to handle that.

@HebaruSan
Copy link
Member

After #7729 and KSP-CKAN/CKAN-meta@0a8e6fc this module now has no upper limit to its compatibility. The complaint here is resolved (even though this will probably come back to bite us when people install this plugin on a future KSP version with which it will be incompatible).

andrew-vant pushed a commit to andrew-vant/dragnav that referenced this issue Jul 4, 2022
Apparently, if ksp_max_version is omitted from the packaged .version
file, and the mod is hosted on Spacedock, ckan uses the Spacedock
version. And Spacedock has no way to leave the max version open.

So I have no choice but to specify a (bogus) max version in the .version
file.  1.12.x is supposedly the last release version of KSP, so this
*shouldn't* break in future, but it still makes me react with fear and
loathing.

References:

* KSP-CKAN/NetKAN#7166
* KSP-CKAN/NetKAN#7697
* KSP-CKAN/NetKAN#8333
* KSP-CKAN/NetKAN#7729
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants