Skip to content

Ensure that newer versions don't refer to files older than the latest for a particular file type #1085

@extremeheat

Description

@extremeheat

There should be a test to ensure that newer versions don't refer to files older than the latest for a particular file type

Catch problems like #1084 (please check https://patch-diff.githubusercontent.com/raw/PrismarineJS/minecraft-data/pull/1084.patch)

For example,

"pc": {
   "1.5": { "test": "pc/1.5" },
   "1.6": { "test": "pc/1.4" } 
}

should be blocked because a previous pc test used pc/1.5, but 1.6 is for some reason referring to even older data (it should instead be either pc/1.5 or pc/1.6).

Suggested implementation:

  • Make integer out of each path, store in cached map
  • When iterating over new entry, check each data item's current integer is >= last integer
  • Since some versions may reference non-versions (pc/latest), simply skip these entries

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions