From 0647670b93d2d397d3ab0e9fd2257faaafa35c66 Mon Sep 17 00:00:00 2001 From: Eddy Ashton Date: Wed, 18 Dec 2024 16:21:39 +0000 Subject: [PATCH 1/2] Deprecate JS FFI plugins system --- CHANGELOG.md | 10 +++++++++- doc/build_apps/api.rst | 6 ------ include/ccf/app_interface.h | 3 ++- python/pyproject.toml | 2 +- 4 files changed, 12 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 35501a087fb7..7f7facdf8835 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,7 +3,15 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) -and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). +and this project adheres Fto [Semantic Versioning](http://semver.org/spec/v2.0.0.html). + +## [6.0.0-dev11] + +[6.0.0-dev11]: https://github.com/microsoft/CCF/releases/tag/6.0.0-dev11 + +### Deprecated + +- The function `ccf::get_js_plugins()` and associated FFI plugin system for JS is deprecated. Similar functionality should now be implemented through a `js::Extension` returned from `DynamicJSEndpointRegistry::get_extensions()`. ## [6.0.0-dev10] diff --git a/doc/build_apps/api.rst b/doc/build_apps/api.rst index 1c8bd610e6a6..03442edf1b57 100644 --- a/doc/build_apps/api.rst +++ b/doc/build_apps/api.rst @@ -153,12 +153,6 @@ Indexing :project: CCF :members: -JavaScript FFI Plugins ----------------------- - -.. doxygenfunction:: ccf::get_js_plugins - :project: CCF - HTTP Entity Tags Matching ------------------------- diff --git a/include/ccf/app_interface.h b/include/ccf/app_interface.h index 6b5c45293862..839c427e8ae4 100644 --- a/include/ccf/app_interface.h +++ b/include/ccf/app_interface.h @@ -53,11 +53,12 @@ namespace ccf */ std::unique_ptr make_user_endpoints( ccf::AbstractNodeContext& context); + // SNIPPET_END: app_interface /** To be implemented by the application. * * @return Vector of JavaScript FFI plugins */ + CCF_DEPRECATED("Deprecated from 6.0.0") std::vector get_js_plugins(); - // SNIPPET_END: app_interface } diff --git a/python/pyproject.toml b/python/pyproject.toml index 23f9707e1cd9..8dbeb535e673 100644 --- a/python/pyproject.toml +++ b/python/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "ccf" -version = "6.0.0-dev10" +version = "6.0.0-dev11" authors = [ { name="CCF Team", email="CCF-Sec@microsoft.com" }, ] From 0ff37470edd4dfafe960b9776f779ff51cecdfa5 Mon Sep 17 00:00:00 2001 From: Eddy Ashton Date: Wed, 18 Dec 2024 16:31:52 +0000 Subject: [PATCH 2/2] Suppress deprecation error --- src/enclave/enclave.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/enclave/enclave.h b/src/enclave/enclave.h index b793e6daf24f..a643189ce3c8 100644 --- a/src/enclave/enclave.h +++ b/src/enclave/enclave.h @@ -193,7 +193,12 @@ namespace ccf rpc_map->register_frontend( std::make_unique(network, *context)); +// Suppress error about use of deprecated get_js_plugins(). This call, and all +// references to FFIPlugins, should be removed after 6.0.0 +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" ccf::js::register_ffi_plugins(ccf::get_js_plugins()); +#pragma clang diagnostic pop LOG_TRACE_FMT("Initialize node"); node->initialize(