Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ on:
sdk_branch:
type: string
description: The branch of the SDK to test
required: false
required: false

env:
SDK_BRANCH_NAME: ${{ inputs.sdk_branch || github.head_ref || github.ref_name || 'main' }}
Expand Down Expand Up @@ -90,9 +90,6 @@ jobs:
with:
repository: ${{ github.event.pull_request.head.repo.full_name || 'Eppo-exp/cpp-sdk' }}
ref: ${{ env.SDK_BRANCH_NAME }}

- name: Verify version consistency
run: ./scripts/check-version-consistency.sh

- name: Set up build environment
run: |
Expand Down
29 changes: 26 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,39 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]
## [2.0.0]

### Changed

- **BREAKING**: `ConfigurationStore::getConfiguration()` now returns `std::shared_ptr<const Configuration>` instead of `Configuration` by value
- Returns an empty configuration when no configuration is set (graceful behavior, no null checks required)
- Eliminates expensive configuration copies on every flag evaluation
- Provides thread-safe reference counting via `std::shared_ptr`
- Configuration is immutable (`const`) once retrieved
- Update your code: use `->` instead of `.` to access configuration methods (no null checks needed)
- **BREAKING**: All error handling is now done through logging and returning default values
- **BREAKING**: Removed `setIsGracefulFailureMode()` method - SDK always operates in "graceful" mode
- **BREAKING**: Removed custom exception classes (`FlagConfigurationNotFoundException`, `FlagNotEnabledException`, `SubjectAllocationException`)
- **BREAKING**: `EppoClient` constructor now takes `ConfigurationStore&` by reference instead of `std::shared_ptr<ConfigurationStore>`, allowing SDK consumers to choose their own synchronization strategy
- SDK now builds with `-fno-exceptions` and does not use exceptions internally
- Configured nlohmann/json with `JSON_NOEXCEPTION` to eliminate JSON parsing exceptions
- Constructor preconditions (null checks, size validations) now use `assert()` instead of throwing exceptions
- Internal functions now return `std::optional` or error codes instead of throwing exceptions

### Added

- Full compatibility with `-fno-exceptions` projects
- Documentation on error handling and constructor preconditions

### Migration Guide

If you were using v1.0.0:

1. Remove all `try-catch` blocks around SDK method calls - they no longer throw
2. Remove calls to `setIsGracefulFailureMode()` - this method no longer exists
3. Update `EppoClient` instantiation - pass `ConfigurationStore` by reference instead of as `shared_ptr`:
- Before: `auto client = std::make_shared<EppoClient>(configStorePtr);`
- After: `EppoClient client(configStore);` (ensure `configStore` outlives `client`)
4. Ensure constructor preconditions are met (non-null loggers, positive cache sizes)
5. Monitor errors through the `ApplicationLogger` interface instead of catching exceptions

## [1.0.0] - 2025-11-14

Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,8 @@ test: test-data
rm -f compile_commands.json
./scripts/generate_compile_commands.sh
@$(MAKE) $(TEST_EXECUTABLE)
@echo "Running all tests..."
@./$(TEST_EXECUTABLE)
@echo "Running all tests (excluding performance tests)..."
@./$(TEST_EXECUTABLE) "~[performance]"

# Clean build artifacts
.PHONY: clean
Expand Down
51 changes: 0 additions & 51 deletions scripts/check-version-consistency.sh

This file was deleted.

9 changes: 7 additions & 2 deletions src/version.hpp
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
#ifndef EPPOCLIENT_VERSION_HPP
#define EPPOCLIENT_VERSION_HPP

#define EPPOCLIENT_VERSION_MAJOR 1
#define EPPOCLIENT_VERSION_MAJOR 2
#define EPPOCLIENT_VERSION_MINOR 0
#define EPPOCLIENT_VERSION_PATCH 0
#define EPPOCLIENT_VERSION "1.0.0"

#define STRINGIFY(x) #x
#define TOSTRING(x) STRINGIFY(x)
#define EPPOCLIENT_VERSION \
TOSTRING(EPPOCLIENT_VERSION_MAJOR) \
"." TOSTRING(EPPOCLIENT_VERSION_MINOR) "." TOSTRING(EPPOCLIENT_VERSION_PATCH)

namespace eppoclient {

Expand Down