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

Replace jcommander with a homemade command line parser #15

Open
MatthewKosloski opened this issue Sep 16, 2021 · 0 comments
Open

Replace jcommander with a homemade command line parser #15

MatthewKosloski opened this issue Sep 16, 2021 · 0 comments
Labels
feature New feature or request

Comments

@MatthewKosloski
Copy link
Owner

Currently, we're relying on a third-party package, jcommander, for command-line argument parsing. There are both advantages and disadvantages when it comes to removing this package:

Advantages:
- More control over implementation and API of the CLI
- Less coupled to third-party dependencies
- No dependency maintenance (since it's the only third-party package on which we rely, other than junit of course)

Disadvantages:
- We would be slightly re-inventing the wheel. However, the TypeScript compiler has its own home-grown command line parser and executor, so why can't Torrey have one as well?
- More development effort.
- Could lead to an introduction to more bugs. However, we have junit to write tests for it.

Acceptance Criteria:
- Implement a new command-line parser that does not change how the compiler is currently used. That is, all existing command line arguments (e.g., --help, -h, --target, etc.) should still work after the new parser is implemented.
- Since we'll be writing our own parser, the internal API used to parse CLI args will change and probably deviate from that used by jcommander. This is expected and is totally fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant