Skip to content

Comments

Sync upstream#3

Merged
azat merged 66 commits intomasterfrom
sync-upstream
Feb 19, 2026
Merged

Sync upstream#3
azat merged 66 commits intomasterfrom
sync-upstream

Conversation

@azat
Copy link
Member

@azat azat commented Feb 19, 2026

This is for ClickHouse/ClickHouse#75031

Which has been fixed in jbeder#1406

frankosterfeld and others added 30 commits May 2, 2024 09:29
These caused issues when used in a wasm project.
Since `std::string` has to be dynamically constructed and destructed,
it could be accessed before initialization or after destruction in a
multithreaded context. By using constant c-strings instead, we guarantee
that the array will be valid for the whole lifetime of the program. The
use of `constexpr` also enforces this requirement.

I have run clang-format on the file to format my changes according to
CONTRIBUTING.md.
The CMake format target does not use the correct .clang-format file in
out-of-source builds. This instructs CMake to use the project root as
the working directory for running the clang-format command so that it
finds the .clang-format file.
This reverts commit 1f5e971.

See jbeder#1306; the previous commit caused an error with -Wpedantic:

yaml-cpp/include/yaml-cpp/emitterstyle.h:13:2: error: extra ‘;’ [-Wpedantic]

Since the original commit was to resolve warnings, reverting and the OP can produce a new one that fixes this issue.
jekyll/liquid got hung up on `{{"Daniel", 26}, {"Jesse", 24}}`.

The reason is that `{{...}}` are used as variables that are replaced by
there values. In this case we have a YAML object that looks the same.
This issue can be fixed by surrounding the block into `{% raw %}...{%
endraw %}` tags.
GCC 15 will no longer include it by default, resulting in build
failures in projects that do not explicitly include it.

