Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

clarify note on forcing thunks in the C API #10848

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/libexpr-c/nix_api_expr.h
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,8 @@ nix_err nix_value_call_multi(
*
* This function converts these Values into their final type.
*
* @note This function is mainly needed before calling @ref getters, but not for API calls that return a `Value`.
* @note This function is mainly needed before calling @ref getters.
* All API calls that return a `Value` force thunks automatically.
fricklerhandwerk marked this conversation as resolved.
Show resolved Hide resolved
Copy link
Member

Choose a reason for hiding this comment

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

This was a mistake in the design, and it already isn't true anymore that all returned Values are forced.

See #10499 for the reasons why, and #10537 for a real world counterexample.

We'll revise this doc entirely when fixing that issue.

*
* @param[out] context Optional, stores error information
* @param[in] state The state of the evaluation.
Expand Down
Loading