-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Move plugins infra to libnixmain
#11014
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
libraries don't need plugins, executables do
Executables using libraries also do, and libraries are only useful when executing them, which happens through executables, so this is a red herring.
Suppose I have a plugin that registers a builtin or a new hash function, and I configure that in nix.conf
, then I would expect all of Nix to load it; not just the Nix CLI, but also other executables. Whether they call nix eval
or -lnixexprc
should not matter.
Coming to think of it, we could move plugins down into libutil so you can register your own hash functions, although the list of possible hashes is a store thing anyway, but also putting domain logic in libutil is wrong, so moving that is probably better. Plugins in libstore seems ok for now.
@roberth I did move them to a library I want to move all the config stuff to |
Ok, I didn't see It'd be nice to have some sort of description of each library. nix/src/libmain/nix-main.pc.in Line 6 in 509be0e
nix/src/libutil/nix-util.pc.in Line 6 in 509be0e
nix/src/libexpr/nix-expr.pc.in Line 6 in 509be0e
🤔 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moving it to a different library is already not so great for a "stable" interface, so let's at least not remove it.
Otherwise LGTM.
} | ||
NIXC_CATCH_ERRS | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can't just remove it. Could you create a new c
library for this?
In theory the warning is more noisy now, but in practice this will not happen unless the client is older than 2.14 (highly unlikely).
679ed2b
to
8d1c553
Compare
They are not actually part of the store layer, but instead part of the Nix executable infra (libraries don't need plugins, executables do). This is part of a larger project of moving all of our legacy settings infra to libmain, and having the underlying libraries just have plain configuration structs detached from any settings infra / UI layer. Progress on NixOS#5638
8d1c553
to
0feeab7
Compare
OK, the C function is restored |
Thanks! |
Motivation
They are not actually part of the store layer, but instead part of the Nix executable infra (libraries don't need plugins, executables do).
Context
This is part of a larger project of moving all of our legacy settings infra to libmain, and having the underlying libraries just have plain configuration structs detached from any settings infra / UI layer.
Progress on #5638
Priorities and Process
Add 👍 to pull requests you find important.
The Nix maintainer team uses a GitHub project board to schedule and track reviews.