about summary refs log tree commit diff
path: root/third_party/nix/src/libexpr/attr-set.hh
diff options
context:
space:
mode:
authorVincent Ambo <mail@tazj.in>2020-07-19T16·59+0100
committertazjin <mail@tazj.in>2020-07-19T19·02+0000
commit324d385b29979dee066a36250cfea9e030f24bfe (patch)
tree9dcc6f751eed51b825171865f2d7c3526db16b04 /third_party/nix/src/libexpr/attr-set.hh
parent02066a4bab3f534569c61f571c25d519a1a569ad (diff)
refactor(3p/nix): Rename & undeprecate Bindings::lexicographicOrder r/1400
The function is renamed to `SortedByKeys`, which is more descriptive,
and annotated with a comment about what it is used for.

The deprecation warning has been removed because this function is
currently functionally required.

Change-Id: I0ee3a76deff05f366feca9ddac8f38ab34bffbd0
Reviewed-on: https://cl.tvl.fyi/c/depot/+/1288
Tested-by: BuildkiteCI
Reviewed-by: glittershark <grfn@gws.fyi>
Diffstat (limited to 'third_party/nix/src/libexpr/attr-set.hh')
-rw-r--r--third_party/nix/src/libexpr/attr-set.hh8
1 files changed, 6 insertions, 2 deletions
diff --git a/third_party/nix/src/libexpr/attr-set.hh b/third_party/nix/src/libexpr/attr-set.hh
index 683b3e4bd75b..b918bf30ffd2 100644
--- a/third_party/nix/src/libexpr/attr-set.hh
+++ b/third_party/nix/src/libexpr/attr-set.hh
@@ -55,8 +55,12 @@ class Bindings {
   iterator begin();
   iterator end();
 
-  // TODO: can callers just iterate?
-  [[deprecated]] std::vector<const Attr*> lexicographicOrder();
+  // Returns the elements of the attribute set as a vector, sorted
+  // lexicographically by keys.
+  //
+  // This is used primarily for builtins that have guaranteed
+  // ordering, such as `attrNames` or `attrValues`.
+  std::vector<const Attr*> SortedByKeys();
 
   // oh no
   friend class EvalState;