Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add backward-compatibility hack for command-line parsing #1

Open
wants to merge 4 commits into
base: cmdliner-tlapm
Choose a base branch
from

Conversation

damiendoligez
Copy link

Signed-off-by: Damien Doligez [email protected]

This is a PR on tlaplus#177 to add backward compatiblity with double-argument command line options.

The idea is to scan the command line to detect old-style usage and (if needed) modify the command line to make it parseable by Cmdliner.

It's not a lot of code, and it will let users upgrade TLAPM while staying with the old toolbox.

Stephane Glondu and others added 4 commits November 21, 2024 10:11
This slightly changes tlapm's command-line syntax in an incompatible
way:
- deprecated options are no longer accepted: `-d`, `--paranoid`,
  `--isaprove`, `--fpdir`
- options that used to take two arguments (as in `--opt A B`) now
  takes them as a single comma-separated argument (as in `--opt A,B`):
  `--toolbox`, `--nofpl`, `--erasefp`

Signed-off-by: Stephane Glondu <[email protected]>
- "--toolbox A B" becomes "--toolbox A,B"
- "--isaprove" is deprecated and no longer supported

Signed-off-by: Stephane Glondu <[email protected]>
This gives to reverse-dependencies the ability to auto-detect which
command-line syntax to use.

Signed-off-by: Stephane Glondu <[email protected]>
@glondu
Copy link
Owner

glondu commented Dec 3, 2024

Thanks for the tip! I propose a different implementation which is (IMHO) easier to read: 319d2a1

@glondu glondu force-pushed the cmdliner-tlapm branch 2 times, most recently from d7b988e to 178acd7 Compare December 11, 2024 08:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants