All notable changes of AnCH Framework are documented in this file.
The format is based on Keep a Changelog. Versions are numbered A.B.C: until 1.0.0, API and ABI can change on every B change (shared libraries SONAME is libanch-<name>.so.A.B); from 1.0.0, A changes break API, B changes add features and C changes fix bugs.
Deprecation policy: until 1.0.0, APIs are changed or removed directly, without deprecation (see Breaking changes). From 1.0.0, B and C versions keep backward compatibility: a deprecated API is marked with [[deprecated("...")]] and \deprecated in its documentation, which give its replacement, and it is removed in the next A version.
Breaking changes
- anch-date: anch::date::Date (a point in time) is renamed anch::date::DateTime (date/dateTime.hpp); anch::date::Date (date/date.hpp) is a calendar day (0000-01-01 to 9999-12-31, always valid) which replaces std::chrono::year_month_day: RFC 3339 full-date (rfc3339::parseDate, formatDate), anch-json, anch-csv, anch-val scalars and anch-oas date format use it. It is ordered, days, months and years can be added (plusDays, plusMonths, plusYears, daysUntil), it is parsed and formatted (parse, format, operator<<) and explicitly converted from and to year_month_day and sys_days; conversions with points in time give the time zone (anch::date::Zone: DateTime::date(zone), Date::startOfDay(zone), Date::today).
- anch-date: DateTime only holds its point in time (8 bytes instead of 12 fields and a virtual destructor): its broken down representation is computed by fields(zone) (DateFields: local time or UTC, months 1-12, ISO weekday). The default constructor is epoch (DateTime(bool init = true) is removed: DateTime::now() gives the current time) and DateTime(const DateFields&) builds a point in time from local fields. IDatePartFormatter formats and parses DateFields (its protected accessors are removed): DateFormatter computes them once.
- anch-date: anch::date::Time (date/time.hpp) is a time of day (00:00:00 to 23:59:59.999999999, without time zone, always valid): RFC 3339 partial-time (rfc3339::parseTime, formatTime, Time::parse, format, operator<<), ordered, plus (wraps around midnight), now(zone), explicit conversion to the duration since midnight; conversions with points in time give the time zone (DateTime::time(zone), Date::at(time, zone)). anch-json, anch-csv and anch-val (scalar) map it. Date::startOfDay(Zone::UTC) checks the range of points in time (an out of range day overflowed).
- anch-sql: anch::sql::Time is removed: TIME columns and parameters are anch::date::Time (ResultSet::get<anch::date::Time>); ResultSet::getTimeFormatter and getDefaultTimeFormatter are removed.
- anch-sql: anch::sql::Date and anch::sql::Timestamp are removed: DATE columns and parameters are anch::date::Date (years before 1678 can be read), timestamps are anch::date::DateTime (ResultSet::get<anch::date::Date>, get<anch::date::DateTime>); ResultSet::getDateFormatter and getDefaultDateFormatter are removed.
- anch-sql: the SELECT builder generates named parameters from columns (t.id = :t_id, BETWEEN :t_id_min AND
:t_id_max, _2, _3, ... for a name already used); merged clauses, subqueries and unions rename their colliding names and keep their parameters (UNION and IN / EXISTS subqueries lost them). SQLQuery holds Parameters (getParameters() replaces getValues()). ClauseMaker receives the parameters names (equals(column, names), ...); the exists and notExists clause makers and the isValidValue specializations of SelectBuilder, SQLQuery and Fluent (which bound SQL text as values) are removed: isValidValue accepts every Bindable value (an empty std::optional or string skips the clause) and values are const. Connection::batchUpdate maps each value to Parameters (std::function<void(Parameters&, const T&)>).
- anch-sql: prepared statements use named parameters (:name) instead of ?: ? (and PostgreSQL $1, SQLite ?1, @name, $name) are refused. PreparedStatement::set(name, value) and setNull(name) replace set(idx, value) and setNull(idx); set(Parameters), getParameterNames() and getQuery() are added; every missing parameter is reported by name before execution, an unknown name when it is bound. Connection::query, queryMapRow, queryExtract and update take Parameters instead of positional values (the parameters of previous executions of a cached statement are not reused). A name used several times is bound once (MySQL: each ? points to the same value). PostgreSQL jsonb ? operators can be used in prepared statements; PQdescribePrepared is no longer called. findPlaceholders and numberPlaceholders are removed.
- anch-json: Factory<T>::getInstance() returns a constant mapper: fields are registered once, when the mapper is built from the description of the type (registerField could change the shared mapper of a type afterwards).
- anch-val: Violation::path is an anch::val::Path (segments: field names, map keys and items indexes) instead of a JSON Pointer string: path.pointer() formats it as a JSON Pointer (also written by operator<<), other formats (XML) will format the segments their way.
- anch-val: validate refuses at compile time fields whose class is neither described nor a scalar (their description is probably not visible: it was silently not validated); anch::val::IsScalar<T> declares value types (numbers, enumerations, strings, UUID, dates and std::chrono types are scalars), anch::val::Validatable<T> tells whether a type can be validated. Descriptions (anch::Mapping<T>) have to be declared in the header of their type.
- anch-json: anch::json::validate and isValid are replaced by anch::val::validate and isValid (anch-val, val/validation.hpp), which validate the common description of objects (anch::Mapping) without format.
- anch-json: anch::json::registerObject is removed: types are described by an anch::Mapping<T> specialization (anch-utils, mapping.hpp), shared by formats, whose registerObject(anch::ObjectMapper<T> auto& mapper) function registers the fields. Fields of std::optional, pointers, collections and maps are mapped with the mapper of their value type: the explicit mapper type forms (registerField<MapperType>(...), getters and setters registerField<P, MapperType>(...)) are removed, descriptions only use the forms of the anch::ObjectMapper concept, common to formats. Code generated by anch-oas declares the descriptions in the models header (the source only holds enumeration mappers).
- anch-json: fields constraints have moved to anch-val, without deprecated aliases: anch::json::required, minLength, maxLength, pattern, format, minimum, maximum, exclusiveMinimum, exclusiveMaximum, multipleOf, minItems, maxItems, uniqueItems, minProperties, maxProperties, allowed, items, custom, their types, setPatternCompiler, registerFormat, Violation, ValidationContext, StringLike, MapLike, Collection, Number are in anch::val (header val/constraints.hpp). anch::json::validate and isValid are unchanged and return anch::val::Violation. Code generated by anch-oas uses anch::val.
- anch-crypto: CTR follows NIST SP 800-38A, as OpenSSL: the nonce is the initial counter block, incremented as a big endian integer of the block size for each block. Data ciphered by previous versions can not be deciphered: the index of the block was written in the 2 last bytes of the nonce, in the CPU byte order, and the key stream was reused every 65536 blocks (1 MiB with AES). The block index of modes of operation (cipherBlock, decipherBlock) is a uint64_t.
- anch-json: strings are read as RFC 8259 and RFC 3629 require: unescaped control characters (below 0x20) and invalid UTF-8 (invalid bytes, truncated sequences, overlong encodings, surrogates, code points above U+10FFFF) are refused with ErrorCode::INVALID_FORMAT. Strings of ignored fields are checked as mapped ones, escape sequences included.
- anch-rest: ThriftCodec::deserialize and Protobuf::deserialize take the Side which reads the body; server side Protobuf, Protobuf JSON and Thrift bodies are bounded by anch::codec::maxBodySize (2 MiB by default, as JSON and form bodies; 413 above).
- anch-rest: codecs have moved to anch-codec, without deprecated aliases: anch::rest::Json, Text, Side, MediaType, ContentTooLarge, Serializer, Deserializer, contentTypeOf, readContent, negotiate, anch::rest::media::*, Protobuf, ProtobufJson, ProtobufMessage, ThriftStruct, ThriftProtocol, ThriftCodec, ThriftBinary, ThriftCompact, ThriftJson, thriftMediaType, thriftProtocolOf, thriftProtocol, thriftWrite, thriftRead have the same names in anch::codec; anch::rest::serializeBody and deserializeBody are anch::codec::serialize and deserialize. Headers rest/codec.hpp, rest/mediaType.hpp, rest/jsonCodec.hpp, rest/protobufCodec.hpp, rest/thriftCodec.hpp are replaced by codec/codec.hpp, codec/text.hpp, codec/mediaType.hpp, codec/json.hpp, codec/protobuf.hpp, codec/thrift.hpp (anch::rest::BodyStream is in rest/bodyStream.hpp). anch-rest-common depends on anch-codec-json, anch-rest-protobuf and anch-rest-thrift on anch-codec-protobuf and anch-codec-thrift (their codecs are no longer part of them); anch-rest-thrift is header only. ANCH_REST_PROTOBUF and ANCH_REST_THRIFT only build RPC libraries, the codecs are built according to ANCH_CODEC_PROTOBUF and ANCH_CODEC_THRIFT. Code generated by anch-oas uses the anch-codec names and headers.
- anch-ut: ut/socketClientRunner.hpp and ut/socketServerRunner.hpp (not implemented) are no longer installed, and the unimplemented --runner, --start, --stop and --gen-ctest options are removed.
- anch-ut: the deprecated anch::ut::assert alias is removed: use anch::ut::assertThat.
- anch-cli: the first -- ends options (POSIX convention); next arguments, -- included, are positional arguments. Each -- used to toggle options parsing.
Added
- anch-date: anch::date::OffsetTime (date/offsetTime.hpp): a time of day with a fixed offset from UTC (-23:59 to +23:59), RFC 3339 full-time (rfc3339::parseFullTime, formatFullTime, OffsetTime::parse, format, operator<<), the time format of JSON schema and OpenAPI. == compares the time and the offset, isSameInstant the UTC times, order compares the UTC times on the same day then the local times; utc(), withOffset(offset), now(zone). Conversions with points in time need no time zone: Date::at(OffsetTime), DateTime::offsetTime(zone) (design in anch-date/offset-time.todo).
- anch-sql: result rows read as described objects (anch::Mapping<T>) or values: Connection::queryList<T> (all the rows), queryOne<T> (the only row: std::nullopt without row, non fatal error with several rows) and queryEach<T> (one row at a time), without parameter, with Parameters or with fieldsOf; readRow and rowAs<T> read the current row of a result set. Columns fill the fields of the same names, ASCII case ignored (RowMapper<T>: members and setters; other columns are ignored, fields without column keep their value, a NULL column needs a std::optional field, fields which can not be read are refused at compile time, concepts ReadableScalar, Readable and Row); a value (queryList<int64_t>) is read from the first column.
- anch-sql: booleans and floating point numbers in result sets: ResultSet::get<double>, get<float> (PostgreSQL NaN and Infinity included) and get<bool> (1 / 0, t / f, true / false); bool parameters (1 / 0, only bool values: pointers are not booleans). ResultSet::columns() and columnIndex(name) give the columns names (design in anch-sql/described-results.todo).
- anch-sql: std::chrono::system_clock points in time parameters and fields (std::chrono::sys_time<Duration>: sys_seconds, sys_days, ...): toParameter binds them as anch::date::DateTime (milliseconds, local time), ResultSet::get<std::chrono::sys_time<Duration>> reads them as DateTime rounded down to their precision (anch::sql::SystemTimePoint). Points in time of other clocks are refused at compile time.
- anch-sql: UUID parameters and fields with ANCH_UUID (option shared with anch-json and anch-csv: anch-sql depends on anch-uuid): toParameter(const anch::UUID&) binds the canonical form (PostgreSQL uuid, MariaDB UUID, CHAR(36) columns ; lists are PostgreSQL uuid[] arrays), ResultSet::get<anch::UUID> reads it (an invalid UUID is a non fatal SqlException). The specializations of ResultSet::get are declared in sql/resultSet.hpp (design in anch-sql/uuid-time-points.todo).
- anch-sql: named parameters (:name) analysis, anch::sql::NamedQuery: a query is parsed once (string literals, quoted identifiers, comments, PostgreSQL casts ::, array slices and jsonb ? operators, MySQL := are not parameters) and rendered in the parameters style of a driver (ParameterStyle: PostgreSQL $1, SQLite ?1, MySQL ?); a name used several times is bound once, a list bound to IN (:ids) is a PostgreSQL array (= ANY($1), <> ALL($1) for NOT IN) or is expanded (IN (?, ?, ?), an empty list is an empty subquery); positional parameters (?, $1, SQLite @name and $name) are refused. Prepared statements of every driver use it (design in anch-sql/named-parameters.todo). anch::sql::Parameters gives the named parameters of a query ({{"id", 3}, {"name", "Rex"}} or Parameters().add("id", 3).addNull("email")), toParameter converts values and Bindable tells which values can be bound (integers, floating point numbers, strings, SQL dates and std::optional of them). Objects described by their common description (anch::Mapping<T>) are SQL parameters: fieldsOf(object) binds each parameter of a query to the field of the same name (FieldsMapper<T>: members and getters ; the other fields are ignored, fields which can not be bound are refused at compile time), taken by Connection::query, queryMapRow, queryExtract, update, and batchUpdate(query, objects) binds each described object of a range. Lists of values (std::vector, std::list, std::set, ...: BindableList) can be bound: IN (:ids) is rewritten in = ANY($1) (<> ALL($1) for NOT IN) with a PostgreSQL array (one prepared statement whatever the list size), and is expanded (IN (?, ?, ?), the statement is prepared again when the size changes, an empty list is an empty subquery) for MySQL and SQLite; the builder in and notIn clauses take lists (an empty list skips the clause).
- anch-utils: common description of objects for every format (mapping.hpp): anch::Mapping<T> (specialized with a registerObject(anch::ObjectMapper<T> auto& mapper) function), anch::ObjectMapper<M, T> concept (fields registered with a member pointer, a getter, a setter or both), anch::Described<T> and anch::describe<T>(mapper). anch-json reads it (its mappers satisfy anch::ObjectMapper, their registerField functions are public).
- anch-val: fields constraints shared by formats (out of anch-json) and their checks in a context (CheckContext<X>, specialized by formats: anch-json reader and writer contexts, ValidationContext); objects validation on their description (validate, isValid, ValidationMapper<T>); uuid, date-time and date formats with anch-uuid and anch-date as optional dependencies (ANCH_UUID, ANCH_DATE). XSD facets: length (code points of strings, items of lists), totalDigits and fractionDigits (numbers and decimal strings), xsdPattern (XSD patterns, matched on the whole value) with a pattern compiler by syntax (PatternSyntax, setPatternCompiler(syntax, compiler)); the default XSD compiler translates patterns to std::regex and refuses Unicode properties and character class subtractions.
- anch-csv (option ANCH_BUILD_CSV, ON): CSV records reading and writing (RFC 4180) as streams. Reader reads one record at a time (fields as std::string_view, empty and empty quoted fields distinguished, CRLF and LF, BOM skipped, limits of record size and columns count), Writer quotes fields when needed (writeRow formats numbers with std::to_chars), Options (separator, quote, line ending, header, BOM), CsvError (code, line and column). libFuzzer target csv. The former CMake files (out of the build) are removed. Objects mapping on their common description (anch::Mapping): ObjectReader<T> (columns by name or by position: without header, each registered field is a column for reading and writing, getter only and setter only fields included; unknown columns ignored or refused, required columns, conversion and anch-val constraints errors with line and column) and ObjectWriter<T> (header, absent values as empty fields, empty strings as ""); fields are strings, booleans, numbers, UUID, dates or std::optional of them. records<T>(input) reads objects one by one (input range), deserialize and serialize read and write vectors (and ranges). Options::maxSize bounds the read input. anch-csv depends on anch-utils and anch-val (anch-uuid and anch-date with ANCH_UUID and ANCH_DATE).
- anch-codec: codecs shared by anch-rest and future libraries (messaging), out of anch-rest. The core (anch::codec) has no format dependency: codec concepts, MediaType and Accept negotiation, limits, Side (trust policy), Text, Codecs<...> (codec of a content type or of a negotiation among a list resolved at compilation) and formats registry (formats()). Formats are plugins built according to their option: anch-codec-json (Json, ANCH_CODEC_JSON), anch-codec-protobuf (Protobuf, ProtobufJson, ANCH_CODEC_PROTOBUF) and anch-codec-thrift (ThriftBinary, ThriftCompact, ThriftJson, ANCH_CODEC_THRIFT). codec/all.hpp (target anch::codec-all) is generated with the plugins built and declares anch::codec::Available; Json handles the types the format maps (anch::json::Mappable<T>: primitives, enumerations, described types and their containers), Protobuf messages and Thrift structures are left to their codecs. Data formats (DataFormat, FormatSerializer, FormatDeserializer concepts) get a generic codec, FormatCodec<F>, whose side options are configured by FormatPolicy<F> (specialized by plugins, which also translate errors): anch::codec::Json is FormatCodec<anch::json::JsonFormat> (format type anch::json::JsonFormat, json/format.hpp), and the new anch-codec-csv plugin (ANCH_CODEC_CSV) provides anch::codec::Csv, FormatCodec<anch::csv::CsvFormat> (text/csv, lists of described objects, format type anch::csv::CsvFormat, csv/format.hpp).
- anch-codec: anch::codec::maxBodySize(Side) and readBody (bodies read in memory by Protobuf and Thrift codecs, 0 for no limit) and Protobuf::read(message, std::string_view).
- anch-utils: anch::tryConvert<N>(std::string_view) converts a string to a number without exception (std::expected<N, std::errc>), with the rules of anch::convert; anch-cli, anch-ini and anch-rest use it.
- anch-rest: TransportConfig::maxResponseSize bounds the response body read in memory by the client (64 MiB by default, 0 for no limit).
Changed
- anch-val: a pattern (pattern, xsdPattern) is compiled once for every format (each format registers the description of a type: JSON, CSV and validation compiled it each time); its matcher is shared until the compiler of its syntax is changed (setPatternCompiler).
- anch-oas: inconsistent constraints (minLength greater than maxLength, minItems greater than maxItems, minProperties greater than maxProperties, minimum greater than maximum) and required properties missing from properties are reported with a warning (error with --strict).
- anch-rest is built by default (ANCH_BUILD_REST is ON); anch-rest-curl is skipped with a CMake status message when libcurl is not found, as Protobuf, gRPC and Thrift libraries.
- anch-rest: the nginx module integration test covers HTTP/2 (h2c).
- anch-log: ANCH_LOG_MIN_LEVEL also applies to level methods (trace, debug, ...): messages in lower levels are removed at compile time, as with the stream API. anch::log::MIN_LEVEL is declared in log/levels.hpp.
- ANCH_NATIVE_ARCH (-march=native) is OFF by default: binaries built for the build machine CPU may not run on other CPUs (installed packages, CI runners sharing a compilation cache).
- Documentation examples are compiled, and run when they need neither database nor network service: they are files of <module>/examples/ (ANCH_BUILD_EXAMPLES, ON with tests) included in documentation with \snippet. Fixed examples: anch-ini (std::optional written to a stream), anch-json (missing includes), anch-utils (convert raises std::bad_cast), anch-oas (service with every operation of its document), anch-ut (caption).
- Doxygen documentation is no longer committed under docs/: doxygen Doxyfile writes it in build/docs (build/ has to exist), the docs workflow generates it (warnings are errors) and deploys it to GitHub Pages from master.
- anch-log: LoggerFactory::getLogger takes a std::string_view: GCC 13 reported a possibly dangling reference (-Wdangling-reference) on const Logger& LOG = LoggerFactory::getLogger("name");, the documented usage.
- Release builds use an explicit optimization level, ANCH_OPTIMIZATION_LEVEL (3 by default, 1 to 3), instead of CMake default flags. New asan-clang preset: Clang in Release with -O2, AddressSanitizer and UndefinedBehaviorSanitizer (also run by the CI).
Fixed
- anch-sql: conversion errors of ResultSet::get<T>(idx) for integers named int64_t whatever the requested type.
- anch-sql: MySQL prepared statements without parameter (and result sets without column) called memset on a null pointer (undefined behavior: crash of optimized Clang builds).
- anch-sql: a prepared statement used by an alive result set is no longer executed again by a nested query with the same SQL text (with SQLite, the outer result set was reset at each row and the loop never ended): an other statement is prepared. A PostgreSQL statement invalidated by the server (cached plan must not change result type after a schema change, statement deallocated by DISCARD ALL) fails once and is prepared again by the next prepareStatement, instead of failing until it is evicted from the cache.
- anch-date: Date(std::time_t) and Date(std::timespec) raise std::invalid_argument for dates out of years 1678 to 2261 (as Date(const std::tm*)) instead of aborting, and refuse a tv_nsec out of [0, 999999999].
- anch-rest: a Content-Length header followed by other characters (12abc) is ignored instead of being read as its numeric prefix (HEAD responses with nginx, request bodies of CurlTransport).
- anch-oas: bounds, multipleOf and enumeration values outside double range are ignored with a warning (generated code did not compile); ?? in descriptions and patterns no longer produces trigraphs in generated code.
- anch-rest: multipart names and file names keep backslashes (only escaped quotes and backslashes are escape sequences) and decode %22, %0D and %0A as browsers encode them; every value of multi-valued RPC response metadata is sent (Connect and gRPC-Web); HEAD responses have the Content-Length of the GET response instead of 0 with nginx.
- anch-rest: CurlTransport rewinds streamed request bodies to follow 307 / 308 redirections and refuses request headers with CR, LF or NUL (header injection).
- anch-crypto: MD5, SHA1 and SHA-2 classes hid the data hashing methods of Hash (digest(const std::string&), digest(const uint8_t*, std::size_t), digest(std::istream&), ...): a hash object can be reused.
- anch-crypto: MD5 computed its buffer offset in 32 bits words instead of bytes when data was added to a partially filled block (wrong digest and out of bounds write; not reached by digest methods, undefined behavior on each call). Software AES no longer accesses its state through a uint32_t pointer (strict aliasing).
0.2.0 - 2026-11-19
Version 0.2 is a stabilization of the whole framework: single CMake project, C++23, rewritten libraries (anch-network, anch-date, anch-rest), many fixes found by analyses, sanitizers and fuzzing, and a continuous integration. Version 0.1 was never tagged: this section compares with the code before 2026-10-27.
Breaking changes
Build and packaging:
- C++23 and GCC >= 13 (or Clang) are required. The build is a single CMake project (CMake >= 3.25) with presets: consumers use find_package(Anch) and anch::<name> targets (anch::conf, anch::log, ...).
- Shared libraries are built with hidden symbols visibility: only classes, functions and variables marked with the ANCH_<NAME>_EXPORT macros (generated anch-<name>-export.hpp headers) are exported. Helpers defined in source files have internal linkage and are no longer exported in the global namespace.
- Shared libraries SONAME is libanch-<name>.so.0.2.
Libraries:
- anch-utils: Singleton<T> prohibits copy and move, has protected constructor and destructor and checks that T inherits from it. ThreadPool is rewritten with persistent workers: add() returns false when the task is rejected, the destructor drops queued tasks. convert takes a std::string_view and refuses negative values for unsigned types and out of range values. Optional inherits publicly from std::optional.
- anch-events: EventBus::fireEvent no longer blocks (it behaves as former scheduleDeferred) and the bus uses a permanent thread; Observer has a virtual destructor.
- anch-network: rewritten. TcpStream is a std::iostream, TcpServer accepts connections as TcpStream, UdpSocket sends and receives datagrams, IPv4 and IPv6 are supported, IOException derives from std::system_error. Message based TcpSocket, SocketEvent events, TcpStreamServer / TcpStreamClient and Windows definitions are removed.
- anch-date: rewritten on std::chrono. Constructors and conversions are explicit, DateFormatter is not copyable and its parse(str) returns the Date by value; the 11 per field formatter classes are replaced by internal classes. Parsing is strict.
- anch-uuid: deprecated methods are removed; UUID is a 16 bytes value type.
- anch-cli: bindNum refuses empty and out of range values, bindIFS / bindOFS refuse files which can not be opened, a multiple positional argument has to be the last one. Formatting is disabled when the output is not a terminal, when NO_COLOR is set or when ANCH_CLI_NO_FMT=1.
- anch-ini: spaces before = are no longer part of the key; getValue<bool> accepts only true and false (case is ignored) and raises ParserError (BAD_CAST) otherwise; commented lines containing = are ignored and empty values are read.
- anch-conf: profiles are given by ANCH_PROFILES and the default-profiles key (default-profile is still accepted); loading order is main file, includes, then each profile of each file. anch-conf no longer depends on anch-events.
- anch-log: FormatterType::ANCH_DATE is renamed PRECISE_DATE (it clashed with the ANCH_DATE definition of anch-json); LoggerFactory diagnostics are written on standard error.
- anch-json: data after the root value is refused (INVALID_FORMAT), a trailing comma in objects is refused, deserialize_max_field_char (never applied) is removed and max_payload raises the new PAYLOAD_TOO_LARGE error code instead of POTENTIAL_OVERFLOW. anch::date::Date and std::chrono::year_month_day are mapped to RFC 3339 strings when ANCH_DATE is defined.
- anch-sql: Connection::release() (called when a connection goes back to its pool) rolls back the current transaction: a transaction is committed only by commit(). Prepared statements refuse unbound parameters and invalid indexes; fatal errors invalidate the connection.
- anch-crypto: Hash no longer keeps a _digest pointer: digest(...) methods return the virtual digest().
- anch-ut: assertions in threads have to go through ThreadErrors; tests run in registration order; runner options which are not implemented are refused.
- anch-rest: rewritten (HTTP model, server API, client, libcurl transport, nginx module); it is still not built by default (ANCH_BUILD_REST). The nginx module C ABI is at version 2: request and response bodies are streamed.
Added
- Build: CMake presets release, debug, no-db, asan, tsan, clang, coverage and fuzz; installation with a CMake package and relative RPATH (ANCH_INSTALL_RPATH); ANCH_LOG_MIN_LEVEL option.
- Continuous integration: GCC and Clang release builds, GCC 13 on Ubuntu 24.04, AddressSanitizer, UndefinedBehaviorSanitizer and ThreadSanitizer, installation test with shared and static libraries, coverage, libFuzzer targets (JSON, multipart, forms, media types, UUID, dates, Base64, INI), nginx module integration test and exported symbols check (cmake/check-exports.sh).
- anch-utils: ResourcePool serves waiting borrowers in arrival order.
- anch-events: EventHandler::unsubscribe.
- anch-date: RFC 3339 date-time and full-date formatting and parsing (anch::date::rfc3339).
- anch-device: network interfaces listed with getifaddrs (every interface, IPv6), NetworkInterface::isUp() and getIpv6Addresses(); CPU detection compiles on non x86 architectures.
- anch-log: stream API with compile-time levels (LOG << anch::log::lvl::debug << ...); max-size with units and max-rotate-files.
- anch-conf: configuration cascade (includes and profiles) and event driven placeholders resolution (${resolver=argument|default}) with cycle detection.
- anch-json: required fields and value constraints (lengths, bounds, patterns, formats, ...), validate() / isValid(), JSON Pointer path in MappingError.
- anch-sql: SQL lexical scanner for placeholders, bounded prepared statements cache (LRU).
- anch-ut: assertion format checked at compile time (assertThat), failure location, ThreadErrors.
- anch-rest: content negotiation, forms, multipart/form-data (streamed parts), CORS, constraints checks by side, Protocol Buffers, gRPC-Web / Connect and Apache Thrift codecs and RPC.
- anch-oas: OpenAPI 3.0 models, constraints and anch-rest endpoints (server and client) generator (anch-oas-gen).
Deprecated
- anch-ut: anch::ut::assert (conflicts with the <cassert> macro), replaced by anch::ut::assertThat; removed in 0.3.
Fixed
Most fixes are described in the ANALYSE.md files of each library. Main ones:
- anch-utils: ThreadPool threads which could outlive the pool, ResourcePool concurrency issues, Fluent copies, Flux readiness.
- anch-events: deadlocks and crashes when a handler used its bus or observable.
- anch-network: use-after-free and buffer overflow of the former sockets.
- anch-cutils: data corrupted in read / write mode, partial writes and write errors.
- anch-log: default pattern which did not write the message, MDC, LowPriorityWriter, file rotation, writers per logger, concurrent getLogger.
- anch-date: daylight saving time added twice, timespec milliseconds, y and h, years outside 1678-2261.
- anch-json: 0 refused, numeric overflows, unescaped / undecoded strings, unbounded recursion, ignored max_payload, ignored objects with several fields; lost wake-up in Flux serialization.
- anch-uuid: parsing validation, RFC 9562 compliant v3 / v5, monotonic v7.
- anch-sql: prepared statements placeholders, MySQL fatal errors never detected, DATE / TIME / TIMESTAMP columns read as the current date, transactions left open in pools.
- anch-crypto: out of bounds read in AES-192, uninitialized read and digest overflow in SHA-2, null SHA-1 digest, Base64 decoding of binary data and unpadded input.
- anch-conf: infinite loop with two profiles or includes.
- anch-ini: commented key / value lines read as values.
- anch-cli: out of range values, repeated options, ANSI codes in exception messages.
0.1
First version, never tagged: libraries written since 2012 (C++11 standard at first), built library by library.