Skip to content

Commit 08909c6

Browse files
authored
Migrate to version 2.0.0 with breaking coroutine changes (#32)
1 parent c3f0c91 commit 08909c6

File tree

5 files changed

+35
-7
lines changed

5 files changed

+35
-7
lines changed

CHANGELOG.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,34 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [2.0.0] - 2025-03-09
9+
10+
### Changed
11+
12+
- **BREAKING**: Complete migration from blocking calls to Asio coroutines with awaitable interfaces
13+
- **BREAKING**: Method signatures now return `asio::awaitable<>` instead of direct values
14+
- **BREAKING**: Client code must use `co_await` with coroutine functions
15+
- **BREAKING**: Method handlers must be implemented as coroutines
16+
- Refactored transport layer to use asynchronous operations throughout
17+
- Redesigned RPC endpoint to leverage coroutines for all operations
18+
- Transitioned from thread pools to IO context-based execution
19+
- Removed manual thread management in favor of asio's task model
20+
- Improved error handling with exception propagation in coroutines
21+
22+
### Added
23+
24+
- Support for proper cancellation and timeouts via Asio facilities
25+
- New static factory method `CreateClient` for client initialization
26+
- Better documentation and examples for the coroutine-based approach
27+
- LSP client example using TypeScript
28+
- CMake export configuration for easier integration
29+
30+
### Removed
31+
32+
- Synchronous blocking API methods
33+
- Thread pool-based execution model
34+
- Stdio transport (poor fit for asynchronous model)
35+
836
## [1.0.0] - 2024-08-16
937

1038
### Added

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
cmake_minimum_required(VERSION 3.19)
2-
project(jsonrpc-cpp-lib VERSION 1.0.0 LANGUAGES CXX)
2+
project(jsonrpc-cpp-lib VERSION 2.0.0 LANGUAGES CXX)
33

44
# Set C++ standard
55
set(CMAKE_CXX_STANDARD 20)

MODULE.bazel

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ MODULE.bazel file for the jsonrpc module
44

55
module(
66
name = "jsonrpc_cpp_lib",
7-
version = "1.0.0",
7+
version = "2.0.0",
88
)
99

1010
# Dependencies from the Bazel Central Registry

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ Bazel provides a streamlined dependency management experience. To include this l
3535
http_archive = use_repo_rule("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
3636
http_archive(
3737
name = "jsonrpc",
38-
urls = ["https://github.com/hankhsu1996/jsonrpc-cpp-lib/archive/refs/tags/v1.0.0.tar.gz"],
39-
strip_prefix = "jsonrpc-cpp-lib-1.0.0",
38+
urls = ["https://github.com/hankhsu1996/jsonrpc-cpp-lib/archive/refs/tags/v2.0.0.tar.gz"],
39+
strip_prefix = "jsonrpc-cpp-lib-2.0.0",
4040
sha256 = "a381dc02ab95c31902077793e926adbb0d8f67eadbc386b03451e952d50f0615",
4141
)
4242
```
@@ -54,7 +54,7 @@ include(FetchContent)
5454
FetchContent_Declare(
5555
jsonrpc-cpp-lib
5656
GIT_REPOSITORY https://github.com/hankhsu1996/jsonrpc-cpp-lib.git
57-
GIT_TAG v1.0.0
57+
GIT_TAG v2.0.0
5858
)
5959
FetchContent_MakeAvailable(jsonrpc-cpp-lib)
6060
@@ -100,7 +100,7 @@ For projects using Conan for dependency management, create a `conanfile.txt` in
100100

101101
```ini
102102
[requires]
103-
jsonrpc-cpp-lib/1.0.0
103+
jsonrpc-cpp-lib/2.0.0
104104

105105
[generators]
106106
CMakeDeps

conanfile.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
class JsonRpcRecipe(ConanFile):
66
""" Conan recipe for jsonrpc-cpp-lib """
77
name = "jsonrpc-cpp-lib"
8-
version = "1.0.0"
8+
version = "2.0.0"
99
license = "MIT"
1010
author = "Shou-Li Hsu <hank850503@gmail.com>"
1111
url = "https://github.com/hankhsu1996/jsonrpc-cpp-lib"

0 commit comments

Comments
 (0)