Merged
Conversation
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>
…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
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).
Member
Author
|
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is for ClickHouse/ClickHouse#75031
Which has been fixed in jbeder#1406