Skip to content

v4.0.0

Compare
Choose a tag to compare
@kp-cat kp-cat released this 04 Apr 09:17
· 10 commits to main since this release
ac7f452

Added

  • Support for the new Config JSON v6 format: updated the config model and implemented new features in setting evaluation logic.
  • Overhaul setting evaluation-related logging and make it consistent across SDKs.
  • Improve consistency of config JSON deserialization error reporting.
  • Performance improvements to setting evaluation (building of evaluation log is expensive, so it is skipped when info level logging is turned off).

Breaking changes

  • ConfigCatClient.get returns std::shared_ptr<ConfigCatClient> instead of raw pointer.
  • getValue functions expect const std::shared_ptr<ConfigCatUser>& as user param instead of const raw pointer.
  • The generic getValue function returns std::optional<Value> instead of std::shared_ptr<Value>. In case of any failure, std::nullopt will be returned.
  • getKeyAndValue function returns std::optional<KeyValue> instead of std::shared_ptr<KeyValue>.
  • Hooks callback changes:
    • onError reports the occurred exception with const std::exception_ptr& argument.
    • onFlagEvaluated callback's argument is changed to const EvaluationDetailsBase& from const EvaluationDetails&.
  • Renamed RolloutRule to TargetingRule.
  • Renamed RolloutPercentageItem to PercentageOption.
  • EvaluationDetails changes:
    • matchedEvaluationRule is renamed to matchedTargetingRule.
    • matchedEvaluationPercentageRule is renamed to matchedPercentageOption.
    • Introduced std::exception_ptr errorException.
    • Introduced std::shared_ptr and std::optional types instead of const ref/pointers.
  • Introduced ResponseErrorCode instead of bool operationTimedOut in Response struct.
  • Logging changes:
    • Log level names are now in capital format to follow other ConfigCat SDKs.
    • The Log function now gets const std::exception_ptr& exception as an argument. unwrap_exception_message function can be used to get the message of this exception.
  • The custom init parameter of ConfigCatUser now accepts std::string, double, std::chrono::system_clock::time_point, std::vector<std::string> typed values, not just strings. This allows the usage of various types in the user object's custom attributes.
  • Introduced datetime_to_isostring and make_datetime(int year, int month, int day, int hour, int min, int sec, int millisec) helpers in timeutils.h