Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Upstream the changes of rescript-lang/rewatch#162 and adjusted the PR description.
This PR refactors the CLI structure of rewatch to enhance clarity and improve the usability of subcommands and their associated arguments.
Key Changes:
Introduction of New Subcommands:
legacy
: Acts as a passthrough to the legacy CLIrescript
. In the future, this will be namedrescript-legacy
.dump
: Serves as an alias forlegacy dump
.format
: Serves as an alias forlegacy format
.Breaking Change:
--compiler-args
argument has been replaced with a new subcommandcompiler-args
. I assume this change will have minimal impact. I guess this is mainly used as a debug command.rewatch --bsc-path=something build
. This change was made because the number of arguments on the top level was getting out of hand and hard to track.Benefits:
The refactored structure ensures a more intuitive CLI experience by clearly delineating which arguments apply to specific subcommands.
The introduction of aliases (dump and format) simplifies common operations and aims to make the transition to rewatch as the default build system easier.
The new compiler-args subcommand makes the CLI behavior more consistent and predictable.