Repository navigation
app: drop legacy app::instance() singleton API and cvcapp macro - #37
Merged
Merged
Conversation
All production and test callers have been migrated to explicit cvc::app& parameters (PRs #25-#36). Remove the deprecated public singleton surface: - cvcapp macro (inc/cvc/app.h) - cvc::app::instance() public method (declaration + definition) The internal singleton machinery (_instance, _instanceMutex, instancePtr(), wait_for_threads atexit registration) is left in place for now; nothing reaches it through the public API, so the process-wide app singleton is no longer constructed. apps now have to be created and passed explicitly. 590/590 with CVC_USING_XMLRPC=ON and OFF locally.
transfix
added a commit
that referenced
this pull request
May 4, 2026
The cvcapp / cvcstate macros and the app::instance() / state::instance() zero-arg singletons have been removed (PRs #36 and #37). Update the documentation to match: - README.md: drop the 'Singleton application object (cvcapp)' bullet; describe cvc::app as a per-app context object. - docs/APP_API.md: remove the 'still present so existing code keeps compiling' migration note; remove the 'Deprecated: app::instance() / cvcapp' subsection; remove the 'Legacy: routes through app::instance()' overload entries from thread_info, thread_feedback, and scoped_lock signatures. - docs/STATE_API.md: add a 'Per-app state roots' overview section explaining cvc::state::instance(app); rewrite the Construction and Access reference; rewrite all cvcstate(...) examples to cvc::state::instance(app)(...). - docs/TESTING.md: introduce 'cvc::app app;' in the Isolation example; rewrite cvcstate(...) examples to cvc::state::instance(app)(...). - docs/THREAD_POOL.md, docs/THREAD_POOL_API.md: rewrite cvcapp.* uses to app.*; thread_feedback in pool example takes app& explicitly. - docs/IMAGE_PROCESSING_ALGORITHMS.md: cvcapp.threadProgress() -> app.threadProgress() in three places. - docs/GRAPHICS_DATA_DRIVEN_UPDATES.md: cvc::state::instance() -> cvc::state::instance(app) in the usage example.
transfix
added a commit
that referenced
this pull request
May 5, 2026
3.1.0 is the singleton-less API release:
- Removed cvcapp / cvcstate macros and the zero-arg
app::instance() / state::instance() singletons (PRs #36, #37).
- All callers now reach the application context and state tree
through an explicit cvc::app& argument.
- Added cvc::app::root() member shorthand equivalent to
cvc::state::instance(app) (PR #39).
- Per-app state caching keyed on the owning cvc::app instance.
- Documentation refresh across README, APP_API, STATE_API,
TESTING, THREAD_POOL{,_API}, IMAGE_PROCESSING_ALGORITHMS,
GRAPHICS_DATA_DRIVEN_UPDATES (PR #38).
CMakeLists.txt project version 3.0.0 -> 3.1.0; README Version
History gains a 3.1.0 entry; USAGE.md tarball/path examples
updated.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Capstone of Phase C: with every production and test caller migrated to explicit
cvc::app¶meters (see PRs #25-#36), theappsingleton's public surface is no longer reachable and is removed:cvcappmacro (inc/cvc/app.h)cvc::app::instance()public method (declaration + definition)Internal singleton machinery (
_instance,_instanceMutex,instancePtr(), thewait_for_threadsatexit registration) is left in place for this PR; nothing reaches it through the public API, so the process-wideappsingleton is never constructed. Follow-ups can excise the dead internals.Apps must now be created and passed explicitly.
Local: 590/590 with
-DCVC_USING_XMLRPC=ONand OFF (pre-existing flakySceneGraphTestthat passes on retry).