-
Notifications
You must be signed in to change notification settings - Fork 215
Add generate-build-script command #838
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
Closes #778 Wrapping entrypoints can use this to generate the build script and then run it using `Isolate.spawnUri` and avoid workaarounds like `--assume-tty`.
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.
LGTM with one comment
// Use the actual command runner to parse the args and immediately print the | ||
// usage information if there is no command provided or the help command was | ||
// explicitly invoked. | ||
var commandRunner = new BuildCommandRunner([]); | ||
var commandRunner = new BuildCommandRunner([]) | ||
..addCommand(new _GenerateBuildScript()); |
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.
Any reason we shouldn't add this to the command runner generally?
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.
The other place we use this CommandRunner doesn't have the capability of performing this command.
build_runner/bin/build_runner.dart
Outdated
|
||
class _GenerateBuildScript extends Command { | ||
@override | ||
final description = 'Generate a script to run builds and print the file path'; |
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.
Nit: the script is generated no matter what, the command only prints the path and turns off logging. Maybe a note in the description about how this is only really useful for wrapper scripts.
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.
Done
Feel free to fix the analysis errors in a later pr as they are unrelated to this change. |
Closes #778
Wrapping entrypoints can use this to generate the build script and then
run it using
Isolate.spawnUri
and avoid workarounds like--assume-tty
.