about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorFilesLines
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 `tvix_eval::value::Builtin`. Change-Id: Ie4afae438914d2af93d15637151a49b4c68aa352 Reviewed-on: https://cl.tvl.fyi/c/depot/+/7198 Reviewed-by: tazjin <tazjin@tvl.su> Reviewed-by: Adam Joseph <adam@westernsemico.com> Tested-by: BuildkiteCI
2022-11-08 r/5262 feat(tvix/eval): add helper for selecting required attributesVincent Ambo1-0/+7
Change-Id: Idd4ae78ef55891d89b72b5c2f3afc8b697b4b26e Reviewed-on: https://cl.tvl.fyi/c/depot/+/7189 Reviewed-by: grfn <grfn@gws.fyi> Reviewed-by: Adam Joseph <adam@westernsemico.com> Tested-by: BuildkiteCI Autosubmit: tazjin <tazjin@tvl.su>
2022-11-08 r/5261 docs(tvix/eval): document abandoned thread-local vmAdam Joseph1-0/+233
This commit adds a markdown document which explains how the thread-local VM infrastructure works, in case it is useful in the future. Change-Id: Id10e32a9e3c5fa38a15d4bec9800f7234c59234a Reviewed-on: https://cl.tvl.fyi/c/depot/+/7193 Tested-by: BuildkiteCI Autosubmit: Adam Joseph <adam@westernsemico.com> Reviewed-by: tazjin <tazjin@tvl.su>
2022-11-07 r/5260 fix(ops/machines/whitby): serve grafana at status.tvl.su againsterni2-2/+2
This is a follow up to cl/7191 which neglected to adjust the status.tvl.su.nix module and re-enable it. Change-Id: Icc1917004cd50e5eab61a29bc68b393ba9bd6325 Reviewed-on: https://cl.tvl.fyi/c/depot/+/7226 Tested-by: BuildkiteCI Reviewed-by: lukegb <lukegb@tvl.fyi> Reviewed-by: tazjin <tazjin@tvl.su> Reviewed-by: grfn <grfn@gws.fyi>
2022-11-07 r/5259 chore(3p/sources): Bump channels & overlayssterni1-15/+15
Change-Id: Ib2f76310d24912a44efcabb0dd9eaf9a5d6cc6a9 Reviewed-on: https://cl.tvl.fyi/c/depot/+/7225 Reviewed-by: grfn <grfn@gws.fyi> Tested-by: BuildkiteCI
2022-11-06 r/5258 chore(tools/rust-crates-advisory): move custom checker to user dirsterni3-60/+69
Profpatsch originally implemented an advisory checker from scratch in Rust. We now ended up just using cargo-audit for the global checks exposed via CI and the custom implementation is unused. To clean up //tools/rust-crates-advisory a bit, we can move the unused parts to his user directory. Change-Id: Iacbd27c163edd07c804220fd1b3569c23aebd3e7 Reviewed-on: https://cl.tvl.fyi/c/depot/+/7171 Tested-by: BuildkiteCI Reviewed-by: Profpatsch <mail@profpatsch.de>
2022-11-06 r/5257 chore(gerrit): bump to 3.7.0-rc4Luke Granger-Brown7-57/+43
Change-Id: Ib6f4fd5817fb5415cff5ea1d8c75c8c9a08d56b4 Reviewed-on: https://cl.tvl.fyi/c/depot/+/7185 Tested-by: BuildkiteCI Reviewed-by: tazjin <tazjin@tvl.su>
2022-11-06 r/5256 fix(code-owners): put a user in the context for group resolution.Luke Granger-Brown1-28/+84
We need a user in the context when we ask the groups backend to look up groups by name, so for now if we don't have a _real_ user in the context (such as during change indexing), then populate the context with the anonymous user just for the duration of the groups backend calls. Change-Id: If961d84fe57443cb95deb59628802658585ed1cb Reviewed-on: https://cl.tvl.fyi/c/depot/+/7172 Tested-by: BuildkiteCI Reviewed-by: tazjin <tazjin@tvl.su>
2022-11-06 r/5255 feat(tvix/eval): placeholder builtin implementationsVincent Ambo3-9/+43
Adds initial placeholders for builtins.{derivation, unsafeDiscardStringContext}. Change-Id: I67a126c9b9f9f4f11e2256e69b9a32ebd9eb1b0e Reviewed-on: https://cl.tvl.fyi/c/depot/+/7187 Autosubmit: tazjin <tazjin@tvl.su> Tested-by: BuildkiteCI Reviewed-by: grfn <grfn@gws.fyi>
2022-11-06 r/5254 refactor(tvix/eval): move `unwrap_or_clone_rc` to lib moduleVincent Ambo2-6/+9
This is more generally useful than just inside the VM, until it is stabilised in Rust itself. Change-Id: Id9aa3d5b533ff38e3d2c6b85ad484394fdd05dcf Reviewed-on: https://cl.tvl.fyi/c/depot/+/7186 Tested-by: BuildkiteCI Autosubmit: tazjin <tazjin@tvl.su> Reviewed-by: grfn <grfn@gws.fyi> Reviewed-by: Adam Joseph <adam@westernsemico.com>
2022-11-06 r/5253 chore(grfn/mugwump): Use non-deprecated option for grafana portGriffin Smith1-1/+1
Reference the non-deprecated version of the grafana http port option in the proxyPass for the nginx config of mugwump. Change-Id: Ic7f370c7f7a451fe95a046d491d7b1cdf5f728cd Reviewed-on: https://cl.tvl.fyi/c/depot/+/7200 Reviewed-by: grfn <grfn@gws.fyi> Autosubmit: grfn <grfn@gws.fyi> Tested-by: BuildkiteCI
2022-11-05 r/5252 fix(tvix/eval): change ordinary (//) to rustdoc-comments (///)Adam Joseph1-3/+3
This fixes a mistake I made in d978b556e6. Change-Id: I88db697105a7149e9785f6aface03bff68566d2b Signed-off-by: Adam Joseph <adam@westernsemico.com> Reviewed-on: https://cl.tvl.fyi/c/depot/+/7085 Reviewed-by: grfn <grfn@gws.fyi> Tested-by: BuildkiteCI
2022-11-05 r/5251 fix(tvix/eval): Scope.inherit(): fix scope_depth, with_stack_depthAdam Joseph1-0/+2
Scope_depth and with_stack_depth were being reset to zero for nested function abstractions. Fortunately nothing depends on them being computed correctly in these cases, but it sure was confusing. Change-Id: I59980b6a5aff043f60079f97211220b0086eb97d Signed-off-by: Adam Joseph <adam@westernsemico.com> Reviewed-on: https://cl.tvl.fyi/c/depot/+/7091 Reviewed-by: tazjin <tazjin@tvl.su> Tested-by: BuildkiteCI
2022-11-05 r/5250 refactor(tvix/eval): rename Opcode::DataLocalIdx to DataStackIdxAdam Joseph4-7/+7
It is very confusing that this opcode is called DataLocalIdx, but it carries a StackIdx rather than a LocalIdx. It seems like this really ought to be called DataStackIdx, but maybe I've misunderstood; if so please explain it to me. Change-Id: I91f6ffa759412beef0b91d3c19ec0d873fe51b99 Signed-off-by: Adam Joseph <adam@westernsemico.com> Reviewed-on: https://cl.tvl.fyi/c/depot/+/7088 Reviewed-by: tazjin <tazjin@tvl.su> Tested-by: BuildkiteCI
2022-11-05 r/5249 chore(whitby): Update grafana configGriffin Smith1-63/+44
Uncomment and update the grafana config for whitby based on the new config format that nixos accepts. I've validated this locally by visually inspecting the resulting `ini` file, but not actually run it yet. Change-Id: I12d78ae48146e1b01bd2a4152276d4c6b16c1a3d Reviewed-on: https://cl.tvl.fyi/c/depot/+/7191 Autosubmit: grfn <grfn@gws.fyi> Tested-by: BuildkiteCI Reviewed-by: sterni <sternenseemann@systemli.org> Reviewed-by: tazjin <tazjin@tvl.su>
2022-11-05 r/5248 chore(grfn/system): Update grafana configuration for mugwumpGriffin Smith1-5/+12
Lots of deprecations were made in the new nixos version for the grafana config - this updates all of those settings in mugwump's system config Change-Id: I69cdc9d2d59702c38d6334a4d27a04bef4e8c132 Reviewed-on: https://cl.tvl.fyi/c/depot/+/7190 Reviewed-by: grfn <grfn@gws.fyi> Autosubmit: grfn <grfn@gws.fyi> Tested-by: BuildkiteCI
2022-11-04 r/5247 refactor(rust-crates-advisory): redo the buildkite report in bashsterni1-40/+41
I've elected to split the check-all-our-lock-files script into two new scripts: One very simple script which generates the report by invoking lock-file-report on the fake lock file for //third_party/rust-crates and all lock files in depot, and one which executes this and adds it as a buildkite annotation if there are any warnings (which is reported by the report generating script using a non zero exit code). The latter script could become the basis for generalizing buildkite annotations, a slight attempt at making it easily reusable in the future has been made. So far we expect a report generating script to exit non zero if a report should be made and to print commonmark to stdout. In the future we may want to use a JSON format for generating the report, allowing us to filter it by buildkite target (using the drvmap to exclude certain reports, potentially). Change-Id: I1df9e440509d69adff5b8e6304105a45dc62c018 Reviewed-on: https://cl.tvl.fyi/c/depot/+/5260 Reviewed-by: kn <klemens@posteo.de> Reviewed-by: tazjin <tazjin@tvl.su> Tested-by: BuildkiteCI
2022-11-04 r/5246 refactor(rust-crates-advisory): redo tree-lock-file-report in bashsterni1-36/+14
I think migrating the execline scripts over to bash makes sense: 1. Ever since nixpkgs-fmt, execline scripts in depot have become a huge pain to write and edit and I can't think of a satisfying solution to this problem. 2. The scripts here require remembering things across loop cycles (i. e. the status variable) which is not possible in pure execline. As a a workaround we used to read the entire report into memory first and check if it was empty (tying us to the argv limit for the report length). Change-Id: I954b08b982ef947f9014a685676d2b83a2aec4d2 Reviewed-on: https://cl.tvl.fyi/c/depot/+/5259 Reviewed-by: tazjin <tazjin@tvl.su> Tested-by: BuildkiteCI
2022-11-04 r/5245 docs(tvix/eval): add comments for Opcode::DataXXX opcodesAdam Joseph1-2/+8
Signed-off-by: Adam Joseph <adam@westernsemico.com> Change-Id: I8c72405880a9342eb502d92c1e0087f5bb17e03c Reviewed-on: https://cl.tvl.fyi/c/depot/+/7087 Tested-by: BuildkiteCI Reviewed-by: tazjin <tazjin@tvl.su>
2022-11-04 r/5244 feat(tvix/eval): implement builtins.splitAdam Joseph4-1/+39
This implements builtins.split, and passes eval-okay-regex-split.nix (which is moved out of notyetpassing). Signed-off-by: Adam Joseph <adam@westernsemico.com> Change-Id: Ieb0975da2058966c697ee0e2f5b3f26ccabfae57 Reviewed-on: https://cl.tvl.fyi/c/depot/+/7143 Tested-by: BuildkiteCI Reviewed-by: grfn <grfn@gws.fyi>
2022-11-04 r/5243 fix(web/blog): Parameterize renderPost with staticUrlWilliam Carroll2-5/+4
This was broken in my blog for way too long. Change-Id: I03c45c666d67006a4608a4b19d6167ab692e321d Reviewed-on: https://cl.tvl.fyi/c/depot/+/5905 Reviewed-by: wpcarro <wpcarro@gmail.com> Reviewed-by: tazjin <tazjin@tvl.su> Autosubmit: wpcarro <wpcarro@gmail.com> Tested-by: BuildkiteCI
2022-11-04 r/5242 test(tvix/eval): add a test case for groupBy with thunksAdam Joseph3-0/+9
We have to be careful implementing `builtins.groupBy`, since the list may contain thunks, and tvix's to_xxx() functions do not work on thunks. Signed-off-by: Adam Joseph <adam@westernsemico.com> Change-Id: I182b6fc2d4296f864ed16744ef70b153e8e6978a Reviewed-on: https://cl.tvl.fyi/c/depot/+/7039 Reviewed-by: tazjin <tazjin@tvl.su> Tested-by: BuildkiteCI
2022-11-04 r/5241 fix(tvix/eval): quote keys which are not valid identifiersAdam Joseph3-1/+26
The impl Display for NixAttrs needs to wrap double quotes around any keys which are not valid Nix identifiers. This commit does that, and adds a test (which fails prior to this commit and passes after this commit). Change-Id: Ie31ce91e8637cb27073f23f115db81feefdc6424 Reviewed-on: https://cl.tvl.fyi/c/depot/+/7084 Autosubmit: Adam Joseph <adam@westernsemico.com> Reviewed-by: tazjin <tazjin@tvl.su> Tested-by: BuildkiteCI
2022-11-04 r/5240 fix(tvix_eval): {stack,local}_idx confusionAdam Joseph1-4/+4
The variable name `local_idx` is used here for a StackIdx, which invites confusion. Signed-off-by: Adam Joseph <adam@westernsemico.com> Change-Id: I2e22db90acdc0d29586ee5b72ea18d42d93badcb Reviewed-on: https://cl.tvl.fyi/c/depot/+/7086 Reviewed-by: tazjin <tazjin@tvl.su> Tested-by: BuildkiteCI
2022-11-04 r/5239 chore(tazjin/nixos): set laptop timezones to Europe/StockholmVincent Ambo1-1/+1
Change-Id: I9ae66d54cc557e0f4dec7bd3b38022274b16263f Reviewed-on: https://cl.tvl.fyi/c/depot/+/7169 Autosubmit: tazjin <tazjin@tvl.su> Tested-by: BuildkiteCI Reviewed-by: tazjin <tazjin@tvl.su>
2022-11-04 r/5238 chore(tazjin/zamalek): hardcode wifi.silja.fi addressVincent Ambo1-0/+4
The DNS server on the network of this boat refuses to deliver *any* results to my laptop, only to my phone, so I had to do some trickery to figure out the address of the WiFi login portal. Change-Id: I7934c570be79d6191feb999e6860428623cfd88f Reviewed-on: https://cl.tvl.fyi/c/depot/+/7168 Autosubmit: tazjin <tazjin@tvl.su> Tested-by: BuildkiteCI Reviewed-by: tazjin <tazjin@tvl.su>
2022-11-04 r/5237 fix(tvix/eval): inline mis-named Local::above()Adam Joseph1-6/+1
If self.depth > other.depth then self is deeper than other, so self is *below* other, not above it. Let's just inline the function. Change-Id: I8dda3d90cbc86c8a6fa01bc4a5e506a2e403bd20 Signed-off-by: Adam Joseph <adam@westernsemico.com> Reviewed-on: https://cl.tvl.fyi/c/depot/+/7090 Reviewed-by: tazjin <tazjin@tvl.su> Tested-by: BuildkiteCI
2022-11-04 r/5236 fix(tvix/eval): remove impl PartialEq for ValueAdam Joseph8-24/+31
It isn't possible to implement PartialEq properly for Value, because any sensible implementation needs to force() thunks, which cannot be done without a `&mut VM`. The existing derive(PartialEq) has false negatives, which caused the bug which cl/7142 fixed. Fortunately that bug was easy to find, but a silent false negative deep within the bowels of nixpkgs could be a real nightmare to hunt down. Let's just remove the PartialEq impl for Value, and the other derive(PartialEq)'s that depend on it. Signed-off-by: Adam Joseph <adam@westernsemico.com> Change-Id: Iacd3726fefc7fc1edadcd7e9b586e04cf8466775 Reviewed-on: https://cl.tvl.fyi/c/depot/+/7144 Reviewed-by: kanepyork <rikingcoding@gmail.com> Reviewed-by: tazjin <tazjin@tvl.su> Tested-by: BuildkiteCI
2022-11-03 r/5235 feat(tvix/eval): add rust-analyzer to dev-envFlorian Klink1-1/+2
I think we should bring this into $PATH too. Change-Id: Ie31ac558355b7c4ed9dcd3dd60e1b03f141d1178 Reviewed-on: https://cl.tvl.fyi/c/depot/+/7166 Autosubmit: flokli <flokli@flokli.de> Reviewed-by: tazjin <tazjin@tvl.su> Tested-by: BuildkiteCI
2022-11-03 r/5234 chore(3p/sources): Bump channels & overlayssterni1-16/+16
Relatively minor bump, but makes sure we use a proper channel again instead of a (not so) random commit on staging-next. Should include the odd build fix or two as well. Change-Id: Iefe7afdf173828edcb3e88263d27aba13ded691b Reviewed-on: https://cl.tvl.fyi/c/depot/+/7167 Tested-by: BuildkiteCI Reviewed-by: tazjin <tazjin@tvl.su>
2022-11-03 r/5233 fix(3p/overlays/tvl): fix nvd with Nix 2.3sterni2-0/+18
If more of these issues crop up, we should consider making a patch for our Nix fork that ignores the --experimental-features flag. Change-Id: If146804f2c9f9375f2035985a6fd99f72b0fdcc7 Reviewed-on: https://cl.tvl.fyi/c/depot/+/7165 Autosubmit: sterni <sternenseemann@systemli.org> Tested-by: BuildkiteCI Reviewed-by: tazjin <tazjin@tvl.su>
2022-11-03 r/5232 chore(3p/sources): Bump channels & overlays (OpenSSL edition)sterni6-89/+152
* //ops/machines/whitby: Disable grafana, since the grafana module was changed upstream in a way that our configuration no longer works. Since the OpenSSL security update is relatively pressing, adapting the grafana configuration beforehand is not a hard requirement. See https://github.com/NixOS/nixpkgs/pull/191768. * //tools/depotfmt: keep Go at version 1.18 to forgo a reformat of the tree. * //nix/buildGo: keep Go at version 1.18, as 1.19 changed the CLI interface (?) in a way that breaks buildGo. * //3p/overlays/tvl: drop upstreamed tdlib upgrade. * //3p/overlays/tvl: patch buf to work around breakage due to git 2.38.1 TODO items for Go are tracked in b/215. Change-Id: Ie08fef49cf3db12e6b5225a8b992a990ddc5b642 Reviewed-on: https://cl.tvl.fyi/c/depot/+/7141 Tested-by: BuildkiteCI Autosubmit: sterni <sternenseemann@systemli.org> Reviewed-by: grfn <grfn@gws.fyi> Reviewed-by: tazjin <tazjin@tvl.su>
2022-11-02 r/5231 chore(tvix/proto/castore.proto): drop Blob and ChunkFlorian Klink1-10/+0
In ripple, this is used for the internal on-disk format, but it's not suitable for remote consumption. Change-Id: I327361a2254566ac9216e23eaed36dba8fdd283b Reviewed-on: https://cl.tvl.fyi/c/depot/+/7127 Tested-by: BuildkiteCI Reviewed-by: edef <edef@edef.eu>
2022-11-02 r/5230 feat(tvix/proto): add castore.protoFlorian Klink2-0/+41
This is 0d4906cbabb183caa96e763671810fb39bd0c935:ripple/fossil/src/store.proto, from https://src.unfathomable.blue. It is not pulled in as a subtree, as some of the commits in there break index-pack: ``` remote: error: object 2f487c3bf7cd8efd64f1d217edac732db98ff1c0: badDateOverflow: invalid author/committer line - date causes integer overflow remote: fatal: fsck error in packed object error: remote unpack failed: index-pack abnormal exit ``` Co-authored-by: edef <edef@unfathomable.blue> Change-Id: I3369044090a3192e2322775a335887c37536a942 Reviewed-on: https://cl.tvl.fyi/c/depot/+/7126 Tested-by: BuildkiteCI Reviewed-by: edef <edef@edef.eu>
2022-11-02 r/5229 chore(web/tvl): remove url, for nowAdam Joseph1-1/+1
... until I get my self-hosting situation dealt with. Signed-off-by: Adam Joseph <adam@westernsemico.com> Change-Id: I44764862f754286249b90278f3932c1470e8214c Reviewed-on: https://cl.tvl.fyi/c/depot/+/7146 Tested-by: BuildkiteCI Reviewed-by: sterni <sternenseemann@systemli.org>
2022-11-01 r/5228 feat(wpcarro/blog): nix-env (note to self)William Carroll2-0/+40
Thank you, tpw_rules from #nixos IRC :) Change-Id: Iebf07add10d96b38f318afaa175cfc0e35991df9 Reviewed-on: https://cl.tvl.fyi/c/depot/+/7145 Reviewed-by: wpcarro <wpcarro@gmail.com> Autosubmit: wpcarro <wpcarro@gmail.com> Tested-by: BuildkiteCI
2022-11-01 r/5227 feat(ops/buildkite): Support "soft failures"William Carroll1-0/+4
Example Usage: ```nix { pkgs, ... }: (pkgs.writeText "foo" "bar").overrideAttrs (_: { meta.ci.extraSteps.bar = { label = "testing soft_fail"; softFail = [ { exit_status = 253; } { exit_status = 251; } ]; command = pkgs.writeShellScript "fail" '' # Trigger a soft failure by exiting 253 or 251 exit 253 ''; }; }) ``` Buildkite Documentation: https://buildkite.com/changelog/56-command-steps-can-now-be-made-to-soft-fail Change-Id: Idfce15a8d9cde568aa24ebd03956ada399bba5d2 Reviewed-on: https://cl.tvl.fyi/c/depot/+/7076 Tested-by: BuildkiteCI Reviewed-by: tazjin <tazjin@tvl.su>
2022-10-31 r/5226 fix(tvix/eval): nix_eq() must recurseAdam Joseph5-3/+5
The current implementation of nix_eq will force one level of thunks and then switch to the (non-forcing) rust Eq::eq() method. This gives incorrect results for lists-of-thunks. This commit changes nix_eq() to be recursive. A regression test (which fails prior to this commit) is included. This fix also causes nix_tests/eval-okay-fromjson.nix to pass, so it is moved out of notyetpassing. Change-Id: I655fd7a5294208a7b39df8e2c3c12a8b9768292f Signed-off-by: Adam Joseph <adam@westernsemico.com> Reviewed-on: https://cl.tvl.fyi/c/depot/+/7142 Tested-by: BuildkiteCI Reviewed-by: tazjin <tazjin@tvl.su>
2022-10-31 r/5225 docs(tvix/eval): builtins.md: note implementation statusAdam Joseph1-116/+123
We're getting close to the finish line, folks. I went through the list of builtins and there are only 33 that remain unimplemented. I've marked them, and indicated which are ready to be implemented vs which are waiting for other things. We can delete this column from the table once everything is implemented. Signed-off-by: Adam Joseph <adam@westernsemico.com> Change-Id: Idfaef93283536288b12e59aef5c3e1cd139bd133 Reviewed-on: https://cl.tvl.fyi/c/depot/+/7140 Tested-by: BuildkiteCI Reviewed-by: tazjin <tazjin@tvl.su>
2022-10-30 r/5224 docs(tvix/eval): builtins.md: mark impureAdam Joseph1-7/+7
I believe that the currentTime, findFile, hashFile, pathExists, readDir, path (unless ?sha256), and readFile builtins are impure. This commit marks them as such in docs/builtins.md. Change-Id: Ib1b59fe643dde73cb2b00050b4ef9d3401ad22eb Signed-off-by: Adam Joseph <adam@westernsemico.com> Reviewed-on: https://cl.tvl.fyi/c/depot/+/7139 Reviewed-by: tazjin <tazjin@tvl.su> Tested-by: BuildkiteCI
2022-10-29 r/5223 test(tvix/eval): builtins.sort must preserve order of equal elementssterni2-0/+8
Change-Id: I59a0756940d1e5360a2ab4e886cf0bc9af7b8901 Reviewed-on: https://cl.tvl.fyi/c/depot/+/7133 Autosubmit: sterni <sternenseemann@systemli.org> Tested-by: BuildkiteCI Reviewed-by: tazjin <tazjin@tvl.su>
2022-10-29 r/5222 feat(tvix/eval): Implement builtins.sortGriffin Smith4-3/+46
This is a bit tricky because the comparator can throw errors, so we need to propagate them out if they exist and try to avoid sorting forever by returning a reasonable ordering in this case (as short-circuiting is not available). Co-Authored-By: Vincent Ambo <tazjin@tvl.su> Change-Id: Icae1d30f43ec1ae64b2ba51e73ee467605686792 Reviewed-on: https://cl.tvl.fyi/c/depot/+/7072 Tested-by: BuildkiteCI Reviewed-by: sterni <sternenseemann@systemli.org>
2022-10-29 r/5221 feat(tvix/eval): Implement comparison for listsGriffin Smith7-3/+45
Lists are compared lexicographically in C++ nix as of [0], and our updated nix test suites depend on this. This implements comparison of list values in `Value::nix_cmp` using a very similar algorithm to what C++ does - similarly to there, this requires passing in the VM so we can force thunks in the list elements as we go. [0]: https://github.com/NixOS/nix/commit/09471d2680292af48b2788108de56a8da755d661# Change-Id: I5d8bb07f90647a1fec83f775243e21af856afbb1 Reviewed-on: https://cl.tvl.fyi/c/depot/+/7070 Autosubmit: grfn <grfn@gws.fyi> Reviewed-by: sterni <sternenseemann@systemli.org> Tested-by: BuildkiteCI