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

dart compile jit-snapshot can't take flags (like -o) or --options as training arguments #49302

Closed
cpswan opened this issue Jun 21, 2022 · 3 comments
Assignees
Labels
area-dart-cli Use area-dart-cli for issues related to the 'dart' command like tool. dart-cli-compile Issues related to the 'dart compile' tool

Comments

@cpswan
Copy link
Contributor

cpswan commented Jun 21, 2022

Dart SDK version: 2.17.3 (stable) (Wed Jun 1 11:06:41 2022 +0200) on "linux_x64"

If I try to pass an option -e as [<training arguments>]:

$ dart compile jit-snapshot args_example.dart -e 1234
Could not find an option or flag "-e".

Usage: dart compile jit-snapshot [arguments] <dart entry point> [<training arguments>]
...

or similarly --example:

$ dart compile jit-snapshot args_example.dart --example 1234
Could not find an option named "example".
...

Where args_example.dart is:

import 'package:args/args.dart';

void main(List<String> arguments) {

  final parser = ArgParser()..addOption('example', abbr: 'e');

  ArgResults argResults = parser.parse(arguments);
  
  print(argResults['example']);
  
}

It looks like this area has previously had attention for arguments that aren't preceded by - at #43839 and for env variables with #48447

@devoncarew devoncarew added the area-dart-cli Use area-dart-cli for issues related to the 'dart' command like tool. label Jun 21, 2022
@bkonyi bkonyi added the dart-cli-compile Issues related to the 'dart compile' tool label Jun 21, 2022
@bkonyi bkonyi self-assigned this Jun 21, 2022
@bkonyi
Copy link
Contributor

bkonyi commented Jun 21, 2022

Fix up for review here.

@cpswan
Copy link
Contributor Author

cpswan commented Jul 14, 2022

@bkonyi do you know which SDK release this will find its way into? As 2.17.5 and 2.17.6 have been released since this was closed I was hopeful that they'd have the fix, but it seems not.

@mraleph
Copy link
Member

mraleph commented Jul 14, 2022

@cpswan it in 2.18.0-226.0.dev or newer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-dart-cli Use area-dart-cli for issues related to the 'dart' command like tool. dart-cli-compile Issues related to the 'dart compile' tool
Projects
None yet
Development

No branches or pull requests

4 participants