Conversation
rescript
@rescript/darwin-arm64
@rescript/darwin-x64
@rescript/linux-arm64
@rescript/linux-x64
@rescript/win32-x64
commit: |
|
@nojaf to answer you on your comment here rescript-lang/rewatch#162 (comment). |
|
Not sure if relevant here, but I still see
I got this with |
I think the right time for this would be when
I prematurely already look for a binary named |
|
If I run (the |
d38d158 to
df28ac1
Compare
df28ac1 to
7742361
Compare
| } | ||
| ); | ||
| } else { | ||
| child_process.execFileSync(rewatch_exe, [...args], { |
There was a problem hiding this comment.
why do we need this branch? can we not just pass --bsc-path in both cases?
There was a problem hiding this comment.
bsc-path is not a root level arg anymore
There was a problem hiding this comment.
It might be an option to use an env var BSC_PATH instead to avoid this problem?
There was a problem hiding this comment.
I like this idea. Either that, or we promote --bsc-path to a root level argument again. If we decide for the env var would this be in addition to the arg?
There was a problem hiding this comment.
My thinking was that it would replace the arg. What's your opinion @jfrolich?
|
@Bushuo, there still seems to be something up with the legacy commands: |
Ok, strange, I will look into it. |
|
@nojaf I can reproduce it and will fix it soon. |
refactor `cli.rs` to remove duplication of docstrings

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-argsargument 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.