Discussion:
[Freeciv-Dev] [bug #24546] ruleset table syntax
Frank
2016-03-31 06:43:08 UTC
Permalink
URL:
<http://gna.org/bugs/?24546>

Summary: ruleset table syntax
Project: Freeciv
Submitted by: dunnoob
Submitted on: Thu 31 Mar 2016 06:43:07 AM UTC
Category: rulesets
Severity: 3 - Normal
Priority: 5 - Normal
Status: None
Assigned to: None
Originator Email:
Open/Closed: Open
Release: 2.6
Discussion Lock: Any
Operating System: None
Planned Release:

_______________________________________________________

Details:

In a buildings.ruleset for 2.5 I had lots of...

obsolete_by = "None"

...lines. For 2.6 I changed these lines to...

obsolete_by = { "type", "name", "range" } ; same as 2.5 "None"

...but it didn't work as expected (trimmed error message):

Expected end of line file ".../.freeciv/test/dunnoob/buildings.ruleset", line
84, pos 43
looking at: ' } ; same as 2.5 "None"'

Apparently the '}' cannot be on the same line as the '{'. A case of
https://en.wikipedia.org/wiki/Principle_of_least_astonishment - is it a bug,
an undocumented feature, or only me? I'll try to find another solution for
"None" in one line, two lines certainly work. :-P




_______________________________________________________

Reply to this item at:

<http://gna.org/bugs/?24546>

_______________________________________________
Message sent via/by Gna!
http://gna.org/
Marko Lindqvist
2016-04-02 08:55:03 UTC
Permalink
Follow-up Comment #1, bug #24546 (project freeciv):

If you want to make completely empty table visible in human-readable way, make
its header comment:

; obsolete_by = { "type", "name", "range" }


_______________________________________________________

Reply to this item at:

<http://gna.org/bugs/?24546>

_______________________________________________
Message sent via/by Gna!
http://gna.org/
Marko Lindqvist
2016-04-02 08:57:43 UTC
Permalink
Update of bug #24546 (project freeciv):

Category: rulesets => general
Planned Release: => 3.0.0

_______________________________________________________

Follow-up Comment #2:

The freeciv problem to fix here is that at least one value is expected when
table name has been seen.
Anyway, this is low-level datafile format change and S2_6 formats have been
frozen -> setting target to 3.0.0

_______________________________________________________

Reply to this item at:

<http://gna.org/bugs/?24546>

_______________________________________________
Message sent via/by Gna!
http://gna.org/
Frank
2016-04-12 08:52:12 UTC
Permalink
Follow-up Comment #3, bug #24546 (project freeciv):

Yes, eventually I arrived at "just delete the stupid lines". Related, values
of type list as in foo = x, y, z apparently have no empty list value, only ;
foo = (comment out or delete line) works.

For some graphics in 2.6 "none" is not the same as "-", and commenting out or
deleting those boring "-" lines triggers a hard "cannot load ruleset" error.
Maybe "-" should be the default for this.

_______________________________________________________

Reply to this item at:

<http://gna.org/bugs/?24546>

_______________________________________________
Message sent via/by Gna!
http://gna.org/
Marko Lindqvist
2017-05-03 05:43:36 UTC
Permalink
Update of bug #24546 (project freeciv):

Status: None => Duplicate
Assigned to: None => cazfi
Open/Closed: Open => Closed

_______________________________________________________

Follow-up Comment #4:

Handled at hostedredmine: https://www.hostedredmine.com/issues/657136

_______________________________________________________

Reply to this item at:

<http://gna.org/bugs/?24546>

_______________________________________________
Message sent via/by Gna!
http://gna.org/

Loading...