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

Add sz build_runner build command #997

Merged
merged 2 commits into from
Sep 18, 2023
Merged

Conversation

nilsreichardt
Copy link
Member

Needed for #963

Usage:

$ sz build_runner
Missing subcommand for "pub global run sz_repo_cli build_runner".

Usage: pub global run sz_repo_cli build_runner <subcommand> [arguments]
-h, --help    Print this usage information.

Available subcommands:
  build   Performs a single build on the specified targets and then exits.

Run "pub global run sz_repo_cli help" to see global options.
$ sz build_runner build
holidays ⚙ Running
abgabe_http_api ⚙ Running
sharezone ⚙ Running
abgabe_http_api ✅
holidays ✅
sharezone ✅
Task was successfully executed for all packages!

argParser.addFlag(
'delete-conflicting-outputs',
help:
'By default, the user will be prompted to delete any files which already exist but were not known to be generated by this specific build script.',
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if promoting the options works with our CLI. Maybe we should always use the --delete-conflicting-outputs flag because I think this is the option to always use.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

promoting the options works with our CLI

I don't know what do you mean exactly. Does that mean that you are unsure if we as developers would notice having that flag for the command?

I'm okay with defaulting it with true, since like you said that's the option we're always using anyways.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Normally, when there is a conflict, the CLI prompts three options. You can then press key 1, 2 or 3.

[INFO] Found 25 declared outputs which already exist on disk. This is likely because the`.dart_tool/build` folder was deleted, or you are submitting generated files to your source repository.
Delete these files?
1 - Delete
2 - Cancel build
3 - List conflicts

However, because we don't show the prints from the Dart CLI, you will not see this message and you can't press any of these options.

Therefore, I would also hard-code --delete-conflicting-outputs to true because as a Sharezone Repo CLI user can't do anything else and wouldn't make sense to set --delete-conflicting-outputs to false.

argParser.addFlag(
'delete-conflicting-outputs',
help:
'By default, the user will be prompted to delete any files which already exist but were not known to be generated by this specific build script.',
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

promoting the options works with our CLI

I don't know what do you mean exactly. Does that mean that you are unsure if we as developers would notice having that flag for the command?

I'm okay with defaulting it with true, since like you said that's the option we're always using anyways.

@nilsreichardt nilsreichardt added this pull request to the merge queue Sep 18, 2023
Merged via the queue into main with commit 9c6a3c4 Sep 18, 2023
@nilsreichardt nilsreichardt deleted the add-sz-build-runner-command branch September 18, 2023 18:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants