-
Notifications
You must be signed in to change notification settings - Fork 380
docs(bee-dev): update dev command with deprecation warning and doc link #5283
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
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.
Pull Request Overview
This PR adds deprecation warnings to the bee dev command to inform users that this command will be deprecated soon, directing them to official documentation for more information.
Key Changes:
- Updated the command's
Shortdescription to include a deprecation warning - Added a formatted warning box displayed when the command runs, with yellow coloring for visibility
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
cmd/bee/cmd/start_dev.go
Outdated
| cmd := &cobra.Command{ | ||
| Use: "dev", | ||
| Short: "Start a Swarm node in development mode", | ||
| Short: "WARNING: This command will be deprecated soon. For more information, please refer to the official documentation: https://docs.ethswarm.org/docs/develop/tools-and-features/bee-dev-mode and check back regularly for updates.", |
Copilot
AI
Nov 18, 2025
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 Short field in Cobra commands is meant to be a brief, single-line description displayed in command listings and help text. This deprecation warning is excessively long (over 200 characters) and includes a URL, making it unsuitable for this field.
Consider using a concise message like:
Short: "Start a Swarm node in development mode (deprecated)",
The detailed deprecation warning and documentation link are appropriately placed in the warning box (lines 59-70) that's displayed when the command runs.
| Short: "WARNING: This command will be deprecated soon. For more information, please refer to the official documentation: https://docs.ethswarm.org/docs/develop/tools-and-features/bee-dev-mode and check back regularly for updates.", | |
| Short: "Start a Swarm node in development mode (deprecated)", |
| warningBox := ` | ||
| ╔══════════════════════════════════════════════════════════════════════════════╗ |
Copilot
AI
Nov 18, 2025
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 warning message box starts with an empty line (line 59), which will add extra whitespace before the box when printed. Consider removing the leading newline from the string literal:
warningBox := `╔══════════════════════════════════════════════════════════════════════════════╗This will make the output formatting more predictable and consistent.
| warningBox := ` | |
| ╔══════════════════════════════════════════════════════════════════════════════╗ | |
| warningBox := `╔══════════════════════════════════════════════════════════════════════════════╗ |
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.
I am not sure if this makes the output prettier.
|
This warning box looks very nice. I would mark command as DEPRECATED in short cmd. In long cmd description, I would add the mentioned warning and note that it will be removed in future versions. @bcsorvasi what do you think? |
| warningBox := ` | ||
| ╔══════════════════════════════════════════════════════════════════════════════╗ |
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.
I am not sure if this makes the output prettier.
@gacevicljubisa I would use the original "will be deprecated" phrasing in the short since it is not yet deprecated, it is rather a grace period. And yes, the long version and the warning box looks pretty nice! |
@bcsorvasi when we mark it But if it is already agreed how to approach this, I do not mind. |
Checklist
Description
Add warning in Bee when running
bee dev,bee helpandbee dev --helpcommands.Open API Spec Version Changes (if applicable)
Motivation and Context (Optional)
Related Issue (Optional)
#5247
Screenshots (if appropriate):