build icon indicating copy to clipboard operation
build copied to clipboard

Add a --version flag

Open natebosch opened this issue 7 years ago • 5 comments

natebosch avatar Aug 28 '18 23:08 natebosch

What version would it print? The build_runner version?

jakemac53 avatar Aug 29 '18 14:08 jakemac53

Possibly the version of build_runner and build_runner core?

Maybe even look at the pubspec.lock and print versions for all build_* packages?

I'd mostly just expect that binaries support --version for consistency.

natebosch avatar Aug 29 '18 17:08 natebosch

Huh, I guess even pub/dartdevc/dart2js all support that. What happens if you pass it with any other arguments?

jakemac53 avatar Aug 29 '18 18:08 jakemac53

What happens if you pass it with any other arguments?

I think usually they're ignored, version is printed and it exits.

natebosch avatar Aug 29 '18 18:08 natebosch

huh, so the tools don't agree on what to do in the presence of other args:

dart vm: ignores the --version flag and runs the provided script dart2js/dartdevc/dartanalyzer: just prints the version and ignores other args

We should probably just do what everything but the vm does, and ignore other args.

jakemac53 avatar Sep 27 '18 15:09 jakemac53

Closing as stale.

davidmorgan avatar Jul 07 '25 11:07 davidmorgan