chore(build-cli): deprecate release report commands#26945
chore(build-cli): deprecate release report commands#26945tylerbutler wants to merge 2 commits intomicrosoft:mainfrom
Conversation
Mark `release report` and `release report-unreleased` as deprecated. Both commands now print a prominent warning banner on every invocation. Release reports will no longer be generated in the future and these commands will be removed.
There was a problem hiding this comment.
Pull request overview
This PR deprecates the flub release report and flub release report-unreleased commands using oclif’s deprecation mechanism and adds prominent runtime warnings to discourage continued use, aligning with the stated plan to stop generating release reports and remove these commands later.
Changes:
- Marks both release report commands as deprecated via oclif command metadata.
- Prints a prominent red warning banner plus a deprecation warning message on each invocation.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| build-tools/packages/build-cli/src/commands/release/report.ts | Adds oclif deprecation metadata and prints a deprecation banner/warning at runtime for the release report command. |
| build-tools/packages/build-cli/src/commands/release/report-unreleased.ts | Adds oclif deprecation metadata and prints a deprecation banner/warning at runtime for the unreleased release report command. |
| const deprecationWarning = chalk.bgRed( | ||
| chalk.white(chalk.bold(" DO NOT RELY ON THIS COMMAND ")), | ||
| ); | ||
| const lines = Array.from({ length: 12 }, () => deprecationWarning).join("\n"); | ||
| this.log(`\n${lines}`); | ||
| this.warning( | ||
| "This command is deprecated and will be removed in a future release. Release reports will no longer be generated.", | ||
| ); | ||
| this.log(`${lines}\n`); | ||
|
|
||
| const { flags } = this; | ||
|
|
There was a problem hiding this comment.
The deprecation banner is printed via this.log() twice (before and after the warning), so this ends up emitting 24 lines of banner text (12 + 12). If the intent is a 12-line banner per invocation, consider logging it only once (or splitting into e.g. 6 lines above/6 below). Also, because it uses this.log(), --quiet will not suppress the banner even though the base flag claims to disable logging; consider gating the banner on !this.flags.quiet (or otherwise documenting/handling this exception).
| const deprecationWarning = chalk.bgRed( | |
| chalk.white(chalk.bold(" DO NOT RELY ON THIS COMMAND ")), | |
| ); | |
| const lines = Array.from({ length: 12 }, () => deprecationWarning).join("\n"); | |
| this.log(`\n${lines}`); | |
| this.warning( | |
| "This command is deprecated and will be removed in a future release. Release reports will no longer be generated.", | |
| ); | |
| this.log(`${lines}\n`); | |
| const { flags } = this; | |
| const { flags } = this; | |
| const deprecationWarning = chalk.bgRed( | |
| chalk.white(chalk.bold(" DO NOT RELY ON THIS COMMAND ")), | |
| ); | |
| const lines = Array.from({ length: 12 }, () => deprecationWarning).join("\n"); | |
| if (!flags.quiet) { | |
| this.log(`\n${lines}\n`); | |
| } | |
| this.warning( | |
| "This command is deprecated and will be removed in a future release. Release reports will no longer be generated.", | |
| ); |
build-tools/packages/build-cli/src/commands/release/report-unreleased.ts
Outdated
Show resolved
Hide resolved
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Summary
The release report commands were never intended to be used for anything other than reporting after a release. They have long been used for other purposes. Now, I want to delete them so I don't have to maintain them or code review them any more. There should be no need for these commands in 2026. They were created as a "fun addition" to the build tools in what was perhaps my greatest mistake in creating the build-tools. If we are relying on them, then we need to stop.
Changes
flub release reportandflub release report-unreleasedas deprecated using oclif's built-in deprecation mechanismTest plan
flub release report --helpand verify it shows deprecated statusflub release reportand verify the warning banner is printedflub release report-unreleased --helpand verify it shows deprecated status