From 35a2f28a46613ad185b96d6e38c3f5d13bfc79b5 Mon Sep 17 00:00:00 2001 From: eldritch horrors Date: Fri, 9 Aug 2024 02:12:01 +0200 Subject: [PATCH] libstore: deprecate the build-hook setting implementing a build hook is pretty much impossible without either being a nix, or blindly forwarding the important bits of all build requests to some kind of nix. we've found no uses of build-hook in the wild, and the build-hook protocol (apart from being entirely undocumented) is not able to convey any kind of versioning information between hook and daemon. if we want to upgrade this infrastructure (which we do), this must not stay Change-Id: I1ec4976a35adf8105b8ca9240b7984f8b91e147e --- doc/manual/rl-next/deprecate-build-hook.md | 8 ++++++++ src/libstore/globals.hh | 8 ++++++-- 2 files changed, 14 insertions(+), 2 deletions(-) create mode 100644 doc/manual/rl-next/deprecate-build-hook.md diff --git a/doc/manual/rl-next/deprecate-build-hook.md b/doc/manual/rl-next/deprecate-build-hook.md new file mode 100644 index 000000000..30de1298d --- /dev/null +++ b/doc/manual/rl-next/deprecate-build-hook.md @@ -0,0 +1,8 @@ +--- +synopsis: "The `build-hook` setting is now deprecated" +category: Breaking Changes +--- + +Build hooks communicate with the daemon using a custom, internal, undocumented protocol that is entirely unversioned and cannot be changed. +Since we intend to change it anyway we must unfortunately deprecate the current build hook infrastructure. +We do not expect this to impact most users—we have not found any uses of `build-hook` in the wild—but if this does affect you, we'd like to hear from you! diff --git a/src/libstore/globals.hh b/src/libstore/globals.hh index 1aeb462d4..4709ac715 100644 --- a/src/libstore/globals.hh +++ b/src/libstore/globals.hh @@ -248,14 +248,18 @@ public: )", {"build-timeout"}}; - Setting buildHook{this, {}, "build-hook", + Setting buildHook{ + AbstractSetting::deprecated_t{}, + this, {}, "build-hook", R"( The path to the helper program that executes remote builds. Lix communicates with the build hook over `stdio` using a custom protocol to request builds that cannot be performed directly by the Nix daemon. The default value is the internal Lix binary that implements remote building. - > **Important** + > **Warning** + > + > This setting is deprecated and will be removed in a future version of Lix. > > Change this setting only if you really know what you’re doing. )"};