[wesnoth-commits] [wesnoth/wesnoth] b5757f: Implement validation of the core game config WML

GitHub noreply at github.com
Wed Mar 28 04:08:01 UTC 2018


  Branch: refs/heads/schema
  Home:   https://github.com/wesnoth/wesnoth
  Commit: b5757f83042d99ee650b15579a63cdc629e0d2e6
      https://github.com/wesnoth/wesnoth/commit/b5757f83042d99ee650b15579a63cdc629e0d2e6
  Author: Celtic Minstrel <celtic.minstrel.ca at some.place>
  Date:   2018-03-18 (Sun, 18 Mar 2018)

  Changed paths:
    R data/schema-gui.cfg
    R data/schema.cfg
    A data/schema/core/actionwml.cfg
    A data/schema/core/addons.cfg
    A data/schema/core/ai.cfg
    A data/schema/core/conditionalwml.cfg
    A data/schema/core/config.cfg
    A data/schema/core/help.cfg
    A data/schema/core/themes.cfg
    A data/schema/editor/groups.cfg
    A data/schema/editor/misc.cfg
    A data/schema/editor/times.cfg
    A data/schema/filters/_initial.cfg
    A data/schema/filters/base_value.cfg
    A data/schema/filters/location.cfg
    A data/schema/filters/side.cfg
    A data/schema/filters/unit.cfg
    A data/schema/filters/weapon.cfg
    A data/schema/game_config.cfg
    A data/schema/macros.cfg
    A data/schema/terrain/graphics.cfg
    A data/schema/terrain/types.cfg
    A data/schema/types/basic.cfg
    A data/schema/types/formula.cfg
    A data/schema/types/lists.cfg
    A data/schema/types/progressive.cfg
    A data/schema/units/_main.cfg
    A data/schema/units/abilities.cfg
    A data/schema/units/animations.cfg
    A data/schema/units/modifications.cfg
    A data/schema/units/movetypes.cfg
    A data/schema/units/races.cfg
    A data/schema/units/single.cfg
    A data/schema/units/specials.cfg
    A data/schema/units/types.cfg
    M src/commandline_options.cpp
    M src/commandline_options.hpp
    M src/config_cache.cpp
    M src/config_cache.hpp
    M src/game_config_manager.cpp
    M src/serialization/schema_validator.cpp
    M src/serialization/schema_validator.hpp
    M src/serialization/tag.cpp
    M src/serialization/tag.hpp

  Log Message:
  -----------
  Implement validation of the core game config WML
Currently this is disabled by default
Use --validate command-line argument to enable

The following new features were added in the schema format:
* Union, intersection, and list types
* Keys can specify a union of known types on-the-fly
* Key and tag names can include wildcards (* and ?, glob-style)
* Tags support any_key=yes, which means unrecognized subtags will be ignored
* Tags and keys support deprecated=yes (unimplemented)
* Specify max=infinite instead of max=-1


  Commit: 59c4ff38e077aeddf46276590ab2018462ad30f9
      https://github.com/wesnoth/wesnoth/commit/59c4ff38e077aeddf46276590ab2018462ad30f9
  Author: Celtic Minstrel <celtic.minstrel.ca at some.place>
  Date:   2018-03-18 (Sun, 18 Mar 2018)

  Changed paths:
    M data/schema/core/addons.cfg

  Log Message:
  -----------
  Address some feedback


  Commit: 9447cc93b038b2e0023e74d560b10cabc9d7c93f
      https://github.com/wesnoth/wesnoth/commit/9447cc93b038b2e0023e74d560b10cabc9d7c93f
  Author: Celtic Minstrel <celtic.minstrel.ca at some.place>
  Date:   2018-03-18 (Sun, 18 Mar 2018)

  Changed paths:
    M data/schema/core/config.cfg
    M data/schema/game_config.cfg
    M data/schema/terrain/graphics.cfg

  Log Message:
  -----------
  Address a few TODO notes


  Commit: ca2b2b1753609cf84db5d9e1d5877a38c0033e51
      https://github.com/wesnoth/wesnoth/commit/ca2b2b1753609cf84db5d9e1d5877a38c0033e51
  Author: Celtic Minstrel <celtic.minstrel.ca at some.place>
  Date:   2018-03-18 (Sun, 18 Mar 2018)

  Changed paths:
    R data/gui/schema.cfg
    A data/schema/gui.cfg
    M src/gui/gui.cpp

  Log Message:
  -----------
  Move GUI2 schema into the schema directory


  Commit: 69d1c61687407e7c9daf483c77722b2ad5d5e41f
      https://github.com/wesnoth/wesnoth/commit/69d1c61687407e7c9daf483c77722b2ad5d5e41f
  Author: Celtic Minstrel <celtic.minstrel.ca at some.place>
  Date:   2018-03-18 (Sun, 18 Mar 2018)

  Changed paths:
    M data/schema/game_config.cfg
    M data/schema/gui.cfg
    M data/schema/types/basic.cfg
    M data/schema/types/formula.cfg
    M src/serialization/tag.cpp

  Log Message:
  -----------
  Get game config and schema to use some common types

