Opened 10 years ago

Closed 10 years ago

Last modified 9 years ago

#290 closed task (released)

Migrate to using key/keyref definitions instead of ID/IDREF type

Reported by: ibboard Owned by: ibboard
Priority: major Milestone: WarFoundry 0.1
Component: WarFoundry-API Version: Trunk
Keywords: schema key keyref id validation Cc:
Blocked By: #274 Blocking:

Description

Bug #274 was the first report of an ID/IDREF causing problems because we assumed that they validated the code, but they didn't. We should move all IDs and IDREFs to <key> and <keyref> definitions instead.

Change History (26)

comment:1 Changed 10 years ago by ibboard

Owner: set to ibboard
Status: newaccepted

comment:2 Changed 10 years ago by ibboard

(In r590) Re #274: Crash when missing unit member ID

  • Add key and keyref for member type

Re #290: Migrate to using key/keyref definitions instead of ID/IDREF type

  • Move keyref and key for equipment slot to correct place to be valid
  • Add aliased xmlns for schema to allow for use in XPath, which doesn't use default namespace
  • Disable warning reporting until Mono Bug 613684 is fixed (https://bugzilla.novell.com/show_bug.cgi?id=613684)

comment:3 Changed 10 years ago by ibboard

(In r591) Re #274: Crash when missing unit member ID

  • Add more specific tests for key and keyref for member type
  • Remove ExpectedException with unknown message

Re #290: Migrate to using key/keyref definitions instead of ID/IDREF type

  • Add explanation of why tests aren't as perfect as they could be

comment:4 Changed 10 years ago by ibboard

(In r593) Re #290: Migrate to using key/keyref definitions instead of ID/IDREF type

  • Remove unused keyrefs
  • Make ability uses key/keyref instead of ID/IDREF

comment:5 Changed 10 years ago by ibboard

(In r594) Re #290: Migrate to using key/keyref definitions instead of ID/IDREF type

  • Simplify "non-existant ability" unit test by removing SystemX file
  • Remove line number checks, since Mono exception line numbers are end of file when the exception is a missing key
  • Re-implement equipment slot check test

previous line numbers were taken from errors saying that keyref's key definition couldn't be found, not an error saying that the keyref value didn't exist

comment:6 Changed 10 years ago by ibboard

(In r596) Re #290: Migrate to using key/keyref definitions instead of ID/IDREF type

  • Migrate unit equipment item references to key/keyref

comment:7 Changed 10 years ago by ibboard

(In r597) Re #290: Migrate to using key/keyref definitions instead of ID/IDREF type

  • Migrate unit containership to key/keyref

comment:8 Changed 10 years ago by ibboard

(In r598) Re #290: Migrate to using key/keyref definitions instead of ID/IDREF type

  • Add unit tests and data for unit containership
  • Add unit test and data for unit equipment
  • Correct name of test data for equipment slot unit test

comment:9 Changed 10 years ago by ibboard

Also need to remember to add some unit tests for valid situations to make sure that valid data is not marked as invalid!

comment:10 Changed 10 years ago by ibboard

(In r600) Re #290: Migrate to using key/keyref definitions instead of ID/IDREF type

  • Make extraData use local keys instead of global IDs
  • Change army to using a string, since we don't care what it is

Also:

  • Implement loading of extra data so we can test it is loaded

comment:11 Changed 10 years ago by ibboard

(In r601) Re #290: Migrate to using key/keyref definitions instead of ID/IDREF type

  • Add tests and test data for extra data keys

comment:12 Changed 10 years ago by ibboard

(In r602) Re #290: Migrate to using key/keyref definitions instead of ID/IDREF type

  • Change extra data's ID to string from ID

comment:13 Changed 10 years ago by ibboard

Race now appears to be completely migrated - just need more tests to check for correct handling of valid data as well as invalid data.

comment:14 Changed 10 years ago by ibboard

(In r603) Re #290: Migrate to using key/keyref definitions instead of ID/IDREF type

  • Fix ability description loading by adding namespace alias
  • Make use of utility method to help

comment:15 Changed 10 years ago by ibboard

(In r604) Re #290: Migrate to using key/keyref definitions instead of ID/IDREF type

  • Add test for ability loading and validation when the ability exists
  • Move old test data for non-existant ability into sub-folder

comment:16 Changed 10 years ago by ibboard

(In r605) Re #290: Migrate to using key/keyref definitions instead of ID/IDREF type

  • Test duplicate member type keys
  • Test valid case of member type key with reference
  • Move existing "non-existant member type" data to sub-folder and rename

comment:17 Changed 10 years ago by ibboard

(In r606) Re #290: Migrate to using key/keyref definitions instead of ID/IDREF type

  • Move invalid equipment slot data file to sub-folder
  • Add test for valid equipment slot (currently null-refs and fails)

comment:18 Changed 10 years ago by ibboard

(In r607) Re #290: Migrate to using key/keyref definitions instead of ID/IDREF type

  • Fix broken unit test by correcting IDs - unit equipment has composite ID of unit type and equipment ID and unit type has ID Empire1

comment:19 Changed 10 years ago by ibboard

(In r610) Re #290: Migrate to using key/keyref definitions instead of ID/IDREF type

  • Move some test data files to sub-folder
  • Test duplicate ID validation failures for equipment slots and equipment IDs
  • Test valid equipment references

comment:20 Changed 10 years ago by ibboard

(In r611) Re #290: Migrate to using key/keyref definitions instead of ID/IDREF type

  • Add first system factory tests for stats sets

comment:21 Changed 10 years ago by ibboard

(In r612) Re #290: Migrate to using key/keyref definitions instead of ID/IDREF type

  • Migrate to using keys and keyrefs for default stats sets

Also:

  • Make sure that getting the default ID fully loads the file

comment:22 Changed 10 years ago by ibboard

(In r613) Re #290: Migrate to using key/keyref definitions instead of ID/IDREF type

  • Add test for invalid default stats ID

comment:23 Changed 10 years ago by ibboard

(In r614) Re #290: Migrate to using key/keyref definitions instead of ID/IDREF type

  • Migrate army containership to key/keyref

comment:24 Changed 10 years ago by ibboard

(In r615) Re #290: Migrate to using key/keyref definitions instead of ID/IDREF type

  • Validate loading of different key/keyref options in army file

This may be all of it, but needs checking

comment:25 Changed 10 years ago by ibboard

Resolution: fixed
Status: acceptedclosed

(In r616) Fixes #290: Migrate to using key/keyref definitions instead of ID/IDREF type

  • Add test for duplicate stats set IDs

That seems to be all of them!

comment:26 Changed 9 years ago by ibboard

Resolution: fixedreleased

Retro-actively tag RC1 releases as released

Note: See TracTickets for help on using tickets.