Skip to content

Feat/parse null into nullopt optionals#654

Merged
liuzicheng1987 merged 3 commits into
getml:mainfrom
Fellfalla:feat/parse-null-into-nullopt-optionals
Apr 27, 2026
Merged

Feat/parse null into nullopt optionals#654
liuzicheng1987 merged 3 commits into
getml:mainfrom
Fellfalla:feat/parse-null-into-nullopt-optionals

Conversation

@Fellfalla
Copy link
Copy Markdown
Contributor

Implements the possibility to explicitly write value: null for optionals with std::nullopt values inside yaml files.

Related discussion: #652

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request improves YAML null handling by updating the is_empty check in the Reader to explicitly verify if a node is null. It also introduces a comprehensive test suite covering various data types to ensure null values are handled correctly. One minor improvement was suggested to remove a redundant boolean expression in the test assertions for better clarity.

Comment thread tests/yaml/test_read_null.cpp
@liuzicheng1987
Copy link
Copy Markdown
Contributor

@Fellfalla , the PR looks good to me. Happy to merge this once the tests run through. Thanks for the contribution!

@Fellfalla
Copy link
Copy Markdown
Contributor Author

@Fellfalla , the PR looks good to me. Happy to merge this once the tests run through. Thanks for the contribution!

Tests seem to fail due to flaky pipeline. Is it related to my changes?

@liuzicheng1987
Copy link
Copy Markdown
Contributor

@Fellfalla , no, that is because unfortunately vcpkg in Github is indeed a bit flaky. Nothing to do with your changes.

@liuzicheng1987 liuzicheng1987 merged commit a26047a into getml:main Apr 27, 2026
174 of 182 checks passed
@liuzicheng1987
Copy link
Copy Markdown
Contributor

@Fellfalla , I have merged the PR. Thank you very much for your contribution!

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.

2 participants