[Freeciv-tickets] [freeciv] #44750: generate_packets.py: erroneous output when some (but not all) variants of a packet have no fields

Back to archive index
OSDN Ticket System norep****@osdn*****
Tue Jun 7 05:03:11 JST 2022


#44750: generate_packets.py: erroneous output when some (but not all) variants of a packet have no fields

  Open Date: 2022-06-03 23:12
Last Update: 2022-06-06 22:03

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

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

Last Changes/Comment on this Ticket:
2022-06-06 22:03 Updated by: alienvalkyrie
 * Owner Update from (None) to alienvalkyrie
 * Resolution Update from None to Accepted

Comment:

I've gone with the option of explicitly unsupporting this edge case, since again – if it ever actually happens in practice, that's almost certainly an accident.

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

      Reporter: alienvalkyrie
         Owner: alienvalkyrie
          Type: Bugs
        Status: Open [Owner assigned]
      Priority: 5 - Medium
     MileStone: (None)
     Component: Bootstrap
      Severity: 5 - Medium
    Resolution: Accepted
---------------------------------------------------------------------

Ticket details:

Packets with no fields are handled differently from packets with fields. Some code in generate_packets.py only looks at a variant's fields to determine whether this is the case, so if a packet has fields, but one of its variants does not, that causes problems. This happens when all fields of a packet are add-cap or remove-cap, and no capability is used for both.
As far as I can tell, if this ever occurs in practice, the resulting code will not compile, so it won't result in sneaky issues that remain undetected and actually get committed.

-- 
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/44750
RSS feed for this Ticket:
    https://osdn.net/ticket/ticket_rss.php?group_id=12505&tid=44750



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