about summary refs log tree commit diff
path: root/nix/tag (unfollow)
AgeCommit message (Collapse)AuthorFilesLines
2021-01-30 r/2166 feat(nix): add nix.tag, a way of discriminating via tagged unionsProfpatsch2-0/+237
Introduces the concept of a “tag”, a single-keyed attrset which annotates a nix value with a name. This can be used to implement tagged unions (by implying the list of possible tags is well-known), which has some overlap with how `nix.yants` does it. However, the more fascinating use-case is in concert with a so-called discriminator, `match` and hylomorphisms. The discriminator can take a nix value, and add tags to it based on some predicate. With `match`, we can then use that information to convert the discriminated values again. With `hylo`, we can combine both the “constructive” discriminator step with the “destructive” match step to recursively walk over a nix data structure (based on a description of how to recurse, e.g. through attrset values or list values), and then apply a transformation in one go. Change-Id: Ia335ca8b0881447fbbcb6bcd80f49feb835f1715 Reviewed-on: https://cl.tvl.fyi/c/depot/+/2434 Tested-by: BuildkiteCI Reviewed-by: sterni <sternenseemann@systemli.org>
2021-01-30 r/2165 feat(nix/readTree): add tests of the traversal logic in READMEProfpatsch15-1/+95
This should closely match the documented behaviour. It might still be missing some edge cases of course. Change-Id: I5c75fa045d5f3be8cf5eab787a02644500c14522 Reviewed-on: https://cl.tvl.fyi/c/depot/+/2466 Reviewed-by: tazjin <mail@tazj.in> Tested-by: BuildkiteCI
2021-01-30 r/2164 feat(nix/readTree): add tests of the README exampleProfpatsch7-0/+47
First step to slowly giving readTree some coverage, so we can do refactoring without breaking functionality. Change-Id: If25a8c0fa9c4ac7472c0473372f10a9326cccaf7 Reviewed-on: https://cl.tvl.fyi/c/depot/+/2465 Reviewed-by: tazjin <mail@tazj.in> Tested-by: BuildkiteCI
2021-01-30 r/2163 chore(nix/readTree): move function into __functorProfpatsch1-12/+13
We are going to export some tests under `nix.readTree.tests`, so in order to do that and still have `nix.readTree` be a function, let’s move it to `__functor`. This requires wiring the `args` and `initPath` arguments through explicitly. Change-Id: Ife7956b85d35e59c22174b42dcb7cca83ed868ea Reviewed-on: https://cl.tvl.fyi/c/depot/+/2464 Reviewed-by: tazjin <mail@tazj.in> Tested-by: BuildkiteCI
2021-01-30 r/2162 feat(nix/runTestsuite): add assertThrowsProfpatsch1-4/+22
Uses `builtins.tryEval` to check that the expression throws when `deepSeq`-ed. Change-Id: I0d57cc37f473bb733f57a1b1c0d889084152fd2f Reviewed-on: https://cl.tvl.fyi/c/depot/+/2463 Tested-by: BuildkiteCI Reviewed-by: sterni <sternenseemann@systemli.org>
2021-01-30 r/2161 fix(nix/runTestsuite): wrap runTestsuite into derivationProfpatsch1-8/+26
Previously we would throw or return `{}`, which doesn’t integrate nicely into our CI; thus, let’s wrap it into a derivation which either fails the build or doesn’t. Change-Id: I65880d86b8393094661e57a0b32aafe748bf1dd5 Reviewed-on: https://cl.tvl.fyi/c/depot/+/2462 Reviewed-by: sterni <sternenseemann@systemli.org> Tested-by: BuildkiteCI
2021-01-30 r/2160 fix(ops/piplines/static-pipeline): add --show-trace to nix-buildProfpatsch1-1/+1
Change-Id: Ib0473f916b1436934844e620ce981f52d11e8512 Reviewed-on: https://cl.tvl.fyi/c/depot/+/2467 Tested-by: BuildkiteCI Reviewed-by: tazjin <mail@tazj.in>
2021-01-30 r/2159 chore(3p|nix): Remove typed GoVincent Ambo7-89/+3
Nobody has actually done any experimentation with typed Go, so we're getting rid of it for now - it's causing annoying IFD during build graph generation. Change-Id: Ibac3dea98ebed1b3ee08acda184d24c500cf695d Reviewed-on: https://cl.tvl.fyi/c/depot/+/2458 Tested-by: BuildkiteCI Reviewed-by: sterni <sternenseemann@systemli.org> Reviewed-by: lukegb <lukegb@tvl.fyi> Reviewed-by: Profpatsch <mail@profpatsch.de>
2021-01-29 r/2158 feat(gs/emacs): Only run clj-kondo on clojure filesGriffin Smith2-1/+6
Change-Id: Ia7f18e0514f29e450dfc6a7bbdbc5e47ab7636b5 Reviewed-on: https://cl.tvl.fyi/c/depot/+/2460 Reviewed-by: glittershark <grfn@gws.fyi> Tested-by: BuildkiteCI
2021-01-29 r/2157