Skip to content

Conversation

@akrem-chabchoub
Copy link
Contributor

@akrem-chabchoub akrem-chabchoub commented Nov 18, 2025

Checklist

  • I have read the coding guide.
  • My change requires a documentation update, and I have done it.
  • I have added tests to cover my changes.
  • I have filled out the description and linked the related issues.

Description

Add warning in Bee when running bee dev, bee help and bee dev --help commands.

Open API Spec Version Changes (if applicable)

Motivation and Context (Optional)

Related Issue (Optional)

#5247

Screenshots (if appropriate):

image image image

Copilot AI review requested due to automatic review settings November 18, 2025 10:19
@akrem-chabchoub akrem-chabchoub self-assigned this Nov 18, 2025
@akrem-chabchoub akrem-chabchoub linked an issue Nov 18, 2025 that may be closed by this pull request
Copy link
Contributor

Copilot AI left a 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 Short description 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 := &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.",
Copy link

Copilot AI Nov 18, 2025

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.

Suggested change
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)",

Copilot uses AI. Check for mistakes.
Comment on lines +58 to +59
warningBox := `
╔══════════════════════════════════════════════════════════════════════════════╗
Copy link

Copilot AI Nov 18, 2025

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.

Suggested change
warningBox := `
╔══════════════════════════════════════════════════════════════════════════════╗
warningBox := `╔══════════════════════════════════════════════════════════════════════════════╗

Copilot uses AI. Check for mistakes.
Copy link
Member

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
Copy link
Member

gacevicljubisa commented Nov 18, 2025

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?

Comment on lines +58 to +59
warningBox := `
╔══════════════════════════════════════════════════════════════════════════════╗
Copy link
Member

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.

@bcsorvasi bcsorvasi added this to the v2.7.0 milestone Nov 18, 2025
@bcsorvasi
Copy link

bcsorvasi commented Nov 18, 2025

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?

@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!

@gacevicljubisa
Copy link
Member

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?

@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.

@bcsorvasi when we mark it deprecated we do not need to remove functionality. Functionality can be removed in the future, which can be noted in the long description.

But if it is already agreed how to approach this, I do not mind.

@akrem-chabchoub akrem-chabchoub merged commit 57a0355 into master Nov 19, 2025
19 of 22 checks passed
@akrem-chabchoub akrem-chabchoub deleted the docs/bee-dev branch November 19, 2025 13:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Deprecation notice about dev-bee

5 participants