-
Couldn't load subscription status.
- Fork 2.7k
Fix: correctly pluralize 'target'/'targets' in finished message #16132
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
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -844,8 +844,10 @@ impl<'gctx> DrainState<'gctx> { | |
| let profile_link = build_runner.bcx.gctx.shell().err_hyperlink( | ||
| "https://doc.rust-lang.org/cargo/reference/profiles.html#default-profiles", | ||
| ); | ||
| let target_count = self.counts.len(); | ||
| let message = format!( | ||
| "{profile_link}`{profile_name}` profile [{opt_type}]{profile_link:#} target(s) in {time_elapsed}", | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This message is emitted in every build command, and changing this failed 960 tests. To fix them we then need to update snapshots in those 960 tests. I am not sure if it is worthy. |
||
| "{profile_link}`{profile_name}` profile [{opt_type}]{profile_link:#} target{} in {time_elapsed}", | ||
| (target_count == 1).then(|| "").unwrap_or("s") | ||
| ); | ||
| if !build_runner.bcx.build_config.build_plan { | ||
| // It doesn't really matter if this fails. | ||
|
|
||
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.
This seems wrong as it counted every package in the dependency graph, not just selected local packages.
However, maybe the question should be asked like: What do we really want to count here? What does
target(s)mean here really?