-
Notifications
You must be signed in to change notification settings - Fork 231
Rename --checked to --check-asserts #1964
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
Keep the old flag as an alias, run with checked mode if either is set. Behavior will be weird for cases like `--checked --no-check-asserts` but it's not worth the extra complexity to track that down. Update tests using the flag. Use consistent single quotes in the files that were being edited anyway.
Shouldn't we be going with |
See #1922 (comment) |
for consistency with the VM and Dart2Js
discussed offline. Went with |
argParser.addFlag("checked", | ||
abbr: "c", help: "Enable runtime type checks and assertions."); | ||
argParser.addOption("mode", help: "Deprecated option", hide: true); | ||
argParser.addFlag('enable-asserts', help: 'Enable assert statements.'); |
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.
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.
I took this directly from dart --help
. If we want to change this I think we should do it in both places.
argParser.addFlag("checked", | ||
abbr: "c", help: "Enable runtime type checks and assertions."); | ||
argParser.addOption("mode", help: "Deprecated option", hide: true); | ||
argParser.addFlag('enable-asserts', help: 'Enable assert statements.'); |
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.
Ditto
@@ -22,7 +22,7 @@ import 'utils.dart'; | |||
/// | |||
/// Arguments from [args] will be passed to the spawned Dart application. | |||
/// | |||
/// If [checked] is true, the program is run in checked mode. | |||
/// If [checked] is true, the program is run with assertions enabled. |
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.
Here and elsewhere: how about "with assertion checking enabled"?
Keep the old flag as an alias, run with checked mode if either is set.
Behavior will be weird for cases like
--checked --no-check-asserts
butit's not worth the extra complexity to track that down.
Update tests using the flag.
Use consistent single quotes in the files that were being edited anyway.