DaemonEngine / Urcheon

An asset builder and package manager for Dæmon based games
https://unvanquished.net
ISC License
12 stars 1 forks source link

Regression in argument parsing with `--version-suffix '~n'` #58

Open necessarily-equal opened 1 year ago

necessarily-equal commented 1 year ago

Since a few weeks ago, Nightly is broken. The command below used to work, but now gives a help message saying… that I should do the exact same thing as I did?

$ urcheon package --version-suffix '~n' src/map-antares_src.dpkdir src/map-chasm_src.dpkdir src/map-forlorn_src.dpkdir src/map-parpax_src.dpkdir src/map-perseus_src.dpkdir src/map-plat23_src.dpkdir src/map-spacetracks_src.dpkdir src/map-station15_src.dpkdir src/map-thunder_src.dpkdir src/map-vega_src.dpkdir src/map-yocto_src.dpkdir src/res-ambient_src.dpkdir src/res-buildables_src.dpkdir src/res-legacy_src.dpkdir src/res-players_src.dpkdir src/res-soundtrack_src.dpkdir src/res-voices_src.dpkdir src/res-weapons_src.dpkdir src/tex-all_src.dpkdir src/tex-common_src.dpkdir src/tex-ej01_src.dpkdir src/tex-ex_src.dpkdir src/tex-exm_src.dpkdir src/tex-pk01_src.dpkdir src/tex-pk02_src.dpkdir src/tex-space_src.dpkdir src/tex-tech_src.dpkdir src/tex-trak5_src.dpkdir src/tex-vega_src.dpkdir
usage: urcheon [-h] [-D] [-v] [-l] [-g GAMENAME] [--build-prefix DIRNAME] [--test-prefix DIRNAME] [--pak-prefix DIRNAME] [--test-dir DIRNAME] [--pak-file FILENAME]
               [--version-suffix STRING] [-np]
               {discover,prepare,build,package,clean} ...
urcheon: error: unrecognized arguments: --version-suffix
illwieckz commented 1 year ago

Try:

urcheon --version-suffix '~n' package src/map-antares_src.dpkdir src/map-chasm_src.dpkdir src/map-forlorn_src.dpkdir src/map-parpax_src.dpkdir src/map-perseus_src.dpkdir src/map-plat23_src.dpkdir src/map-spacetracks_src.dpkdir src/map-station15_src.dpkdir src/map-thunder_src.dpkdir src/map-vega_src.dpkdir src/map-yocto_src.dpkdir src/res-ambient_src.dpkdir src/res-buildables_src.dpkdir src/res-legacy_src.dpkdir src/res-players_src.dpkdir src/res-soundtrack_src.dpkdir src/res-voices_src.dpkdir src/res-weapons_src.dpkdir src/tex-all_src.dpkdir src/tex-common_src.dpkdir src/tex-ej01_src.dpkdir src/tex-ex_src.dpkdir src/tex-exm_src.dpkdir src/tex-pk01_src.dpkdir src/tex-pk02_src.dpkdir src/tex-space_src.dpkdir src/tex-tech_src.dpkdir src/tex-trak5_src.dpkdir src/tex-vega_src.dpkdir
illwieckz commented 1 year ago

This is related to:

The implementation changed a bit. Global options are now expected to be set before the command. Now we can discuss if it's a global option or not…

necessarily-equal commented 1 year ago

It huh, somehow doesn't look like a global option as I get the impression it's only used for urcheon package.

necessarily-equal commented 1 year ago

So swapping the arguments worked, nightly is now fixed. Thanks!

I've had the exact same issue with --pak-prefix (urcheon: error: unrecognized arguments: --pak-prefix). This is also maybe not so nice as a global option.

I'd say urcheon probably should understand what the user means anyway, instead of having some pedantic behavior that could lead people to think the argument parser is simply broken.