-
Notifications
You must be signed in to change notification settings - Fork 464
Support -warn-error
argument
#6717
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
Support -warn-error
argument
#6717
Conversation
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.
Thanks for your work! Some remarks:
- When passing an invalid an invalid argument like
rescript -warn-error 32
instead ofrescript -warn-error +32
, I get the following error message:
Fatal error: exception Stdlib.Arg.Bad("Ill-formed list of warnings")
Maybe we could print a nicer error message in this case.
- I tested this and it did not work for me in a subpackage in a monorepo setup.
jscomp/build_tests/cli_help/input.js
Outdated
" -ws [host]:port set up host & port for WebSocket build notifications\n" + | ||
" -verbose Set the output to be verbose\n" + | ||
" -with-deps *deprecated* This is the default behavior now. This option will be removed in a future release\n" + | ||
" -warn-error Enable warnings as error\n"; |
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.
It is unclear here that a list of warning codes is needed as an argument (and what format this list needs to have).
a1d40fb
to
1f03d90
Compare
@aspeddro Are you able to reproduce the problem with subpackages in the monorepo that @fhammerschmidt linked to or do you need a different example project? |
I got an error installing local package with yarn
I made a small example here
|
Retested with a monorepo, works fine now! 🎉 Thanks a lot! |
ad7ecfc
to
87a1387
Compare
Add supoort for
-warn-error
argument. Use for CI only.If there is already a configuration for warnings as error in
rescript.json
the argument will be added at the endExample: Disable warning 27, run
rescript -warn-error -27
generate-warn-error +27-27
, the last one wins.Related #6713