Skip to content

Conversation

@fzakaria
Copy link
Contributor

Add a unit test specifically for the issue #11972 which said that an assertion in the fromTOML builtin was hit when called from the C API.

fixes #11972


Add 👍 to pull requests you find important.

The Nix maintainer team uses a GitHub project board to schedule and track reviews.

@fzakaria fzakaria requested a review from edolstra as a code owner October 17, 2025 20:07
@github-actions github-actions bot added the c api Nix as a C library with a stable interface label Oct 17, 2025
Add a unit test specifically for the issue NixOS#11972 which said that an
assertion in the fromTOML builtin was hit when called from the C API.

fixes NixOS#11972
@fzakaria fzakaria force-pushed the fzakaria/issue-11972 branch from b25d81a to b7118b7 Compare October 18, 2025 01:41
/**
* @brief Validates the fix for https://github.com/NixOS/nix/issues/11972
*/
TEST_F(nix_api_expr_test, fromTOML_invalid_syntax_should_error_gracefully)
Copy link
Member

Choose a reason for hiding this comment

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

It's easier/faster to do this as a language test in tests/functional/lang. Those can also check for error messages, see eval-fail-*.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Do those test the C API ?

The original issue was specifically with the C-api vs. the C++ API.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

c api Nix as a C library with a stable interface

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fromTOML: Assertion in TOML library fails

2 participants