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
Dart2js generates code which handles command line arguments incorrectly #16779
Comments
This comment was originally written by markovuksan...@gmail.com Here's link to gist with code used in the example: https://gist.github.com/markovuksanovic/8966280 |
Added Area-Dart2JS, Triaged labels. |
This is a node-specific API and we would rather not include it in dart2js. However: the main-call can already be intercepted by providing a 'dartMainRunner'. It currently doesn't support arguments, but that can easily be fixed. You could then have a separate file that you prefix to dart2js' output: === Fwiw: we are discussing similar "pre-load" scripts for d8 and jsshell to reduce the size of the js file for web-applications. |
Starting with r32740 we now support the dartMainRunner as described in my previous comment. In fact the dartMainRunner is now invoked with the original arguments (currently always "[]") and should forward them (or provide new ones) to the main function. === |
Closing, as we are unlikely to do more work on this unless there is great demand. |
I would say this issue is fixed by cc3c701 dart2js emits a conversion stub when |
This issue was originally filed by markovuksan...@gmail.com
What steps will reproduce the problem?
void main(List<String> args) {
args.forEach((arg) => print('Argument: ${arg}'));
}
Argument: test
What is the expected output?
At step should be same as step three.
What do you see instead?
Nothing
What version of the product are you using? On what operating system?
Dart VM version: 1.2.0-edge.32628 (Thu Feb 13 08:58:25 2014) on "macos_ia32"
Please provide any additional information below.
This also happens with version 1.1.3
The text was updated successfully, but these errors were encountered: