Skip to content

Commit

Permalink
Deprecate get_js_plugins() (#6711)
Browse files Browse the repository at this point in the history
Co-authored-by: Amaury Chamayou <[email protected]>
  • Loading branch information
eddyashton and achamayou authored Dec 19, 2024
1 parent 81abbc4 commit 526793b
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 9 deletions.
10 changes: 9 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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]

Expand Down
6 changes: 0 additions & 6 deletions doc/build_apps/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -153,12 +153,6 @@ Indexing
:project: CCF
:members:

JavaScript FFI Plugins
----------------------

.. doxygenfunction:: ccf::get_js_plugins
:project: CCF

HTTP Entity Tags Matching
-------------------------

Expand Down
3 changes: 2 additions & 1 deletion include/ccf/app_interface.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,12 @@ namespace ccf
*/
std::unique_ptr<ccf::endpoints::EndpointRegistry> 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<ccf::js::FFIPlugin> get_js_plugins();
// SNIPPET_END: app_interface
}
2 changes: 1 addition & 1 deletion python/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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="[email protected]" },
]
Expand Down
5 changes: 5 additions & 0 deletions src/enclave/enclave.h
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,12 @@ namespace ccf
rpc_map->register_frontend<ccf::ActorsType::acme_challenge>(
std::make_unique<ccf::ACMERpcFrontend>(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(
Expand Down

0 comments on commit 526793b

Please sign in to comment.