[Freeciv-tickets] [freeciv] #43972: generate_packets.py: Make output paths for each file optional

Back to archive index
OSDN Ticket System norep****@osdn*****
Thu Feb 24 07:31:59 JST 2022


#43972: generate_packets.py: Make output paths for each file optional

  Open Date: 2022-02-22 15:04
Last Update: 2022-02-23 23:31

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

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

Last Changes/Comment on this Ticket:
2022-02-23 23:31 Updated by: alienvalkyrie

Comment:

Doing this properly is nontrivial. Just making the positional arguments optional would mean it's only possible to omit the later arguments, not the earlier ones. We need to add --name options for each path.
There are two ways we could go about this:
The ugly, complicated, but backwards-compatible way, which is to allow both positional and named arguments; doing this in a way that reliably works, produces understandable help text (without having to manually write it) and understandable error messages will probably be somewhat convoluted.
The quick, clean, but not backwards-compatible way, which is to remove the positional arguments and completely replace them with named arguments; this would also require changing the relevant calls in the build system (meson.build and common/Makefile.am, as far as git grep can tell), and it would break anyone else's custom builds. (Though, given the helpful usage instructions printed by argparse, most people should be able to easily fix their builds.)
(I assume one can tell from my choice of words which one I'd prefer, but to spell it out – unless we desperately need backwards compatibility here, I'd go with the second option.)
There's also the question of whether we'd still allow passing empty strings as an alternative to omitting arguments; IMO that decision should mirror the first one (i.e. keep allowing it only if we choose to maintain backwards compatibility).

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

      Reporter: alienvalkyrie
         Owner: (None)
          Type: Patches
        Status: Open
      Priority: 5 - Medium
     MileStone: 3.2.0
     Component: Bootstrap
      Severity: 5 - Medium
    Resolution: None
---------------------------------------------------------------------

Ticket details:

Part of #43927. Followup to #43971. Sometimes (like current CI meson build) it might be desirable to only write some, not all, of the output files. This should be officially supported by making the respective path arguments optional, rather than by passing empty paths.

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



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