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

No global eval settings in libnixexpr #10913

Merged
merged 1 commit into from
Jun 24, 2024

Conversation

Ericson2314
Copy link
Member

Motivation

Progress on #5638

Context

There is still a global eval settings, but it pushed down into libnixcmd, which is a lot less bad a place for this sort of thing.

Priorities and Process

Add 👍 to pull requests you find important.

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

@github-actions github-actions bot added new-cli Relating to the "nix" command repl The Read Eval Print Loop, "nix repl" command and debugger c api Nix as a C library with a stable interface labels Jun 14, 2024
@Ericson2314 Ericson2314 force-pushed the no-global-eval-settings-in-libexpr branch from fab536d to df54688 Compare June 14, 2024 17:35
@edolstra
Copy link
Member

Is there a use case where we could have multiple EvalState instances with different settings?

@Ericson2314
Copy link
Member Author

Ericson2314 commented Jun 17, 2024

@edolstra Evaluating completely independent things. Could be part of an application with a long-lived process, or it could be part of the unit tests. The latter one may be just testing, but it's a fully non-hypothetical real one today.

@Ericson2314 Ericson2314 marked this pull request as ready for review June 17, 2024 19:44
@Ericson2314 Ericson2314 force-pushed the no-global-eval-settings-in-libexpr branch from df54688 to 4fd6441 Compare June 24, 2024 14:21
Progress on #5638

There is still a global eval settings, but it pushed down into
`libnixcmd`, which is a lot less bad a place for this sort of thing.
@Ericson2314 Ericson2314 force-pushed the no-global-eval-settings-in-libexpr branch from 4fd6441 to 52bfccf Compare June 24, 2024 16:17
@Ericson2314 Ericson2314 requested a review from thufschmitt as a code owner June 24, 2024 16:17
@github-actions github-actions bot added with-tests Issues related to testing. PRs with tests have some priority fetching Networking with the outside (non-Nix) world, input locking labels Jun 24, 2024
@roberth roberth merged commit c66f1e7 into master Jun 24, 2024
15 of 16 checks passed
@roberth roberth deleted the no-global-eval-settings-in-libexpr branch June 24, 2024 16:52
@nixos-discourse
Copy link

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/2024-06-24-nix-team-meeting-minutes-155/47739/1

Comment on lines +110 to +112
void * p = ::operator new(
sizeof(EvalState),
static_cast<std::align_val_t>(alignof(EvalState)));
Copy link
Member

Choose a reason for hiding this comment

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

This is causing problems for 24.05.
Might a simpler solution be feasible?

https://github.com/NixOS/nixpkgs/pull/324408/checks?check_run_id=27026504754

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 fetching Networking with the outside (non-Nix) world, input locking new-cli Relating to the "nix" command repl The Read Eval Print Loop, "nix repl" command and debugger with-tests Issues related to testing. PRs with tests have some priority
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants