Skip to content

0.10.0

Choose a tag to compare

@github-actions github-actions released this 15 Nov 09:37
· 232 commits to main since this release
0.10.0
2d9fdc4

Version 0.10.0

Changelog

  • Bumped minimum GCC to 13.
  • Added mbo/json which adds JSon write support for almost any structured type. If anything is missing it can easily be added on the client side.
  • Added direct support for -fno-exceptions irrespective of config setting.
  • Added support for ASAN symbolizer with --config=clang.
  • Added AbslStringify and hash support to NoDestruct, RefWrap, Required.
  • Added struct OptionalDataOrRef similar to std::optional but can hold std::nullopt, a type T or a reference T&/const T&.
  • Added struct OptionalDataOrConstRef similar to std::optional but can hold std::nullopt, a type T or a const reference const T&.
  • Added struct OptionalRef similar to std::optional but can hold std::nullopt or a reference T&/const T&.
  • Improved Stringify (breaking change):
    • Improved control for Stringify with Json output.
    • Updated StringifyOptions (breaking change).
    • Updated StringifyWithFieldNames (breaking change).
    • Moved StringifyOptions factories to Stringify so they can be constexpr even in C++20.
    • Modified MboTypesStringifyOptions (breaking change) to be more flexible - but users must deal with the change.
    • Added ability to detect bad MboTypesStringifyOptions signatures.
    • Added StringifyFieldOptions which holds outer and inner StringifyOptions.
    • Added Stringify::AsJsonPretty() and StringifyOptions::AsJsonPretty().
    • Added API extension point functoin MboTypesStringifyValueAccess which allows to replace a struct with a single value in Stringify processing.
    • Added Stringify support for empty types and types that match IsStringKeyedContainer.
    • Fixed Stringify null* representations to stream as 'null' as opposed to 0.
    • Added ability to sort string keyed containers.
    • Added function SetStringifyOstreamOutputMode which sets global Stringify stream options by mode.
    • Added function SetStringifyOstreamOptions which sets global Stringify stream options.
    • Changed Stringify::ToString and Stringify::Stream to not depend on any mutable member of Stringify.
  • Improved traits:
    • Added concept ConstructibleFrom implements a variant of std::constructible_from that works around its limitations to deal with array args.
    • Added concept IsEmptyType determines whether a type is empty (calls std::is_empty_v).
    • Fixed concept IsAggregate (breaking change).
    • Added concept IsStringKeyedContainer which determines whether a type is a container whose elements are pairs and whose keys are convertible to a std::string_view.
    • Added concept IsReferenceWrapper determines whether a type is a std::reference_wrapper.
    • Added concept IsSameAsAnyOf which determines whether a type is the same as one of a list of types. Similar to IsSameAsAnyOfRaw but using exact types.
    • Added template struct TypedView a wrapper for STL views that provides type definitions, most importantly value_type. That allows such views to be used with GoogleTest container matchers.
    • Added concept IsOptionalDataOrRef which determines whether a type is a OptionalDataOrRef.
    • Added concept IsOptionalRef which determines whether a type is a OptionalRef.
    • Added function CompareArithmetic which compares two values that are scalar-numbers (including foat/double, excluding pointers and references).
    • Added function CompareIntegral which compares two values that are integral-numbers (no float/double, no pointers, no references).
    • Added function CompareScalar which compares two values that are scalar-numbers (including float/double and pointers, excluding references).
    • Added concept IsArithmetic uses std::is_arithmetic_v<T>.
    • Added concept IsIntegral uses std::integral<T>.
    • Added concept IsScalar uses std::is_scalar_v<T>.
    • Added concept IsFloatingPoint determines whether a type is a floating point type (uses std::floating_point).
    • Added concept ThreeWayComparableTo which is similar to std::three_way_comparable_with but we only verify that L <=> R can be interpreted as Cat in the presented argument order.
  • Added Demangle to log de-mangled typeid names.
  • Added struct Overloaded which implements an Overload handler for std::visit(std::variant<...>) and std::variant::visit (technically moved).
  • Added function CompareFloat which can compare two float, double or long double values returning std::strong_ordering.
  • Added function WeakToStrong which converts a std::weak_ordering to a std::strong_ordering.
  • Fixed some IWYU pragmas.
  • Fixed some template requirements.
  • Fixed bug in mbo::strings::ParseString with access past end of string_view for illegal hex and oct escape sequences (introduced in 0.9.0).
  • Updated various dependencies.
  • Renamed old dependency naming styles to new (matching bzlmod and other deps' needs) styles where possible.
  • Removed WORKSPACE support.

For Bazel MODULES.bazel

bazel_dep(name = "helly25_mbo", version = "0.10.0")

Using the provided LLVM

Copy llvm.MODULE.bazel to your repository's root directory and add the following line to your MODULES.bazel file or paste the whole contents into it.

include("//:llvm.MODULE.bazel")

For Bazel WORKSPACE

load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

http_archive(
  name = "com_helly25_mbo",
  url = "https://github.com/helly25/mbo/releases/download/0.10.0/mbo-0.10.0.tar.gz",
  sha256 = "52d2cfe222244092688b06793d44dec4f8c551b5589f730bb251bc18b8c06b47",
  strip_prefix = "mbo-0.10.0",
)

Initializing the required modules

The project depends on some additional external repositories that can be added
manually of by calling the support functions in the user' WORKSPACE file:

load("@com_helly25_mbo//bzl/workspace:load_modules.bzl", "helly25_mbo_load_modules")

helly25_mbo_load_modules()

load("@com_helly25_mbo//bzl/workspace:init_modules.bzl", "helly25_mbo_init_modules")

helly25_mbo_init_modules()

Initializing optional extra modules

The project further has some re-usable external components:

load("@com_helly25_mbo//bzl/workspace:load_extras.bzl", "helly25_mbo_load_extras")

helly25_mbo_load_extras()  # Adds Hedron + LLVM

load("@com_helly25_mbo//bzl/workspace:init_extras.bzl", "helly25_mbo_init_extras")

helly25_mbo_init_extras()  # Init Hedron + LLVM

load("@com_helly25_mbo//bzl/workspace:init_extras_llvm.bzl", "helly25_mbo_init_extras_llvm")

helly25_mbo_init_extras_llvm()  # Init LLVM/Part 2

What's Changed

Full Changelog: 0.9.0...0.10.0