From 49480ad6a6ecaa81226a9e37aa7daefe1a6e9709 Mon Sep 17 00:00:00 2001 From: Anthony Shoumikhin Date: Wed, 3 Sep 2025 10:46:14 -0700 Subject: [PATCH 1/2] Deprecate method retrieval in module Mark method as deprecated to discourage direct use. --- extension/module/module.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/extension/module/module.h b/extension/module/module.h index 37fd78f6fdd..bf83619b6fc 100644 --- a/extension/module/module.h +++ b/extension/module/module.h @@ -206,6 +206,8 @@ class Module { } /** + * DEPRECATED: Module manages each Method exclusively. + * * Get a method by it's name. Not recommended to use this method directly as * an end user. It's exposed to allow for composability of module in apis that * operate on method. @@ -215,7 +217,7 @@ class Module { * @returns A Result object containing either a pointer to the requested * method or an error to indicate failure. */ - ET_NODISCARD runtime::Result method(const std::string& method_name); + ET_DEPRECATED ET_NODISCARD runtime::Result method(const std::string& method_name); /** * Load the 'forward' method from the program and set up memory management if From 97914fa6aadba40510f3771c919a7c566e9eb7f8 Mon Sep 17 00:00:00 2001 From: Anthony Shoumikhin Date: Wed, 3 Sep 2025 14:10:47 -0700 Subject: [PATCH 2/2] Format method declaration for better readability --- extension/module/module.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/extension/module/module.h b/extension/module/module.h index bf83619b6fc..963d82d9d89 100644 --- a/extension/module/module.h +++ b/extension/module/module.h @@ -217,7 +217,8 @@ class Module { * @returns A Result object containing either a pointer to the requested * method or an error to indicate failure. */ - ET_DEPRECATED ET_NODISCARD runtime::Result method(const std::string& method_name); + ET_DEPRECATED ET_NODISCARD runtime::Result method( + const std::string& method_name); /** * Load the 'forward' method from the program and set up memory management if