[Freeciv-tickets] [freeciv] #44181: Forbid singlepole setting requirements unless alltemperate is disabled

Back to archive index
OSDN Ticket System norep****@osdn*****
Sun Mar 27 20:46:15 JST 2022


#44181: Forbid singlepole setting requirements unless alltemperate is disabled

  Open Date: 2022-03-25 14:54
Last Update: 2022-03-27 13:46

URL for this Ticket:
    https://osdn.net//projects/freeciv/ticket/44181
RSS feed for this Ticket:
    https://osdn.net/ticket/ticket_rss.php?group_id=12505&tid=44181

---------------------------------------------------------------------

Last Changes/Comment on this Ticket:
2022-03-27 13:46 Updated by: alienvalkyrie

Comment:

S3_1 patch done. I'm not sure I'm happy with it – there is currently no place in the code with access to both rscompat info and whether a given requirement vector is conjunctive (both of which are relevant to this change). One option would've been to pass a bool conjunctive to lookup_req_list(), but that would've added a lot of small changes all over the place ~> higher chance for conflict with other current patches, and future S3_1 patches are less likely to also work for other branches. Given that this is all about (a) an unlikely edge case and (b) something where affected ruleset authors will have to check the result anyway, I used a heuristic instead – if the secfile key is "obsolete_by", we're disjunctive; otherwise, we're probably conjunctive. This matches current rscompat and ruleset load code.
If this heuristic ever fails (in a place where there is a singlepole requirement), it will make rscompat introduce an erroneous requirement and lead to ruleset load failure, which isn't great. The more advanced alternative would be to trust that any existing alltemperate requirement is the one we need (maybe print a warning if we think it should be flipped) and not change anything in those cases.

---------------------------------------------------------------------
Ticket Status:

      Reporter: alienvalkyrie
         Owner: alienvalkyrie
          Type: Bugs
        Status: Open [Owner assigned]
      Priority: 5 - Medium
     MileStone: S3_1 d3f
     Component: Server
      Severity: 5 - Medium
    Resolution: None
---------------------------------------------------------------------

Ticket details:

It is currently possible to have singlepole requirements without also checking that alltemperate is disabled. This is nonsensical, since when alltemperate is in fact enabled, singlepole should not make any difference.
I can see a number of ways to deal with this:
Mark singlepole requirements deprecated unless (a) there is also a negated alltemperate requirement or (b) alltemperate is locked FALSE by the ruleset
As above, but make it a hard ruleset loading failure
Mark all singlepole requirements deprecated
As above, but make it a hard ruleset loading failure
To make #44038 easier / possible at all, this needs to be resolved in S3_1.

-- 
Ticket information of Freeciv project
Freeciv Project is hosted on OSDN

Project URL: https://osdn.net/projects/freeciv/
OSDN: https://osdn.net

URL for this Ticket:
    https://osdn.net/projects/freeciv/ticket/44181
RSS feed for this Ticket:
    https://osdn.net/ticket/ticket_rss.php?group_id=12505&tid=44181



More information about the Freeciv-tickets mailing list
Back to archive index