about summary refs log tree commit diff
path: root/ops (unfollow)
AgeCommit message (Collapse)AuthorFilesLines
2022-11-12 r/5279 fix: use localSystem over builtins.currentSystem where appropriatesterni2-5/+5
cl/5832 added a global system parameter to depot which allowed specifying what `system` should be used for nixpkgs and all depot derivations (assuming a native compilation case) which was implemented in cl/5846. This allows instantiating derivations for a different system than whatever builtins.currentSystem happens to be. This is useful for debugging, allows you to schedule builds on build servers for other platforms or build for architectures that are a subset of the one you are running (e.g. i686-linux). This change eliminates all remaining uses of builtins.currentSystem which could lead to an inconsistent combination of `system` values when passing `localSystem`. Change-Id: I0f824f4f0afa88ef1ddd9a8cecb24bf94bacde7a Reviewed-on: https://cl.tvl.fyi/c/depot/+/7260 Tested-by: BuildkiteCI Reviewed-by: tazjin <tazjin@tvl.su> Autosubmit: sterni <sternenseemann@systemli.org>
2022-11-11 r/5278 feat(tvix/): .gitignore target foldersFlorian Klink2-1/+1
Change-Id: Ic52159141b2346dd580215566056aca7110f0a10 Reviewed-on: https://cl.tvl.fyi/c/depot/+/7253 Autosubmit: flokli <flokli@flokli.de> Reviewed-by: grfn <grfn@gws.fyi> Tested-by: BuildkiteCI
2022-11-11 r/5277 feat(tvix/eval): move shell.nix and .envrc to //tvixFlorian Klink3-12/+2
Both //tvix/eval and //tvix/nix_cli have need to for rust tooling available in $PATH. Move this one level up, so it's accessible in all subdirectories. Change-Id: I0763bbe9cefdc962f3a8f86c51e8f67cde8b4b04 Reviewed-on: https://cl.tvl.fyi/c/depot/+/7248 Autosubmit: flokli <flokli@flokli.de> Reviewed-by: sterni <sternenseemann@systemli.org> Reviewed-by: grfn <grfn@gws.fyi> Tested-by: BuildkiteCI
2022-11-10 r/5276 feat(tvix/eval): detect division by zerojhahn4-1/+22
This detects if the second argument of a division is a zero (either as integer or as float). If so, an error message is displayed. This fixes b/219. Change-Id: I50203d14a71482bc757832a2c8dee08eb7d35c49 Reviewed-on: https://cl.tvl.fyi/c/depot/+/7258 Tested-by: BuildkiteCI Reviewed-by: flokli <flokli@flokli.de>
2022-11-09 r/5275 feat(ops/users): Add jrhahn to usersjhahn1-0/+5
Change-Id: I00913a302ecc23fec2e60875dc164b24d73ba4ad Reviewed-on: https://cl.tvl.fyi/c/depot/+/7257 Reviewed-by: sterni <sternenseemann@systemli.org> Tested-by: BuildkiteCI
2022-11-09 r/5274 revert(nix/utils): onlyDrvPath to get the drvPath w/o the outputssterni2-27/+0
This reverts commit 6813598c17959862734e5878d745e7dd8a197717. Reason for revert: This function is a re-implementation of builtins.unsafeDiscardOutputDependency which I missed at the time. Change-Id: I5bb52bfd5e8d51defaf90ee795b0fe99be84f6db Reviewed-on: https://cl.tvl.fyi/c/depot/+/7265 Tested-by: BuildkiteCI Reviewed-by: tazjin <tazjin@tvl.su>
2022-11-08 r/5273 chore(tvix/proto/castore.proto) rename *Node.{ref->digest}Florian Klink1-9/+13
As per the discussion in https://cl.tvl.fyi/c/depot/+/7128/2..5/tvix/proto/castore.proto#b39, ref sounds more like an external, stateful ID. Call this `digest`, to make clear it's precisely this. Change-Id: I81dd3769e2ce017de470ae92f72a38fb72015f10 Reviewed-on: https://cl.tvl.fyi/c/depot/+/7134 Reviewed-by: tazjin <tazjin@tvl.su> Tested-by: BuildkiteCI Reviewed-by: Adam Joseph <adam@westernsemico.com>
2022-11-08 r/5272 chore(tvix/proto): change package name to tvix.proto.v1Florian Klink2-2/+2
`buf` doesn't like protos with different package names in the same directory. Change-Id: I30806b46b88f103779faa40466461091a4a01e06 Reviewed-on: https://cl.tvl.fyi/c/depot/+/7130 Reviewed-by: tazjin <tazjin@tvl.su> Reviewed-by: Adam Joseph <adam@westernsemico.com> Tested-by: BuildkiteCI
2022-11-08 r/5271 chore(tvix/proto/castore.proto): rename link to symlinksFlorian Klink1-5/+5
Make it clear these are symlinks, not hardlinks. The term "link" is too heavily correlated to other meanings in IPFS/IPLD world, and calling this symlink removes this confusion. Change-Id: Id3f1eaa32098510b05f3e1a1348344503bcb4d5a Reviewed-on: https://cl.tvl.fyi/c/depot/+/7129 Tested-by: BuildkiteCI Reviewed-by: tazjin <tazjin@tvl.su> Reviewed-by: Adam Joseph <adam@westernsemico.com>
2022-11-08 r/5270 docs(tvix/proto/castore.proto): add commentsFlorian Klink1-0/+25
Change-Id: Ie5438cc6b6d4c63fc05236a2f0f900c92b5a4a7d Reviewed-on: https://cl.tvl.fyi/c/depot/+/7128 Tested-by: BuildkiteCI Reviewed-by: tazjin <tazjin@tvl.su>
2022-11-08 r/5269 feat(tvix/eval): Add docstrings as documentation for builtinsGriffin Smith5-2/+54
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>
2022-11-08 r/5268 feat(tvix/eval): Give names to builtin argumentsGriffin Smith6-57/+111
Refactor the arguments of a Builtin to be a vec of a new BuiltinArgument struct, which contains the old strictness boolean and also a static `name` str - this is automatically determined via the ident for the corresponding function argument in the proc-macro case, and passed in in the cases where we're still manually calling Builtin::new. Currently this name is unused, but in the future this can be used as part of a documentation system for builtins. Change-Id: Ib9dadb15b69bf8c9ea1983a4f4f197294a2394a6 Reviewed-on: https://cl.tvl.fyi/c/depot/+/7204 Reviewed-by: tazjin <tazjin@tvl.su> Tested-by: BuildkiteCI
2022-11-08 r/5267 refactor(tvix/eval): Be clearer about public interfaceGriffin Smith3-10/+16
Some new top-level re-exports (specifically VM, Builtin, and ErrorKind) were added to lib.rs in tvix/eval to allow the builtin-macros tests to work - we should be clear which of these are part of the public interface (I think it's reasonable for ErrorKind to be) and which aren't (specifically I'm not sure VM and Builtin necessarily should be, at least yet). Change-Id: I3bbeaa63cdda9227224cd3bc298a9bb8da4deb7c Reviewed-on: https://cl.tvl.fyi/c/depot/+/7203 Tested-by: BuildkiteCI Reviewed-by: tazjin <tazjin@tvl.su>
2022-11-08 r/5266 refactor(tvix/eval): Define impure builtins using the macroGriffin Smith1-48/+56
Similar to what we did with pure builtins, define the impure builtins within a module at the top-level using the new #[builtins] attribute macro Change-Id: Ie5d5135d00bb65e651531df6eadba642cd4eb08e Reviewed-on: https://cl.tvl.fyi/c/depot/+/7202 Reviewed-by: tazjin <tazjin@tvl.su> Tested-by: BuildkiteCI
2022-11-08 r/5265 refactor(tvix/eval): Define *all* pure builtins at the top-levelGriffin Smith1-728/+792
Break out all pure builtin functions to top-level functions defined within the `pure_builtins` module in `builtins/mod.rs`. Change-Id: I9a10660446d557b1a86da4c45a463e9a1a9b4f2d Reviewed-on: https://cl.tvl.fyi/c/depot/+/7201 Reviewed-by: tazjin <tazjin@tvl.su> Reviewed-by: Adam Joseph <adam@westernsemico.com> Tested-by: BuildkiteCI
2022-11-08 r/5264 refactor(tvix/eval): Define a single builtin at the top levelGriffin Smith1-5/+16
Mostly as a proof-of-concept of the new proc-macros for defining builtins, define a single builtin (the first in the list, `abort`) at the top-level of a child module within builtins/mod.rs, and add it to the list of builtins returned from `pure_builtins`. If this works nicely, we can start breaking out the rest of the builtins into the top-level too, in addition to introducing additional sets of builtins (to differentiate between pure and impure builtins). Change-Id: I5bdd57c57fecf8d63c9fed4fc6b1460f533b20f2 Reviewed-on: https://cl.tvl.fyi/c/depot/+/7199 Tested-by: BuildkiteCI Reviewed-by: tazjin <tazjin@tvl.su>
2022-11-08 r/5263 feat(tvix/eval): Add a proc-macro for defining builtinsGriffin Smith9-3/+1133
Add a single new proc macro to a new proc-macro crate, `tvix-eval-proc-macros` for defining an inline module containing nix builtins, and automatically generating a function within that module which returns a list of those builtins as