Page 1 of 1

OXP Verifier – does anyone ever use it?

Posted: Sun Sep 09, 2012 10:03 am
by JensAyton
A long time ago, I added the --verify-oxp command line option, which was intended to validate the structure of an OXP. The only part that was ever completed was the shipdata.plist verifier, which was potentially useful but hasn’t been kept up to date at all.

Does anybody ever (attempt to) use it, and if so, how often?

There are basically three options here moving forward: 1) keep a large lump of code in the game that’s hardly ever tested, incomplete and probably doesn’t work properly, 2) remove it completely, or 3) keep the plist schema verifier part and run it on all shipdata.plist entries – and possibly some other plists – every time the game starts (in non-deployment builds).

Re: OXP Verifier – does anyone ever use it?

Posted: Sun Sep 09, 2012 10:13 am
by cim
Ahruman wrote:
Does anybody ever (attempt to) use it, and if so, how often?
Yes. I have a buildscript that packages up OXPs and copies them to my AddOns directory during development; it runs as part of that process. For what little it actually checks, I find it quite useful.

Re: OXP Verifier – does anyone ever use it?

Posted: Sun Sep 09, 2012 10:26 am
by Svengali
I'm using it from time to time too - usually before I'm going to release a new version.
As cim said it is a nice helper, but I wouldn't squeeze a tear if it gets removed.

Re: OXP Verifier – does anyone ever use it?

Posted: Sun Sep 09, 2012 10:27 am
by JensAyton
Come to think of it, there’s a fourth option: make it a stand-alone command line tool (with the generic validation functionality of tests/plistSchemaValidator rolled in). This would get it out of Oolite’s hair, so to speak, and its build time. Since it is used, it’s not much of a priority, but worth considering. (There’s still option 3, of course.)

Re: OXP Verifier – does anyone ever use it?

Posted: Sun Sep 09, 2012 11:26 am
by Thargoid
Yes, use it quite often, and fairly generally before release of each OXP as a final check.

For me the option 4 of a separate tool would make most sense. But also it needs a bit of upgrading as you already noted, as some valid commands/syntaxes get flagged as errors occasionally, and also I think some are missing or still logged as to-do.

Re: OXP Verifier – does anyone ever use it?

Posted: Sun Sep 09, 2012 11:57 am
by JensAyton
Thargoid wrote:
Yes, use it quite often, and fairly generally before release of each OXP as a final check.

For me the option 4 of a separate tool would make most sense. But also it needs a bit of upgrading as you already noted, as some valid commands/syntaxes get flagged as errors occasionally, and also I think some are missing or still logged as to-do.
Regardless of the form it takes, I myself will not be spending much time on upgrading it or expanding it to cover more ground, but reports of cases where it’s actively wrong are welcome.

Re: OXP Verifier – does anyone ever use it?

Posted: Sun Sep 09, 2012 2:33 pm
by Eric Walch
Thargoid wrote:
But also it needs a bit of upgrading as you already noted, as some valid commands/syntaxes get flagged as errors occasionally, and also I think some are missing or still logged as to-do.
I also use it on a regular base. Whenever I found that a correct key if flagged as wrong, I updated trunk with it.

Re: OXP Verifier – does anyone ever use it?

Posted: Sun Sep 09, 2012 2:56 pm
by Thargoid
If I come upon them, I'll let you both know.

From memory I think there are some valid scanclass entries which is flags as errors, but without going and checking a few OXPs I can't be more specific at the moment.

Re: OXP Verifier – does anyone ever use it?

Posted: Sun Sep 09, 2012 11:08 pm
by UK_Eliter
I use it regularly. But here's one false positive that it produces (or at least I am pretty sure it is a false positive):

Code: Select all

00:05:29.484 Checking shipdata.plist
  00:05:29.500 Ship "3G-interstellarTurret2":
    00:05:29.500 ----- WARNING: unknown key "fire_rate".
That report is for this code:

Code: Select all

"3G-interstellarTurret2" =
	{
		like_ship = "3G-interstellarTurret";	
		accuracy = 8;
		fire_rate = 0.3;   // Interval between shots in seconds, for ball_turret subentities. Default: 0.5; minimum: 0.25. 
		laser_color = "redColor";
		weapon_energy = 16;
	};

Re: OXP Verifier – does anyone ever use it?

Posted: Mon Sep 10, 2012 12:21 am
by JensAyton
Fixed in r5313.