This also fixes an invalid type issue in the GUI2 schema,
and allows types to be a direct alias for other types.


  Commit: 9201904e83442ae2267c690f8d97d9f800734ceb
      https://github.com/wesnoth/wesnoth/commit/9201904e83442ae2267c690f8d97d9f800734ceb
  Author: Celtic Minstrel <celtic.minstrel.ca at some.place>
  Date:   2018-03-18 (Sun, 18 Mar 2018)

  Changed paths:
    M data/schema/gui.cfg
    M src/serialization/schema_validator.cpp
    M src/serialization/schema_validator.hpp
    M src/serialization/tag.cpp
    M src/serialization/tag.hpp

  Log Message:
  -----------
  Enable nesting of [type] tags
Minor cleanup of GUI2 type definitions
Disallow stuff like border=top,all


  Commit: 8f8f00fa472e0bfe734ce3451d853a6e95b86922
      https://github.com/wesnoth/wesnoth/commit/8f8f00fa472e0bfe734ce3451d853a6e95b86922
  Author: Celtic Minstrel <celtic.minstrel.ca at some.place>
  Date:   2018-03-18 (Sun, 18 Mar 2018)

  Changed paths:
    M src/serialization/tag.hpp

  Log Message:
  -----------
  Super-rudimentary documentation...


  Commit: 1e88ebd663b6614be1284ee7b0014c1b4216ced3
      https://github.com/wesnoth/wesnoth/commit/1e88ebd663b6614be1284ee7b0014c1b4216ced3
  Author: Celtic Minstrel <celtic.minstrel.ca at some.place>
  Date:   2018-03-18 (Sun, 18 Mar 2018)

  Changed paths:
    M data/schema/game_config.cfg
    M data/schema/units/animations.cfg
    M data/schema/units/modifications.cfg
    M src/serialization/parser.cpp
    M src/serialization/schema_validator.cpp
    M src/serialization/schema_validator.hpp
    M src/serialization/tag.cpp
    M src/serialization/tag.hpp
    M src/serialization/validator.hpp

  Log Message:
  -----------
  Support [switch] and [if] in [tag]

Use this new feature to validate [effect] tags


  Commit: 649c1a57ea939d7b9201e1f36c3bbb42795252c0
      https://github.com/wesnoth/wesnoth/commit/649c1a57ea939d7b9201e1f36c3bbb42795252c0
  Author: Celtic Minstrel <celtic.minstrel.ca at some.place>
  Date:   2018-03-18 (Sun, 18 Mar 2018)

  Changed paths:
    M src/serialization/tag.cpp
    M src/serialization/tag.hpp

  Log Message:
  -----------
  Fix crash if a tag has conditions but no subtags


  Commit: 37e766fa9dbe054124dadcd3d898136e32b60e5a
      https://github.com/wesnoth/wesnoth/commit/37e766fa9dbe054124dadcd3d898136e32b60e5a
  Author: Celtic Minstrel <celtic.minstrel.ca at some.place>
  Date:   2018-03-18 (Sun, 18 Mar 2018)

  Changed paths:
    M data/schema/units/modifications.cfg

  Log Message:
  -----------
  fixup! Support [switch] and [if] in [tag]


  Commit: 51902b66fc54ee506f39016bfdad1a5e198efb17
      https://github.com/wesnoth/wesnoth/commit/51902b66fc54ee506f39016bfdad1a5e198efb17
  Author: Celtic Minstrel <celtic.minstrel.ca at some.place>
  Date:   2018-03-18 (Sun, 18 Mar 2018)

  Changed paths:
    M data/schema/core/addons.cfg
    M data/schema/units/modifications.cfg
    M src/serialization/tag.cpp
    M src/serialization/tag.hpp

  Log Message:
  -----------
  Support multiple super tags and even conditional super tags