Error:
src/emitterutils.cpp:221:11: error: 'uint16_t' was not declared in this scope
  221 | std::pair<uint16_t, uint16_t> EncodeUTF16SurrogatePair(int codePoint) {
      |           ^~~~~~~~
src/emitterutils.cpp:13:1: note: 'uint16_t' is defined in header '<cstdint>';
this is probably fixable by adding '#include <cstdint>'
   12 | #include "yaml-cpp/null.h"
  +++ |+#include <cstdint>
   13 | #include "yaml-cpp/ostream_wrapper.h"

Tests pass.

Closes: jbeder#1307
See-also: https://gcc.gnu.org/pipermail/gcc-cvs/2024-August/407124.html
See-also: https://bugs.gentoo.org/937412
Signed-off-by: Christopher Fore <csfore@posteo.net>
They were commented out before 0733aeb, but when that commit
was reverted in 2b65c65 they were recovered uncommented.
…pted.

Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
Plus, check that the content is what we actually expect.

Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
Leave at first empty root.

Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
Add dragonbox to compute the required precision to print floating point
numbers. This avoids uglification of floating point numbers that
happen by default via std::stringstream.

Numbers like 34.34 used to be converted to '34.340000000000003' as strings.
With this version they will be converted to the string '34.34'.

This fixes issue jbeder#1289
jwnimmer-tri and others added 27 commits December 30, 2024 11:27
Including iostream means introducing the static (global) constructors
and destructors for std::cin, std::cerr, and std::cout. That extra
init and fini code is undesirable when those streams are not actually
used.

Instead, we'll use the narrower includes for exactly what's needed,
i.e., <istream> or <ostream>.
Bump the release note to the latest version
Soon CMake 4.0 will be released. It requires that projects
set a minimum required CMake version of 3.5. There is a
workaround with an additional flag, but it would is better
to increase the minimum required version.
Fix issue with CMake 4.0
Bumps the github-actions group with 1 update: [actions/checkout](https://github.com/actions/checkout).


Updates `actions/checkout` from 4 to 5
- [Release notes](https://github.com/actions/checkout/releases)
- [Commits](actions/checkout@v4...v5)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps the github-actions group with 1 update: [actions/checkout](https://github.com/actions/checkout).


Updates `actions/checkout` from 5 to 6
- [Release notes](https://github.com/actions/checkout/releases)
- [Commits](actions/checkout@v5...v6)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions
...

Signed-off-by: dependabot[bot] <support@github.com>
the convert_with_stringstream seems to be missing a
.imbue() call to set the locale independent of the global state.
Not setting this, can in some settings lead to errors, see Issue jbeder#1366.
Issue jbeder#1385 demonstrates how a large 'precision' value can cause buffer
overflows. Originally, the buffer was designed to fit any scientific
notation. But the precision changes at which point large floating point
numbers are displayed in scientific notation or default notation.
In case of the default notation many extra zeros have to be printed,
this was not reflected in the output_buffer and an overflow could
occur.

This PR computes the number of zero that do not fit into the static
buffer and appends them at the end of the function triggering potential
a second dynamic allocation. (The first allocation is the std::string
allocation).
Bumps the github-actions group with 1 update: [actions/checkout](https://github.com/actions/checkout).


Updates `actions/checkout` from 5.0.1 to 6.0.1
- [Release notes](https://github.com/actions/checkout/releases)
- [Commits](actions/checkout@v5.0.1...v6.0.1)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: 6.0.1
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions
...

Signed-off-by: dependabot[bot] <support@github.com>
Bazel 9 drops builtin `cc_*` rules, they need to be loaded explicitly now.
If a project is using the facade-header yaml-cpp/yaml.h it might
get `misc-include-cleaner` warnings from the `clangd` language server
and `clang-tidy` that this header is not providing directly the symbols used.

The annotation with IWYU pragmas fixes that and tells the tools that it should consider
all the includes as if they directly provided the symbol

Documentation clangd and clang-tidy
https://clang.llvm.org/extra/clang-tidy/checks/misc/include-cleaner.html points to
https://clangd.llvm.org/design/include-cleaner#iwyu-pragmas

This has been first implemented and docuemnted in the include-what-you-use project
https://github.com/include-what-you-use/include-what-you-use/blob/master/docs/IWYUPragmas.md#iwyu-pragma-begin_exportsend_exports

Signed-off-by: Henner Zeller <h.zeller@acm.org>
Bumps the github-actions group with 1 update: [actions/checkout](https://github.com/actions/checkout).


Updates `actions/checkout` from 6.0.1 to 6.0.2
- [Release notes](https://github.com/actions/checkout/releases)
- [Commits](actions/checkout@v6.0.1...v6.0.2)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: 6.0.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: github-actions
...

Signed-off-by: dependabot[bot] <support@github.com>
If the input doesn't have the proper number of encoding characters
(a multiple of 4), return an empty result.

Co-Authored-By: Sean Curtis <sean.curtis@tri.global>
Previously, no parsing progress (detecting infinite loops) was detected by an empty Node.
This falsely triggers an abort, if an empty YAML document is being parsed.

Instead, we detect if progress in the parsing stream is made, by
comparing token positions. As long as new tokens are being
parsed (detected by position change), we assume we are not in an
infinite loop.
This fixes the example "Example 5.13 Escaped Characters" from the YAML
specification.

The example demands that `\_` is being translated to unicode `\u00a0`.
The unicode codepoint `\u00A0` encoded for utf-8 in hex is `\xC2\xA0`.

Fixing this test case will cause the unit test to not pass, since the
codepoint `\u00A0` is not handled correctly.
(Failing unittest is expected).
@azat
Copy link
Member Author

azat commented Feb 19, 2026

2|azat:.../yaml-cpp/.cmake (sync-upstream)$ ninja test
[00:00][  0%][0/2] Re-checking globbed directories...
[00:00][  0%][0/2] Running tests...
Test project /src/oss/yaml-cpp/.cmake
    Start 1: yaml-cpp::test
1/1 Test #1: yaml-cpp::test ...................   Passed    1.21 sec

100% tests passed, 0 tests failed out of 1

Total Test time (real) =   1.22 sec

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 22 committers have signed the CLA.

✅ azat
❌ JosiahWI
❌ frankosterfeld
❌ SGSSGene
❌ RonsonNamek
❌ jbeder
❌ csfore
❌ LecrisUT
❌ PhilMiller
❌ FedeDP
❌ IMaloney
❌ jwnimmer-tri
❌ gruenich
❌ salim-b
❌ zhao-shihan
❌ mmueller2012
❌ diehlpk
❌ KSkwarczynski
❌ hzeller
❌ DarthGandalf
❌ orgads
❌ ahans
You have signed the CLA already but the status is still pending? Let us recheck it.

@azat azat merged commit acf4186 into master Feb 19, 2026
31 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.