-
Notifications
You must be signed in to change notification settings - Fork 469
Rust implementation of "rescript format" #7603
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
Conversation
rescript
@rescript/darwin-arm64
@rescript/darwin-x64
@rescript/linux-arm64
@rescript/linux-x64
@rescript/win32-x64
commit: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rewatch format --help
thread 'main' panicked at /Users/nojaf/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/clap_builder-4.5.31/src/builder/debug_asserts.rs:570:9:
Positional argument `[FOLDER]` *must* have `required(true)` or `last(true)` set because a prior positional argument (`[FILES]...`) has `num_args(1..)`
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
There is something weird in the setup here, the help crashes.
Might be related to the files: Vec<string>
, but I'm not sure.
0e9bb0c
to
e276090
Compare
e276090
to
1268640
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This worked well with --all
in my monorepo setup! Great job!
One small thing to follow up on is that rescript format --check
without any input doesn’t provide any output. Perhaps we should log a message indicating that no input was found. I encountered this issue when I forgot to include the --all
argument, which was a bit confusing at first.
Note for the future - we could add an option to also format docstrings, using the new tools format command. |
@nojaf Thanks a lot for testing! Could you retry? I now specified that either |
Do not forward the
rescript format
command to the legacy JS cli anymore, instead implement the functionality natively in Rust.