Update dependency stephenberry/glaze to v7.7.0 #95
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "renovate/stephenberry-glaze-7.x"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This PR contains the following updates:
7.6.0→7.7.0Release Notes
stephenberry/glaze (stephenberry/glaze)
v7.7.0Compare Source
Compilation-time improvements
This release prioritizes compile time costs. Three subsystems that were previously pulled in transitively by
glaze.hppare now opt-in. If your code usesjmespath,msgpack, orrecorder, you must add an explicit include.Breaking: required includes
jmespathis now opt-ininclude/glaze/json/jmespath.hppis no longer bundled byglaze.hpporglaze/json.hpp.msgpackis now opt-inglaze/msgpack.hppis no longer included by theglaze.hppaggregate header, matching the existing CBOR convention.recorderis now opt-inglaze/record/recorder.hppis no longer included by theglaze.hppaggregate header. This also severs the transitiveglaze/csv.hppchain that recorder pulled into every TU.glaze/json/generic.hppsplit withgeneric_fwd.hppFollowing the same convention as
glaze/forward.hpp: widely-included user headers can now referenceglz::genericvia the lightweight forward-onlyglaze/json/generic_fwd.hpp, deferring the full read/write machinery to the TUs that serialize.glaze/json/generic.hppby @makekryl in #2560Other compilation-time cleanup
A broader pass on header weight and instantiation cost:
New
glaze/forward.hppwith no Glaze dependencies (just<cstdint>). Users who want to specializeglz::meta,glz::to<Format, T>,glz::from<Format, T>, or constructglz::custom_tin widely-included user headers can now include only this and defer the full<glaze/glaze.hpp>include to the TUs that call read/write.<atomic>/<bitset>/<complex>includes incore/common.hppare now gated onGLZ_REFLECTION26(the only code that needed them).unique_per_length_infono longer instantiatesstd::ranges::sortperN. Measured:glz::make_keys_info<20>instantiation drops from 45.1 ms to 26.0 ms with-ftime-trace.boxed<T>insideglz::schemano longer dragsstd::unique_ptr<T>andstd::default_delete<T>instantiations into every TU that includesschema.hpp.Compilation time optimization and cleanup by @stephenberry in #2527
Reduce always inline usage for jsonb and bson by @stephenberry in #2572
perf(progress_bar): build status string withglz::to_chars+memcpyby @stephenberry in #2573TOML: nullables, nested tables, and inline-mode cascading
This release lands four independent TOML fixes that together close most of the long-standing round-trip gaps in the parser and writer.
Inline tables and nullables (read)
The struct reader's inline-table branch now returns after
parse_toml_object_membersconsumes the closing}. Without this, the surrounding,or}of the enclosing inline table was misparsed as the start of a new key, producingunknown_keyerrors on perfectly valid documents:Nullable support is now broadly available for both TOML and YAML, including nested nullable tables and nullable arrays.
nullable_emplaceis consolidated as the single emplacement point.Arrays with newlines (read)
Multi-line arrays were rejected when the parser hit a newline mid-array. They are now accepted, matching the TOML spec.
Map fields and cascade inline mode through nested writers (write)
Struct fields of
std::maptype now emit as inline tables (items = { key = value, ... }) so the output is well-formed TOML in any nesting position. Previously they flowed through the scalar writer and produced output that could not be read back.Inline mode now cascades through every nested writer:
write_inline_valueis the single dispatch point for any value written inside an inline context, andwrite_inline_object,write_inline_map, the array writer'swrite_element, the tuple/glaze_arraywriter, and the struct writer's PASS 1 scalar path all route through it. As a result, struct fields ofvector<struct>,vector<map<...>>,optional<map>,optional<struct>,variant<...struct...>, ortuple<struct, ...>can no longer leak multi-line struct dumps or[[...]]headers inside[ ... ]or{ ... }.Native JSON support for
sys_daysandyear_month_daystd::chrono::year_month_dayhad no JSON specialization at all, andstd::chrono::sys_daysround-tripped as a full datetime. Users had to write aglz::customlambda withstd::chrono::parseto handle simple date fields, which trips compiler bugs on GCC/MSVC. Both now work directly:sys_dayswrites the same"YYYY-MM-DD"shape and accepts either form on read (a full datetime is floored to its UTC date).Breaking change:
write_json(sys_days{...})used to produce"2024-06-15T00:00:00Z". It now produces"2024-06-15". Readers accept both, so upgrading on the read side is safe; producers that emit the new shape break older readers that strictly require a time component.Safety: years outside
[0000, 9999]now fail to serialize witherror_code::constraint_violatedinstead of silently emitting wrap-around digits. This guard also covers the pre-existingsystem_time_pointwriter.sys_daysandyear_month_dayby @stephenberry in #2568HTTP: structured
glz_write_errorfromresponse::body<Opts>When
glz::writefailed insideresponse::body<Opts>(value), the response body was reset to a hardcoded literal{"error":"glz::write_json error"}. Two issues: the underlyingerror_ctx(code + custom message) was discarded, and the literal was appended to any partial payload the failed write had already pushed, producing malformed JSON like{"name":"abc{"error":"glz::write_json error"}.Now the body is cleared before writing the error and a small structured value is serialized:
fix(http): emit structuredglz_write_errorfromresponse::body<Opts>on serialization failure by @genisis0x in #2565CMake:
glaze_INSTALLoptionWhen consumed as a subproject (e.g. via
FetchContent), glaze was unconditionally registering itsinstall()and CPack rules into the parent project, causing glaze artifacts to appear in downstream installers without the consumer opting in.A new
glaze_INSTALLoption defaults to${PROJECT_IS_TOP_LEVEL}. Top-level builds keep the install rules; subproject builds skip them by default. Consumers who want the cascade can setglaze_INSTALL=ON.CMAKE_SKIP_INSTALL_RULESis still honored.glaze_INSTALLoption, default toPROJECT_IS_TOP_LEVELby @stephenberry in #2578Cleanup
chore: fix comment typos acrossinclude/andexamples/by @genisis0x in #2567chore: remove unusedis_schema_classconcept by @genisis0x in #2569Full Changelog: https://github.com/stephenberry/glaze/compare/v7.6.0...v7.7.0
Configuration
📅 Schedule: (UTC)
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR has been generated by Mend Renovate.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.