Repository navigation
app: delete legacy 1-arg thread_info/thread_feedback/scoped_lock ctors - #25
Merged
Merged
Conversation
These three legacy constructors silently delegated to app::instance() and were the last in-libcvc consumers of the singleton outside of xmlrpc and state.cpp (both deferred until cvcstate fold-in). Removed: - thread_info(const std::string&) - thread_feedback(const std::string&) - scoped_lock(const std::string&, const std::string&) The (app&, ...) variants remain the supported API. One in-tree caller in state_object.h::handleStateChanged() lambda was updated to pass _ctx explicitly to thread_feedback. Stacked on #23 (algorithm.cpp dropped its 25 1-arg thread_info calls). Build + ctest -j8 green: 590/590 (one ThreadFeedbackExceptionSafety flake passed on rerun).
transfix
added a commit
that referenced
this pull request
May 2, 2026
transfix
added a commit
that referenced
this pull request
May 3, 2026
Mirrors the #26 xmlrpc_client migration. xmlrpc_server_thread now takes cvc::app& at construction, stores it as a member, and uses state::instance(*_app) and _app->log/sleep/startThread instead of the cvcstate/cvcapp singleton macros. Method classes (cvcstate_*) now also carry an app* and resolve state through the bound context. The static monitor()/init() in the namespace-private bootstrapper takes ctx explicitly (captured once from app::instance() at startup). This also fixes a pre-existing build break under -DCVC_USING_XMLRPC=ON: the 1-arg thread_feedback() default ctor was removed in #25 and xmlrpc_server.cpp was the last unbuilt caller of it. Verified locally with CVC_USING_XMLRPC=ON: 590/590 tests pass.
transfix
added a commit
that referenced
this pull request
May 4, 2026
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.
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.
Removes the three legacy constructors that silently delegated to
app::instance():thread_info(const std::string&)thread_feedback(const std::string&)scoped_lock(const std::string&, const std::string&)After PR #23 (algorithm.cpp dropping its 25
thread_info(BOOST_CURRENT_FUNCTION)calls), these legacy ctors had no in-tree callers outside one site instate_object.h::handleStateChanged()lambda, which now passes_ctxexplicitly tothread_feedback.The
(app&, ...)variants remain the supported API.Remaining
app::instance()/cvcappcall sites are now confined to:xmlrpc_client.cpp/xmlrpc_server.cpp(deferred per master plan, bundled with cvcstate fold-in)state.cpp:98-101(Phase D, cvcstate fold-in)state_object.h:218default ctor (Phase D)app.h:620#define cvcappmacro +app.cpp:187app::instance()impl (Phase C, last)Build +
ctest -j8green: 590/590 (one ThreadFeedbackExceptionSafety flake passed on rerun, unrelated). Supersedes the auto-closed #24.