Skip to content

Commit

Permalink
Merge branch 'master' into development/websocket
Browse files Browse the repository at this point in the history
  • Loading branch information
pwielders authored Jan 29, 2025
2 parents d4a4fb4 + 3bef1f9 commit e959a2a
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 3 deletions.
12 changes: 10 additions & 2 deletions Source/com/Communicator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -247,10 +247,18 @@ namespace RPC {

Core::TextSegmentIterator places(Core::TextFragment(pathName), false, '|');

#ifdef __APPLE__
#ifdef VERSIONED_LIBRARY_LOADING
static const std::string suffixFilter = "*.so." + std::to_string(THUNDER_VERSION);
static const std::string suffixFilter = "*." + std::to_string(THUNDER_VERSION)+ ".dylib";
#else
static const std::string suffixFilter = "*.so";
static const std::string suffixFilter = "*.dylib";
#endif
#else
#ifdef VERSIONED_LIBRARY_LOADING
static const std::string suffixFilter = "*.so." + std::to_string(THUNDER_VERSION);
#else
static const std::string suffixFilter = "*.so";
#endif
#endif

while (places.Next() == true) {
Expand Down
34 changes: 33 additions & 1 deletion docs/plugin/versioning.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ At runtime, this version information can be retrieved from the Controller plugin

## JSON-RPC Interface Versioning

It is possible to version JSON-RPC interfaces independently of the plugin. This information can then be retrieved from the Controller plugin at runtime.
It is possible to version JSON-RPC interfaces independently of the plugin.

If using a JSON-RPC interface that has been autogenerated from a COM-RPC interface (strongly recommended!), then the version number of the interface should be defined as part of the `@json` tag

Expand All @@ -110,3 +110,35 @@ The code-generator will then autogenerate the version information in the generat
```c++
uint8_t major = Exchange::JTestPlugin::Version::Major;
```

This information can retrieved at runtime via JSON-RPC using the generic "versions" method that is there for all plugins (like the "exists" method).

for example:

```json hl_lines="15-20"
{
"jsonrpc": "2.0",
"id": 1,
"method": "Controller.1.versions" ,
"params": {}
}
```

will return

```json hl_lines="15-20"
{
"jsonrpc":"2.0",
"id":1,
"result":[{"name":"JConfiguration","major":1,"minor":0,"patch":0},
{"name":"JDiscovery","major":1,"minor":0,"patch":0},
{"name":"JSystem","major":1,"minor":0,"patch":0},
{"name":"JLifeTime","major":1,"minor":0,"patch":0},
{"name":"JMetadata","major":1,"minor":0,"patch":0},
{"name":"JSubsystems","major":1,"minor":0,"patch":0},
{"name":"JEvents","major":1,"minor":0,"patch":0}
]
}
```


0 comments on commit e959a2a

Please sign in to comment.