Update dependency biojppm/rapidyaml to v0.16.0 - #1801
Update dependency biojppm/rapidyaml to v0.16.0#1801dashql-renovate[bot] wants to merge 1 commit into
Conversation
|
@copilot fix this: |
Fixed in commit 7cd1a9d: updated Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
8b6b0d6 to
d4bf464
Compare
|
Seems like rapidyaml changed something for string literals: @copilot Check and fix |
... Fixed in 16b380f. I updated Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
16b380f to
d1ae486
Compare
d1ae486 to
88ae1c2
Compare
88ae1c2 to
c3c3827
Compare
c3c3827 to
6dec7e7
Compare
6dec7e7 to
2287296
Compare
2287296 to
c4df4bc
Compare
This PR contains the following updates:
0.12.1→0.16.0Release Notes
biojppm/rapidyaml (biojppm/rapidyaml)
v0.16.0: Release 0.16.0Compare Source
TL;DR
This release focuses on API cleaning and tidying, in preparation of release 1.0:
Tree(not justNodeRef/ConstNodeRef)The API cleanup introduces a number of deprecations, and some other opt-in but recommended changes: see the migration guide in the next section.
Finally there are other fixes and improvements: see the full changelog, below the migration guide.
Migration guide
This is the list of migration changes, linking to the relevant section below:
.to_val()method family for tree buildingRYML_WITH_LEGACY_OPERATORSto avoid the deprecation):|=or=<<or>>read()should now returnReadResultread()/write()should now receiveTreeand id.load()(former>>) insideread().deserialize_child()insideread()Be sure to also read through the quickstart diff for the full overview on how the new features work.
Deprecate
.to_val()familyFor tree building, methods
.to_*()were deprecated in favour of the newly-added.set_*()methods. See next section.Deprecate operators |= and =
For tree building,
operator|=andoperator=were deprecated in favour of the newly-added.set_*()methods:If you prefer to keep on using the legacy operators
=,|=,<<,>>, you can enable the cmake symbol (or define the macro)RYML_WITH_LEGACY_OPERATORS.Deprecate operators << and >>
For serialization,
operator<<andoperator>>were deprecated in favour of.set_serialized()and.deserialize()(which introduce return on error) or.save()and.load()(which trigger error callback on error):If you prefer to keep on using the legacy operators
=,|=,<<,>>, you can enable the cmake variable (or define the macro)RYML_WITH_LEGACY_OPERATORS.The rest of the changes are optional, but recommended. If you don't do these changes, your code will go on working as before, but the new features and improved behavior will not be available.
Optional: user-implemented
read()should now returnReadResultYour
read()functions should now return ac4::yml::ReadResult. This enables reporting the exact node on which a deserialization error happens, even if it is nested deep in the tree, which in turn helps tremendously pinpointing problems in YAML source (especially with location tracking):If you don't change, rapidyaml will still report the error, but on the node of the outer-most function returning false, instead of the node at the inner-most function.
Optional: user-implemented
read()/write()should now receiveTreeand idIf you want to use deserialization from
Tree, yourread()andwrite()implementations should now be rewritten forTree, instead ofNodeRef. This will enable using yourread()/write()functions with both theTreeandNodeRefmethods:If you don't change, you will not be able to serialize to/from
Tree. That is, having only the node implementation will not work with theTreemethods. You can also provide both functions, and they would be picked up correctly, but that is pointless. In short, prefer the Tree version.Note also that inside the tree version, you can still use the node API. For example:
Optional: do not use
.load()(former>>) insideread()Inside your
write()/read()implementation you should now use the new.deserialize()calls. On error, these methods will play nice when they are called from.deserialize()on upper-level objects. On the contrary,.load()(formerly>>) will interrupt execution immediately, and this will prevent those upper-level calls from successfully receiving the actualReadResultand reporting it upwards.If you want to avoid exceptional flow and write code such as
... then your
read(tree,id,Inner*)implementation should not use.load():In short, implementing
read()with.deserialize()plays nice with both upper.deserialize()and.load()calls, whereas implementingread()with.load()will only work with upper.load()calls.Recommended: use new methods
.deserialize_child()inread()Inside your
read()implementation, you should now use the new methods.deserialize_child().This release also adds a family of methods to simplify
read()implementations. Each of these returns aReadResultobject that is ready to return on error. Consider the following node-basedread(), already using.deserialize():Any of the
operator[]calls (or more precisely the.deserialize()calls on its result) may trigger a visit error when no such node exists. To avoid exceptional flow in case of error, you should now use.deserialize_child()which simplifies a graceful return with an appropriate error status when the child node does not exist:Here's the list of new
ReadResult-returning methods that may be of use in similar scenarios:Tree::deserialize_child(),ConstNodeRef::deserialize_child(),ConstNodeRef::deserialize_child(): both for keys and indices (on seqs)Tree::child_r(),ConstNodeRef::child_r(),ConstNodeRef::child_r()Tree::find_child_r(),ConstNodeRef::find_child_r(),ConstNodeRef::find_child_r()sibling_randfind_sibling_r().get_if()methods were deprecated in favour of.deserialize_child().Full changelog
--fastfloat_systo use fastfloat from systemC4_LIKELY()/C4_UNLIKELY()to turn into[[likely]]/[[unlikely]]. No logic changes..deserialize_child()methods to simplifyread()implementationsRYML_SYSTEM_C4COREto consume c4core fromfind_package(). Thanks @uilianries!ext/c4core.src/: c4core code used in the rapidyaml libraryext/c4core.dev/: c4core code used by tests/benchmarksproj/: project files like cmake files and toolchainsRYML_STANDALONEcan still be set toOFFto compile against an out-of-source c4core (see also the newly addedRYML_SYSTEM_C4CORE)c4core.srcfiles, and has new option--c4core-devto include thec4core.devfilesNodeTypeandextra::ievt::EventFlags:TreeandNodeRef, overloads takingNodeType_eare now receivingtype_bits.NodeType_etoNodeTypeBits(deprecateNodeType_e)NodeType_e.extra::ievt::EventFlagstoextra::ievt::EventBitsTreeandNodeRef:NodeInitTreeandNodeRef:.to_val()and friends -- add.set_val()and friends.operator=(csubstr)and friends -- use.set_val()instead.operator|=(NodeType)andoperator=(NodeType)-- use appropriate overload.set_*(T, NodeType).RYML_WITH_LEGACY_OPERATORS.NodeInitandNodeScalarmethods inTreeandNodeRef(use.set_*())NodeRef::{duplicate,move}(ConstNodeRef)NodeRef::visit()andNodeRef::visit_stacked()Tree::arena_rem()RYML_DEFAULT_TREE_ARENA_CAPACITY_STARTwith default value of 256parse_*(): internal simplification, no semantic changesoperator<<, use.load()/.load_key()or.deserialize()/.deserialize_key()operator>>, use.save()/.save_key()or.set_serialized()/.set_key_serialized()key()tag function andKeytag type (needed only for the operators above)RYML_WITH_LEGACY_OPERATORSto disable compiler deprecation warnings from use of these operators.TreeAPI is now fully implemented, working exactly the same asNodeRefNodeRefserialized withwrite(NodeRef *, T const&)andwrite_key()Treeserialized withwrite(Tree *, id_type, T const&)andwrite_key()to_chars()serializationConstNodeRefdeserialized withread(ConstNodeRef const&, T *)andread_key()Treedeserialized withread(Tree const*, id_type, T *)andread_key()(removed oldreadkey()approach.)from_chars()serializationNodeRefserialization to use the tree API, which is faster to compile.c4/yml/scalar_charconv.hppandc4/yml/scalar_style.hppVALNILorKEYNIL, such that non-fundamental types can now be null-initialized (eg initialize a string from a null scalar). Fundamental types such as ints or floats will still report an error.read()user functions should now returnReadResultinstead ofbool. This change is backwards-compatible with legacyread()functions returningbool, but the legacy version will remain less precise: it will report an inner error on the upmost node returning false, possibly the root if all levels are returning bool. See the newsample_deserialize_error()on the quickstart, and the latest doxygen documentation. The user functions should change (but not mandatory):WriterFileandWriterOStreamno longer track the number of emitted bytes.error_on_excessis now used in the emit-to-buffer overloads, and no longer in the mainEmitter::emit_as()driver function.c4/yml/emit_container.hpp: emit to resizeable contiguous char container (egstd::string,std::vector<char>)c4/yml/emit_buf.hpp: emit to char buffer (substr)c4/yml/emit_file.hpp: emit to CFILE*c4/yml/emit_ostream.hpp: emit to STL-like ostreamsc4/yml/emit.hppis now a pure umbrella header, including all of the above. For better compilation speed, avoid the umbrella header, and prefer including the concrete header (container, buf, file or stream).c4/yml/emit_options.hpp: options to control emittingc4/yml/emitter.hpp: main emitter classc4/yml/emitter.def.hpp: definitions of main emitter class.c4/yml/writer_buf.hpp: policy class to emit to char buffer (substr)c4/yml/writer_file.hpp: policy class to emit to CFILE*c4/yml/writer_ostream.hpp: policy class to emit to STL-like ostreamsemit_*()functions remain the same.Tree::root_id_maybe()which is safe to call on an empty tree.Emitter::max_depth()Emitter::options()setterNaNandInfin json emitting.C4_ALWAYS_INLINE. Results in ~10-20% emit improvements.file_put_contents(): addFILE*overloadsNodeRef:{Const}NodeRef::{iterator,children_view}.NodeRefvsConstNodeRef. No semantic changes. This should improve compilation speed of code containing many node calls.c4::atof()/c4::atod(), disable redundant assertions that prevent returning false on bad strings.to_chars(substr,DataType)toto_str()(the existing c4 overload would always win because it's an int)TreeandNodeRef: deprecate.type_str(). Use.type().type_str()NodeTypeThanks
v0.15.2: Release 0.15.2Compare Source
See the Doxygen version of this changelog, which links any symbols mentioned here.
v0.15.1: Release 0.15.1Compare Source
See the Doxygen version of this changelog, which links the symbols mentioned here.
EmitOptions::json_err_on_stream().EmitOptionswhereEmitOptions::emit_nonroot_dash()had the same effect asEmitOptions::json_err_on_tag().v0.15.0: Release 0.15.0Compare Source
See the Doxygen version of this changelog, which links the symbols mentioned here.
NodeType_e::FLOW_SPCto force space after comma in flow style containers:FLOW_MLN(flow multiline, multi-values per line, wrapped at max columns). The oldFLOW_MLwas deprecated, and is now known asFLOW_ML1(flow multiline, 1 value per line):FLOW_MLXmask to match bothFLOW_ML1andFLOW_MLNEmitOptions::max_cols()to control wrapping ofFLOW_MLN:EmitOptions::force_flow_spc()to override all per-node settings ofFLOW_SPCwhen emitting:ParserOptions::flow_ml_style()to choose the multiline flow style to assign while parsing. The default value is stillFLOW_ML1(the old behavior), but this option allows picking any ofFLOW_MLNorFLOW_ML1.sample_style_flow_formatting()in the quickstart for more info.v0.14.0: Release 0.14.0Compare Source
file_put_contents()file_get_contents()stdin_get_contents()-Weverything. Thanks @TedLyngmo !|or>:Thanks
v0.13.0: Release 0.13.0Compare Source
scalar_style_choose()was split intoscalar_style_choose_{flow,block}()scalar_style_query_plain()was split intoscalar_style_query_plain_{flow,block}()NodeType::type_str(NodeType,flags): remove zero-termination, use common approach of returning required sizeNodeType::type_str_sub():and#on continuation lines of multiline plain scalars:string_viewandspanto thec4/yml/std/std.hppinterop umbrella header.Thanks
Configuration
📅 Schedule: (in timezone Europe/Berlin)
🚦 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 CLI.