Skip to content

Conversation

@jll63
Copy link
Collaborator

@jll63 jll63 commented Nov 15, 2025

  • Make initialize and finalize symmetric.
  • Hide the functions in registry
  • initialize should not go in aliases, as that is for frequently used names only and initialize is typically called only from main.

@jll63 jll63 requested a review from Copilot November 15, 2025 21:37
Copilot finished reviewing on behalf of jll63 November 15, 2025 21:40
Copy link

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 refactors the initialize and finalize functions to make them symmetric by providing template-based free functions for both. The PR also hides the registry::initialize and registry::finalize member functions from public documentation and removes initialize from the aliases namespace since it's typically called only once from main.

Key changes:

  • Added a templated free function finalize<Registry>() to match the existing initialize<Registry>() pattern
  • Removed initialize from the boost::openmethod::aliases namespace
  • Moved documentation from registry::finalize member function to the new free function finalize

Reviewed Changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
test/test_dispatch.cpp Updated test to use new finalize<test_registry>() syntax instead of test_registry::finalize()
include/boost/openmethod/preamble.hpp Removed documentation comments from registry::finalize member function
include/boost/openmethod/initialize.hpp Added templated finalize free function with comprehensive documentation; removed initialize from aliases namespace
doc/mrdocs.yml Added exclusions to hide registry::initialize and registry::finalize from generated documentation
doc/modules/ROOT/examples/shared_libs/static_main.cpp Updated to use fully qualified boost::openmethod::initialize() instead of unqualified initialize()
doc/modules/ROOT/examples/shared_libs/indirect_main.cpp Updated all three calls to use fully qualified boost::openmethod::initialize()
doc/modules/ROOT/examples/shared_libs/dynamic_main.cpp Updated all three calls to use fully qualified boost::openmethod::initialize()

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@codecov
Copy link

codecov bot commented Nov 15, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.03%. Comparing base (f7d47fb) to head (b82992b).
⚠️ Report is 6 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop      #46      +/-   ##
===========================================
- Coverage    93.03%   92.03%   -1.00%     
===========================================
  Files           40       40              
  Lines         2713     2838     +125     
  Branches      1226     1354     +128     
===========================================
+ Hits          2524     2612      +88     
- Misses         159      187      +28     
- Partials        30       39       +9     
Files with missing lines Coverage Δ
include/boost/openmethod/initialize.hpp 89.05% <ø> (-4.89%) ⬇️
include/boost/openmethod/preamble.hpp 71.73% <ø> (+0.62%) ⬆️
test/test_dispatch.cpp 99.34% <ø> (ø)

... and 3 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 83bc8d2...b82992b. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

1 participant