Use this to conditionally import [unit] keys in [side] based on no_leader


  Commit: 2a0018209b97cfa9b40ac51f68cd2fd2f1805d52
      https://github.com/wesnoth/wesnoth/commit/2a0018209b97cfa9b40ac51f68cd2fd2f1805d52
  Author: Celtic Minstrel <celtic.minstrel.ca at some.place>
  Date:   2018-03-18 (Sun, 18 Mar 2018)

  Changed paths:
    M data/schema/units/specials.cfg

  Log Message:
  -----------
  Missed a couple weapon special definitions


  Commit: f5937a83c55beeca46e35e530ac005cb2314e250
      https://github.com/wesnoth/wesnoth/commit/f5937a83c55beeca46e35e530ac005cb2314e250
  Author: Celtic Minstrel <celtic.minstrel.ca at some.place>
  Date:   2018-03-18 (Sun, 18 Mar 2018)

  Changed paths:
    M data/schema/core/addons.cfg

  Log Message:
  -----------
  Use a few more conditional tag elements


  Commit: 955a4b85ab8335f344b9416538f4ad5f82f824fb
      https://github.com/wesnoth/wesnoth/commit/955a4b85ab8335f344b9416538f4ad5f82f824fb
  Author: Celtic Minstrel <celtic.minstrel.ca at some.place>
  Date:   2018-03-18 (Sun, 18 Mar 2018)

  Changed paths:
    M data/schema/game_config.cfg
    M src/serialization/tag.cpp

  Log Message:
  -----------
  Fix matching of list types with limits


  Commit: 7e6705fa295fb268bc066a37f88cc60f1cca3930
      https://github.com/wesnoth/wesnoth/commit/7e6705fa295fb268bc066a37f88cc60f1cca3930
  Author: Celtic Minstrel <celtic.minstrel.ca at some.place>
  Date:   2018-03-27 (Tue, 27 Mar 2018)

  Changed paths:
    M data/schema/units/modifications.cfg
    M src/serialization/tag.cpp

  Log Message:
  -----------
  Schema: Accept [elseif] in [if] and change [switch][default] to [else]


  Commit: c4308420b1a51177906c24bc472a870caebaeab1
      https://github.com/wesnoth/wesnoth/commit/c4308420b1a51177906c24bc472a870caebaeab1
  Author: Celtic Minstrel <celtic.minstrel.ca at some.place>
  Date:   2018-03-28 (Wed, 28 Mar 2018)

  Changed paths:
    A data/schema/ai/_main.cfg
    A data/schema/ai/aspect_complex.cfg
    A data/schema/ai/aspect_simple.cfg
    A data/schema/ai/engine.cfg
    A data/schema/ai/goal.cfg
    A data/schema/ai/recruitment.cfg
    A data/schema/ai/stage.cfg
    M data/schema/core/addons.cfg
    R data/schema/core/ai.cfg
    M data/schema/game_config.cfg

  Log Message:
  -----------
  WIP Schema for the AI WML

Pretty much all working, except for the [aspect] tag
Also, [modify_ai] is not yet specified (needs new schema features)


Compare: https://github.com/wesnoth/wesnoth/compare/864610d54d16...c4308420b1a5


More information about the Commits mailing list