about summary refs log tree commit diff
path: root/tvix/eval/src/builtins/impure.rs
diff options
context:
space:
mode:
authorGriffin Smith <root@gws.fyi>2022-11-06T15·46-0500
committergrfn <grfn@gws.fyi>2022-11-08T13·42+0000
commit76d7671c8a7fa624947e3523d635f0608aae2d07 (patch)
treedd4eac7f0075a540198765d2e279d673f40e93d9 /tvix/eval/src/builtins/impure.rs
parenta1015ba1d7c2228224847f1931118da473815de3 (diff)
feat(tvix/eval): Add docstrings as documentation for builtins r/5269
Add a new `documentation: Option<&'static str>` field to Builtin, and
populate it in the `#[builtins]` macro with the docstring of the builtin
function, if any.

Change-Id: Ic68fdf9b314d15a780731974234e2ae43f6a44b0
Reviewed-on: https://cl.tvl.fyi/c/depot/+/7205
Tested-by: BuildkiteCI
Reviewed-by: tazjin <tazjin@tvl.su>
Diffstat (limited to 'tvix/eval/src/builtins/impure.rs')
-rw-r--r--tvix/eval/src/builtins/impure.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/tvix/eval/src/builtins/impure.rs b/tvix/eval/src/builtins/impure.rs
index d4e7c4170364..f28609fa763f 100644
--- a/tvix/eval/src/builtins/impure.rs
+++ b/tvix/eval/src/builtins/impure.rs
@@ -115,6 +115,7 @@ pub fn builtins_import(globals: &Weak<GlobalsMap>, source: SourceCode) -> Builti
             strict: true,
             name: "path",
         }],
+        None,
         move |mut args: Vec<Value>, vm: &mut VM| {
             let mut path = super::coerce_value_to_path(&args.pop().unwrap(), vm)?;
             if path.is_dir() {