Skip to content

Conversation

@wrtobin
Copy link
Collaborator

@wrtobin wrtobin commented Dec 6, 2025

Just putting this up for review for the moment, not married to any design decisions and I assume we'll want to change output message structure.

This basically just introduces mechanisms to lifecycle internal types that have been replaced/supplanted while informing the user in obvious ways and maintaining the schema generation/documentation and parse>init process for that type until it drops completely from the project.

To deprecate any Group subclass just, for e.g. class Foo : public ExecutableGroup (inherits from any group subclass):

class Foo : public DeprecatedGroup< ExecutableGroup >

It basically just injects itself into the inheritance hierarchy and adds the deprecation/obsolescence behavior.

Comment on lines +146 to +153
GEOS_LOG_RANK_0( GEOS_FMT(
"\n"
"********************************************************************************\n"
"* DEPRECATION WARNING\n"
"* Group: {}\n"
"* {}\n"
"********************************************************************************",
className, message ) );
Copy link
Contributor

Choose a reason for hiding this comment

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

Why not using a true GEOS_WARNING?

Comment on lines +442 to +451
GEOS_LOG_RANK_0( GEOS_FMT(
"\n"
"********************************************************************************\n"
"* OBSOLETE GROUP WARNING\n"
"* Group: {}\n"
"* {}\n"
"* This group has been removed and will cause an error if used.\n"
"* (Group object created for input parsing compatibility only)\n"
"********************************************************************************",
className, message ) );
Copy link
Contributor

Choose a reason for hiding this comment

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

Same remark, why not GEOS_WARNING?

* @tparam T The type that would normally be wrapped
*/
template< typename T >
class NoopWrapper final : public WrapperBase
Copy link
Contributor

Choose a reason for hiding this comment

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

As metadata function as another wrapper, could it be used to document some aspects of a given Group?
If yes, it would be cool to have this class in its own file :)
If not, maybe it should be named after its final role (i.e. DeprecatedWrapper)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants