Skip to content

Fix C++ CLI for .type_various()#3067

Closed
Lestropie wants to merge 1 commit intodevfrom
cmdline_type_various_fix
Closed

Fix C++ CLI for .type_various()#3067
Lestropie wants to merge 1 commit intodevfrom
cmdline_type_various_fix

Conversation

@Lestropie
Copy link
Member

Downstream of #2911.

Found that when transitioning a command-line option from a fixed type to a .type_various(), I got an error relating to attempting to resolve a bad variant. Seems my CLI tests were not comprehensive enough to catch; I might look at expanding that before merging.

#2580 would fix this problem, as each individual possible type would have its own limits data instantiated.

@Lestropie Lestropie added the bug label Feb 16, 2025
@Lestropie Lestropie self-assigned this Feb 16, 2025
Lestropie added a commit that referenced this pull request Mar 11, 2025
Some command-line arguments could be one of multiple types, depending on the user's desired input / behaviour. Rather than simply flagging all such instances as "various", thereby placing zero restrictions on inputs and providing minimal information on the interface internally, instead utilise each command-line argument type as a bitwise flag, allowing each command-line argument to nominate what types of input are allowed vs. not.
Note that this requires some care internally within the command-line parsing: requirements at the point of command-line parsing can typically only be imposed if the argument type is exclusive.
Also fixes some non-functional checks on the CLIs, which neglected to detect expected deviations from previous behaviour.
Closes #2580.
Supersedes #3067.
@Lestropie
Copy link
Member Author

Superseded by #3074.

@Lestropie Lestropie closed this Mar 11, 2025
@Lestropie Lestropie deleted the cmdline_type_various_fix branch March 11, 2025 04:52
Lestropie added a commit that referenced this pull request Aug 26, 2025
Some command-line arguments could be one of multiple types, depending on the user's desired input / behaviour. Rather than simply flagging all such instances as "various", thereby placing zero restrictions on inputs and providing minimal information on the interface internally, instead utilise each command-line argument type as a bitwise flag, allowing each command-line argument to nominate what types of input are allowed vs. not.
Note that this requires some care internally within the command-line parsing: requirements at the point of command-line parsing can typically only be imposed if the argument type is exclusive.
Also fixes some non-functional checks on the CLIs, which neglected to detect expected deviations from previous behaviour.
Closes #2580.
Supersedes #3067.
@Lestropie Lestropie restored the cmdline_type_various_fix branch August 26, 2025 07:51
@Lestropie Lestropie deleted the cmdline_type_various_fix branch August 27, 2025 00:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant