diff --git a/CHANGELOG.md b/CHANGELOG.md index dec3700eb4..ea167cacd8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -33,6 +33,9 @@ Increment the: * [CONFIGURATION] File configuration - spec stability [#3862](https://github.com/open-telemetry/opentelemetry-cpp/pull/3862) +* [BUILD] Upgrade to rapidyaml 0.10.0 + [#3906](https://github.com/open-telemetry/opentelemetry-cpp/pull/3906) + Important changes: * [BUILD] Revisit EventLogger deprecation diff --git a/MODULE.bazel b/MODULE.bazel index 43813f4615..e6721ba20a 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -18,7 +18,7 @@ bazel_dep(name = "opentracing-cpp", version = "1.6.0", repo_name = "com_github_o bazel_dep(name = "platforms", version = "1.0.0") bazel_dep(name = "prometheus-cpp", version = "1.3.0.bcr.2", repo_name = "com_github_jupp0r_prometheus_cpp") bazel_dep(name = "protobuf", version = "32.0", repo_name = "com_google_protobuf") -bazel_dep(name = "rapidyaml", version = "0.9.0") +bazel_dep(name = "rapidyaml", version = "0.10.0") bazel_dep(name = "rules_cc", version = "0.2.17") bazel_dep(name = "rules_foreign_cc", version = "0.15.1") bazel_dep(name = "rules_proto", version = "7.1.0") diff --git a/install/cmake/third_party_latest b/install/cmake/third_party_latest index c41dab1a1a..daec207909 100644 --- a/install/cmake/third_party_latest +++ b/install/cmake/third_party_latest @@ -16,4 +16,4 @@ nlohmann-json=v3.12.0 opentelemetry-proto=v1.8.0 opentracing-cpp=v1.6.0 prometheus-cpp=v1.3.0 -ryml=v0.9.0 +ryml=v0.10.0 diff --git a/install/cmake/third_party_stable b/install/cmake/third_party_stable index 7864bb5e31..63abcf85bf 100644 --- a/install/cmake/third_party_stable +++ b/install/cmake/third_party_stable @@ -16,4 +16,4 @@ nlohmann-json=v3.11.3 opentelemetry-proto=v1.6.0 opentracing-cpp=v1.6.0 prometheus-cpp=v1.3.0 -ryml=v0.9.0 +ryml=v0.10.0 diff --git a/sdk/src/configuration/ryml_document.cc b/sdk/src/configuration/ryml_document.cc index ac0e051c2e..03b2770cf4 100644 --- a/sdk/src/configuration/ryml_document.cc +++ b/sdk/src/configuration/ryml_document.cc @@ -2,6 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 #include +#include #include #include #include @@ -98,11 +99,17 @@ std::unique_ptr RymlDocument::GetRootNode() DocumentNodeLocation RymlDocument::Location(ryml::ConstNodeRef node) const { DocumentNodeLocation loc; +#if RYML_VERSION_MINOR >= 10 + // Starting with rapidyaml 0.10.0 + auto ryml_loc = node.location(*parser_); +#else + // Up to rapidyaml 0.9.0 auto ryml_loc = parser_->location(node); - loc.offset = ryml_loc.offset; - loc.line = ryml_loc.line; - loc.col = ryml_loc.col; - loc.filename = std::string(ryml_loc.name.str, ryml_loc.name.len); +#endif + loc.offset = ryml_loc.offset; + loc.line = ryml_loc.line; + loc.col = ryml_loc.col; + loc.filename = std::string(ryml_loc.name.str, ryml_loc.name.len); return loc; } diff --git a/third_party_release b/third_party_release index 76b8d189c5..ff723337b0 100644 --- a/third_party_release +++ b/third_party_release @@ -25,5 +25,5 @@ nlohmann-json=v3.12.0 opentelemetry-proto=v1.8.0 opentracing-cpp=v1.6.0 prometheus-cpp=v1.3.0 -ryml=v0.9.0 +ryml=v0.10.0 vcpkg=2024.02.14