Skip to content

Delete the success and section log macros that nothing calls - #421

Merged
onuralpszr merged 2 commits into
mainfrom
chore-drop-unused-log-macros
Aug 11, 2026
Merged

Delete the success and section log macros that nothing calls#421
onuralpszr merged 2 commits into
mainfrom
chore-drop-unused-log-macros

Conversation

@onuralpszr

@onuralpszr onuralpszr commented Aug 11, 2026

Copy link
Copy Markdown
Member

Neither macro has a single call site in src, crates, examples, tests, the READMEs, or docs; info!, warn!, error!, and verbose! are the ones actually in use. Both are #[macro_export]ed, so they are reachable as ultralytics_inference::success! and ultralytics_inference::section! by downstream crates even though nothing here uses them.

🛠️ PR Summary

Made with ❤️ by Ultralytics Actions

🌟 Summary

Removed the unused exported success! and section! logging macros from src/logging.rs to eliminate unreferenced API surface.

📊 Key Changes

  • Deleted the success! macro, which printed bold green success messages.
  • Deleted the section! macro, which conditionally printed bold cyan section headers in verbose mode.
  • Retained the actively used info!, warn!, error!, and verbose! logging macros.

🎯 Purpose & Impact

  • Downstream crates can no longer use ultralytics_inference::success! or ultralytics_inference::section!.
  • No behavior changes for the repository’s existing call sites, since neither macro had any usages.

Signed-off-by: Onuralp SEZER <onuralp@ultralytics.com>
@UltralyticsAssistant

Copy link
Copy Markdown
Member

👋 Hello @onuralpszr, thank you for submitting a ultralytics/inference 🚀 PR! This automated message confirms your contribution was received, and an Ultralytics engineer will assist with the review. To ensure a seamless integration of your work, please review the following checklist:

  • Define a Purpose: Clearly explain the purpose of your fix or feature in your PR description, and link to any relevant issues. Ensure your commit messages are clear, concise, and adhere to the project's conventions.
  • Synchronize with Source: Confirm your PR is synchronized with the ultralytics/inference main branch. If it's behind, update it by clicking the 'Update branch' button or by running git pull and git merge main locally.
  • Ensure CI Checks Pass: Verify all Ultralytics Continuous Integration (CI) checks are passing. If any checks fail, please address the issues.
  • Update Documentation: Update the relevant documentation for any new or modified features.
  • Add Tests: If applicable, include or update tests to cover your changes, and confirm that all tests are passing.
  • Sign the CLA: Please ensure you have signed our Contributor License Agreement if this is your first Ultralytics PR by writing "I have read the CLA Document and I sign the CLA" in a new message.
  • Minimize Changes: Limit your changes to the minimum necessary for your bug fix or feature addition. "It is not daily increase but daily decrease, hack away the unessential. The closer to the source, the less wastage there is." — Bruce Lee

For more guidance, please refer to our Contributing Guide. Don't hesitate to leave a comment if you have any questions. Thank you for contributing to Ultralytics! 🚀

@UltralyticsAssistant UltralyticsAssistant left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

🔍 PR Review

Made with ❤️ by Ultralytics Actions

Reviewed the logging macro removal and repository-wide call sites. The deletion is internally unused, but it removes two exported macros and therefore introduces a downstream compilation compatibility break. No other issues found.

💬 Posted 1 inline comment
  • 💡 MEDIUM src/logging.rs:47 These macros are part of the public crate API because #[macro_export] makes them callable as ultralytics_inference::success! and ultralytics_inference::section!. Any downstream crate using either macro will fail to compile after upgrading, even though this repository has no call sites. Please retain them (possibly deprecated) or make this removal as part of an explicitly versioned breaking API release.

Comment thread src/logging.rs
@codecov

codecov Bot commented Aug 11, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@onuralpszr
onuralpszr merged commit 8a9d0ca into main Aug 11, 2026
16 checks passed
@onuralpszr
onuralpszr deleted the chore-drop-unused-log-macros branch August 11, 2026 12:32
@UltralyticsAssistant

Copy link
Copy Markdown
Member

🎉 PR #421 has been merged—thank you, @onuralpszr!

“Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away.” — Antoine de Saint-Exupéry

This cleanup removes the unused success! and section! macros while preserving the actively used logging macros and existing behavior.

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.

2 participants