Skip to content

Commit 004d8b4

Browse files
committed
chore: bump version to 0.6.0 and add CHANGELOG
Version 0.6.0 Release: Major Features: - Deferred reply pattern for GenServer (Erlang-style noreply) - Selective receive with pattern matching (Erlang-style receive) Breaking Changes: - GenServer::handle_call now returns CallResponse<T> Changes: - Bumped version from 0.5.0 to 0.6.0 in workspace Cargo.toml - Updated joerl_macro dependency to 0.6.0 - Created comprehensive CHANGELOG.md following Keep a Changelog format The CHANGELOG documents: - All new features with detailed descriptions - Breaking changes with migration guide - Examples and documentation updates - Technical implementation details - Version comparison links
1 parent 58f4a62 commit 004d8b4

3 files changed

Lines changed: 97 additions & 2 deletions

File tree

CHANGELOG.md

Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
# Changelog
2+
3+
All notable changes to this project will be documented in this file.
4+
5+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7+
8+
## [0.6.0] - 2025-12-10
9+
10+
### Added
11+
12+
- **Deferred Reply Pattern for GenServer** - Full Erlang-style deferred reply support
13+
- Added `CallResponse<T>` enum with `Reply(T)` and `NoReply` variants
14+
- Implemented `ReplyHandle<T>` for sending deferred replies asynchronously
15+
- Server can now accept requests, return immediately, and reply later when work completes
16+
- Multiple concurrent deferred calls supported
17+
- Matches Erlang's `{noreply, State}` and `gen_server:reply/2` semantics exactly
18+
- Breaking change: `GenServer::handle_call` now returns `CallResponse<Self::CallReply>` instead of `Self::CallReply`
19+
20+
- **Selective Receive** - Erlang-style pattern matching for messages
21+
- Added pending queue (`Mutex<VecDeque<Envelope>>`) to `Mailbox` for non-matching messages
22+
- Implemented `recv_matching()` with timeout support
23+
- Implemented `try_recv_matching()` for non-blocking selective receive
24+
- Added three public methods to `ActorContext`:
25+
- `receive(predicate)` - Wait indefinitely for matching message
26+
- `receive_timeout(predicate, timeout)` - Wait with timeout
27+
- `try_receive(predicate)` - Non-blocking check
28+
- Non-matching messages saved to pending queue and checked first on subsequent receives
29+
- Maintains message ordering through `VecDeque`
30+
- Perfect for RPC patterns with correlation IDs
31+
32+
- **Examples**
33+
- `gen_server_deferred_reply.rs` - Job processor demonstrating async work with deferred replies
34+
- `actor_selective_receive.rs` - RPC client/server with correlation IDs using selective receive
35+
36+
- **Documentation**
37+
- Updated `GETTING_STARTED.md` with comprehensive deferred reply and selective receive sections
38+
- Updated `GETTING_STARTED_RU.md` with full Russian translations
39+
- Added code examples, benefits, use cases, and Erlang mappings
40+
- Updated example lists in both English and Russian guides
41+
42+
### Fixed
43+
44+
- Resolved clippy warnings in `actor_selective_receive` example
45+
- Removed unused `monitored` field from `MonitorActor` struct
46+
- Collapsed nested if statements using let-chain patterns
47+
48+
### Changed
49+
50+
- **Breaking**: `GenServer::handle_call` signature changed to return `CallResponse<Self::CallReply>`
51+
- Migration: wrap existing returns in `CallResponse::Reply(value)`
52+
- Example: `state.value``CallResponse::Reply(state.value)`
53+
54+
### Technical Details
55+
56+
- Deferred reply uses `tokio::spawn` for async work without blocking the server
57+
- Selective receive uses `Mutex<VecDeque<Envelope>>` for thread-safe pending queue
58+
- Predicates use `FnMut(&Message) -> Option<T>` for flexible pattern matching
59+
- Timeout support via `tokio::time::timeout_at`
60+
- All new features include comprehensive test suites (12 new tests total)
61+
- All tests passing, code formatted, clippy clean
62+
63+
## [0.5.0] - 2024-12-09
64+
65+
### Added
66+
67+
- Comprehensive Getting Started guides in English and Russian
68+
- Property-based testing with QuickCheck for improved reliability
69+
- Distributed system metrics for telemetry
70+
- Unified `ActorSystem` with transparent distributed support
71+
- Location-transparent messaging (same API for local and remote actors)
72+
- Remote messaging support with full RPC capabilities
73+
- Ping/pong RPC for remote `is_process_alive()`
74+
- Handshake protocol for bidirectional connections
75+
- EPMD (Erlang Port Mapper Daemon) client and server implementation
76+
- Custom telemetry providers support
77+
- Memory tracking for actors and mailboxes
78+
79+
### Changed
80+
81+
- Deprecated `DistributedSystem` in favor of `ActorSystem::new_distributed()`
82+
- Cleaned up CI verbosity and deprecated struct documentation
83+
- Migrated to unified ActorSystem architecture
84+
85+
### Fixed
86+
87+
- Resolved clippy warnings in distributed.rs
88+
- Various documentation consistency improvements
89+
90+
## Earlier Versions
91+
92+
For earlier version history, see the git commit log.
93+
94+
[0.6.0]: https://github.com/am-kantox/joerl/compare/v0.5.0...v0.6.0
95+
[0.5.0]: https://github.com/am-kantox/joerl/compare/v0.4.0...v0.5.0

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ members = ["joerl", "joerl_macro"]
33
resolver = "2"
44

55
[workspace.package]
6-
version = "0.5.0"
6+
version = "0.6.0"
77
edition = "2024"
88
authors = ["Aleksei Matiushkin <am@ambment.cat>"]
99
license = "MIT"

joerl/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ async-trait = "0.1"
1919
dashmap = "6.1"
2020
parking_lot = "0.12"
2121
futures = "0.3"
22-
joerl_macro = { version = "0.5.0", path = "../joerl_macro" }
22+
joerl_macro = { version = "0.6.0", path = "../joerl_macro" }
2323
bincode = "1.3"
2424
serde = { version = "1.0", features = ["derive"] }
2525
once_cell = "1.20"

0 commit comments

Comments
 (0)