Skip to content
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

Use dashes in options -- not underscores #1979

Closed
kasperl opened this issue Mar 5, 2012 · 2 comments
Closed

Use dashes in options -- not underscores #1979

kasperl opened this issue Mar 5, 2012 · 2 comments
Assignees
Labels
area-vm Use area-vm for VM related issues, including code coverage, FFI, and the AOT and JIT backends.

Comments

@kasperl
Copy link

kasperl commented Mar 5, 2012

It seems much more conventional to use dashes in options instead of underscores. I suggest we use:

  dart --enable-checked-mode

rather than:

  dart --enable_checked_mode

Alternatively, we can support both (like V8 does) but I'd prefer not supporting underscores altogether.

@ghost
Copy link

ghost commented Mar 5, 2012

VM already supports both dashes and underbars in flags (except for some very special flags, e.g., --break_at, --compile_all, --generate_pprof_symbols, --use_script_snapshot, --import_map).
For all conventional flags (including soon-to-be-addded "enable-checked-mode") we have decided to support both, at least for the moment.
Maybe we should print flags with dashes instead of underbars (--print-flags).


cc @iposva-google.
Set owner to @sgmitrovic.
Added Accepted label.

@iposva-google
Copy link
Contributor

The canonical version inside the VM is with underscores. This makes it easy to copy and paste the relevant flag to a command-line. Since it is not possible to name the flags with dashes because that conflicts with the - operator in C++, I guess this should stay. I verified that the form --some_flag and --some-flag are equivalent and enabled the proper handling of --no_some_flag and --no-some-flag. So we should be covered for pretty much all of it.

VM development flags handled by the binary, such as --compile_all are the lone exception.


Set owner to @iposva-google.
Added Fixed label.

@kasperl kasperl added Type-Defect area-vm Use area-vm for VM related issues, including code coverage, FFI, and the AOT and JIT backends. labels Mar 12, 2012
copybara-service bot pushed a commit that referenced this issue Feb 27, 2023
Revisions updated by `dart tools/rev_sdk_deps.dart`.

cli_util (https://github.com/dart-lang/cli_util/compare/fd38b5f..3851652):
  3851652  2023-02-24  Kevin Moore  Move to dart_flutter_team_lints, require Dart 2.19 (#77)
  705bb29  2023-02-24  Kevin Moore  blast_repo fixes (#76)

crypto (https://github.com/dart-lang/crypto/compare/03eb2c9..9efb888):
  9efb888  2023-02-23  Kevin Moore  move to pkg:dart_flutter_team_lints, require Dart 2.19 (#141)

test (https://github.com/dart-lang/test/compare/2cc4144..1307cc5):
  1307cc59  2023-02-23  Nate Bosch  Add ComparableChecks extension (#1960)
  66f2985c  2023-02-24  Pascal Welsch  Fix isNotEmpty rejection (#1959)
  cf10dc5b  2023-02-23  Nate Bosch  Condition must have dynamic generic in deepEquals (#1958)
  6fc48d03  2023-02-23  Nate Bosch  Fix timeouts when a predicate throws instead (#1957)

vector_math (https://github.com/google/vector_math.dart/compare/920e9b6..1e4d000):
  1e4d000  2023-02-23  Kevin Moore  Move to latest team lints, require Dart 2.19 (#281)

webdev (https://github.com/dart-lang/webdev/compare/1e7f9b7..deb801b):
  deb801b  2023-02-24  Devon Carew  contribute issue templates and pull request labeling (#1979)
  74a6520  2023-02-24  Elliott Brooks (she/her)  [MV3 Debug Extension] Use new Dart Debug Extension bug template (#1992)
  c1f325c  2023-02-24  Elliott Brooks (she/her)  [MV3 Debug Extension] Bolt debugging: can reload the page and continue to debug (#1991)
  057f598  2023-02-23  Elliott Brooks (she/her)  [MV3 Debug Extension] Small fixes for building the extension (#1990)
  28a090e  2023-02-23  Anna Gringauze  Run dwds tests in a copy of the sdk directory (#1989)
  b58d3eb  2023-02-23  Anna Gringauze  Run webdev tests in a copy of the sdk directory (#1987)

Change-Id: Iaad67eec68cf3cfeba832abbeb42728043e15b22
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/285760
Auto-Submit: Devon Carew <devoncarew@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-vm Use area-vm for VM related issues, including code coverage, FFI, and the AOT and JIT backends.
Projects
None yet
Development

No branches or pull requests

2 participants