about summary refs log tree commit diff
path: root/nix
AgeCommit message (Collapse)AuthorFilesLines
2022-01-22 r/3657 refactor(ops/pipelines): Split build/post steps into separate chunksVincent Ambo1-16/+9
This will create `build-chunk-$n.json` files for steps that should run _before_ duck, and `post-chunk-$n.json` files for steps that should run after duck. The post steps are not yet uploaded to Buildkite, but we also don't have any right now. Change-Id: I7e1b59cf55a8bf1d97266f6e988aa496959077bf Reviewed-on: https://cl.tvl.fyi/c/depot/+/5047 Tested-by: BuildkiteCI Reviewed-by: ezemtsov <eugene.zemtsov@gmail.com> Autosubmit: tazjin <tazjin@tvl.su>
2022-01-21 r/3652 feat(nix/buildkite): Add support for extra stepsVincent Ambo1-17/+85
This introduces a new feature to our CI system in which targets can declare extra steps in `meta.ci.extraSteps`. See the comment in //nix/buildkite/default.nix for an explanation of how these extra steps are defined. Change-Id: Icce2890c743286dd37f43024cd390dcebac8cdba Reviewed-on: https://cl.tvl.fyi/c/depot/+/5008 Tested-by: BuildkiteCI Reviewed-by: ezemtsov <eugene.zemtsov@gmail.com>
2022-01-20 r/3651 chore(nix/buildkite): Drop `--fork-point` parameterVincent Ambo1-1/+1
The --fork-point parameter is dependent on reflog data which may get garbage collected. This can lead to flaky behaviour where it returns no results and fails if `git gc` recently ran (Buildkite will do this occasionally). Though the parameter is semantically closer to what we're looking for, the output is *usually* the same commit since we're not dealing with more than one thing to compare. Change-Id: Idc31e7a26fda2b7113edfa162d9d3811b1a01bf6 Reviewed-on: https://cl.tvl.fyi/c/depot/+/5032 Tested-by: BuildkiteCI Autosubmit: tazjin <tazjin@tvl.su> Reviewed-by: sterni <sternenseemann@systemli.org>
2022-01-20 r/3640 fix(nix/buildkite): prevent swallowing errors from git-merge-baseVincent Ambo1-5/+7
The `local` usage we had before would silently swallow non-zero exit statuses from the substituted git commands. For some (as of yet unknown) reason, `git merge-base` seems to sometimes silently fail and produce no output, which broke the rest of the script logic. This change will lead to an earlier error, but we don't know if it is a fix for the actual cause of the git-merge-base problem because the shape of that problem is unclear. Change-Id: I4555c8638da450263fa2fd2c274dfdb69f65578e Reviewed-on: https://cl.tvl.fyi/c/depot/+/5012 Tested-by: BuildkiteCI Reviewed-by: kn <klemens@posteo.de>
2022-01-19 r/3637 refactor(nix/buildkite): Move fetch-parent-targets script hereVincent Ambo1-0/+41
This is no longer TVL-specific and should live here with the other generalised stuff. Change-Id: I95a1b4c0321f34812162d6fd40568269abf639dd Reviewed-on: https://cl.tvl.fyi/c/depot/+/5006 Tested-by: BuildkiteCI Autosubmit: tazjin <tazjin@tvl.su> Reviewed-by: ezemtsov <eugene.zemtsov@gmail.com>
2022-01-19 r/3634 fix(nix/buildLisp): use filtered deps for native deps in testSuitesterni1-1/+1
allDeps filters the lisp deps according to the given implementation, processing any implementation conditional attribute sets. These are not understood by allNative, so we need to pass it the already filtered input or evaluation would fail. Change-Id: I9eb2d0c3b2bf70d759d03490cf31fc585283ce7f Reviewed-on: https://cl.tvl.fyi/c/depot/+/5001 Reviewed-by: sterni <sternenseemann@systemli.org> Reviewed-by: tazjin <tazjin@tvl.su> Autosubmit: sterni <sternenseemann@systemli.org> Tested-by: BuildkiteCI
2022-01-17 r/3619 fix(3p): Move away from builtins.fetchGitVincent Ambo1-0/+2
Moves to the derivation-based git fetchers everywhere in third-party. This might help with forward-compatibility with newer Nix versions, though that's not our primary concern right now. Change-Id: I565bb72585b8639893e9ea3a9e233338aede63a9 Reviewed-on: https://cl.tvl.fyi/c/depot/+/3903 Tested-by: BuildkiteCI Reviewed-by: zseri <zseri.devel@ytrizja.de>
2022-01-17 r/3602 feat(nix/buildkite): Check target map of parent to determine skipsVincent Ambo1-22/+22
This changes the logic for build pipeline generation to inspect an (optional) parentTargetMap attribute which contains the derivation map of a target commit. Targets that existed in a parent commit with the same drv hash will be skipped, as they are not considered to have changed. This does not yet wire up any logic for retrieving the target map from storage, meaning that at this commit all targets are always built. The intention is that we will have logic to fetch the target map (initially from Buildkite artefact storage), which we then pass to the depot via externalArgs when actually generating the pipeline. Change-Id: I3373c60aaf4b56b94c6ab64e2e5eef68dea9287c Reviewed-on: https://cl.tvl.fyi/c/depot/+/4946 Tested-by: BuildkiteCI Reviewed-by: sterni <sternenseemann@systemli.org>
2022-01-17 r/3601 feat(ops/pipelines): Create drvmap structure for each commitVincent Ambo1-3/+23
Always create a structure that maps all targets to derivations, and persist it as a JSON file. This relates to some of the ideas expressed in: https://docs.google.com/document/d/16A0a5oUxH1VoiSM8hyFyLW0WiUYpNo2e2D6FTW4BlH8/edit The file is always uploaded to Buildkite as an artifact. This allows for retrieving it based on the commit ID in a Buildkite GraphQL query. By default, Buildkite stores artefacts for 6 months. Storage location can be overridden (with custom retention) through some environment variables, but for now at TVL the Buildkite-managed storage is fine. See also: https://buildkite.com/docs/pipelines/artifacts In the subsequent filtering implementation, when diffing commits across a time-range that exceeds artefact retention time, we should simply default to building everything. Change-Id: I6d808461cd1c1fdd6983ba8c8ef075736d42caa7 Reviewed-on: https://cl.tvl.fyi/c/depot/+/3662 Tested-by: BuildkiteCI Reviewed-by: sterni <sternenseemann@systemli.org>
2021-12-28 r/3491 refactor: Generalise pipeline generation in //nix/buildkiteVincent Ambo1-0/+165
Extracts the logic for generating our Buildkite pipeline (which has been copy&pasted and slightly modified in some places outside of depot) into a generic //nix/buildkite library. This should cause no change in functionality. Change-Id: Iad3201713945de41279b39e4f1b847f697c179f7 Reviewed-on: https://cl.tvl.fyi/c/depot/+/4726 Autosubmit: tazjin <mail@tazj.in> Tested-by: BuildkiteCI Reviewed-by: sterni <sternenseemann@systemli.org>
2021-12-27 r/3463 feat(nix/yants): improve error message for errornous predicatezseri1-4/+9
while trying to yantsify `mkSecrets` in https://cl.tvl.fyi/c/depot/+/4688, I(zseri) needed to debug a failing evaluation which boiled down to a result.ok containing something which wasn't boolean, but the error message didn't indicate where that value came from. I debugged yants and found that the only place which didn't simply combine boolean values or use functions which always return booleans, I managed to isolate the error to the `pred v` expression. To avoid the necessity to debug yants to find this, I improve the error message for this case to mention that - a restriction predicate is invalid - what's the name of the failing restriction - the unexpected predicate return value Change-Id: I6c570a33ccc5afc445f208e2e8855c49fb37abaf Reviewed-on: https://cl.tvl.fyi/c/depot/+/4698 Tested-by: BuildkiteCI Reviewed-by: zseri <zseri.devel@ytrizja.de> Reviewed-by: tazjin <mail@tazj.in> Autosubmit: zseri <zseri.devel@ytrizja.de>
2021-12-20 r/3328 fix(nix/buildLisp): don't emit a target for impl used at top levelsterni1-1/+1
These targets would be the same derivation, but named differently which is noisy and causes a few, mostly subtle issues: * Buildkite struggles with large pipelines a bit, we can save quite a few steps by removing these. * Having two jobs for the same derivation sometimes causes the annoying situation that an agent would do nothing except waiting for a lock. * Non-nix CI we add in the future may not be able to recognize that these targets are the same and do extra work unnecessarily. Change-Id: I1103e719ade1d3859d222b713969ac34a8765cba Reviewed-on: https://cl.tvl.fyi/c/depot/+/4515 Autosubmit: sterni <sternenseemann@systemli.org> Tested-by: BuildkiteCI Reviewed-by: tazjin <mail@tazj.in>
2021-12-17 r/3285 feat(nix/utils): handle toString-able sets produced by builtins.pathsterni2-3/+8
When preparing cl/4381 I noticed that we actually handle this case properly. depot.nix.utils.storePathName depot.path now works as expected. Change-Id: Ice9329c67b2e2210852012f5abe82fbbb13193de Reviewed-on: https://cl.tvl.fyi/c/depot/+/4382 Tested-by: BuildkiteCI Reviewed-by: tazjin <mail@tazj.in> Autosubmit: sterni <sternenseemann@systemli.org>
2021-12-16 r/3271 docs(nix/readTree): Tweak grammar of docs for `gather`Griffin Smith1-1/+1
This seemed to be missing a word previously. Change-Id: Ifa860051d6b692a626dbaddbaee44b761f2274ff Reviewed-on: https://cl.tvl.fyi/c/depot/+/4386 Autosubmit: grfn <grfn@gws.fyi> Tested-by: BuildkiteCI Reviewed-by: tazjin <mail@tazj.in>
2021-12-08 r/3158 fix(readTree): Apply .skip-subtree to Nix-file children as wellVincent Ambo1-1/+2
This behaviour was previously confusing, since readTree's data structure treats children from Nix files and directories as identical but only one of them would be affected by .skip-subtree The "subtree" to be skipped here refers to all children of the structure. Change-Id: Idf596c9823f09cc2acf49523916bde4b801b8519
2021-11-25 r/3093 fix(nix/runTestsuite): don't crash on big test suitessterni1-8/+9
Having `prettyRes` in the execline script causes it to fail because of the argv limit if your test suite is long enough. For the succeeding one we can work around this by hashing it (since we only care that something changes if the test suite changes), in the case of the failing one where we want to print the results, we use runExecline's stdin mechanism. Change-Id: I2489f76acfbe809351f51caefe2a477328a70ee3
2021-11-23 r/3088 refactor(readTree): Move 'drvTargets' into readTreeVincent Ambo3-18/+18
This function is also generally useful for readTree consumers that have the concept of subtargets. Change-Id: Ic7fc03380dec6953fb288763a28e50ab3624d233
2021-11-23 r/3087 refactor(readTree): Move 'gather' into readTree itselfVincent Ambo1-0/+34
Discovering CI targets is relevant to all readTree consumers and this logic is not TVL-specific. Change-Id: I81ed3d3f76a6c36119f04bee28ca995a013f0e35
2021-11-23 r/3084 refactor(readTree): Move copy of 'fix' into readTreeVincent Ambo1-0/+7
This is often used when bootstrapping a repository with readTree, before lib is available. Having this definition in readTree is more convenient than copy&pasting it around to callsites. Change-Id: I6d5d27ed142bea704843fe289ad2674be8c4d360
2021-11-23 r/3082 refactor(readTree): Move 'restrictFolder' function into readTreeVincent Ambo1-2/+33
This is generally useful for readTree users and should be part of readTree itself. This is a move towards exposing several readTree-related features from the library itself, in the future also including logic like 'gather'. Note that this has a small functional change: In error messages of the function, the notation for accessing Nix attributes is now used rather than the Perforce-style `//` notation common in TVL. For example, an error at `//web/tvl/logo` will produce `web.tvl.logo` in the error message (which corresponds to the readTree attribute itself). This makes more sense for non-TVL consumers of readTree, as the Perforce-style notation is custom to us specifically. Change-Id: I8e199e473843c40db40b404c20d2c71f48a0f658
2021-11-15 r/3070 refactor(readTree): Flip argument order of argFilterVincent Ambo1-2/+2
Since the filters return 'args', this makes nesting of filters more readable. Change-Id: I775252460e3e077cc6db2fab6f3948414a95ecbf Reviewed-on: https://cl.tvl.fyi/c/depot/+/3873 Tested-by: BuildkiteCI Reviewed-by: sterni <sternenseemann@systemli.org>
2021-11-14 Note recommended use of 'or' in override patternsVincent Ambo1-2/+9
This fixes #6
2021-11-14 Document binding of attribute set arguments using '@'Vincent Ambo1-0/+27
First and foremost this is being added because it was lacking, and nix-1p strives to have fairly complete coverage of all useful features. Additionally, as pointed out by @nixinator in #6 there is some surprising behaviour around how default arguments work in combination with '@' and I thought this was worth noting.
2021-10-24 r/2991 refactor(nix/tag): use throw over lib.assertMsgsterni1-1/+1
Slightly prettier error message etc. Change-Id: I9af4ec6ce337c65b5ca0820dc15a4e084832c529 Reviewed-on: https://cl.tvl.fyi/c/depot/+/3542 Tested-by: BuildkiteCI Reviewed-by: tazjin <mail@tazj.in>
2021-10-19 r/2975 chore(nix/renderMarkdown): Move out of //users/tazjinVincent Ambo1-0/+8
Change-Id: Ia5e873420b57436abead8e02cef3e5b7149de123 Reviewed-on: https://cl.tvl.fyi/c/depot/+/3731 Tested-by: BuildkiteCI Reviewed-by: sterni <sternenseemann@systemli.org>
2021-10-10 r/2957 feat(nix/sparseTree): allow specifying subtrees as relative pathssterni1-2/+10
Passed strings will be treated as a relative path below the given root, which is quite convenient when using depot.path by eliminating a lot of repetition. Change-Id: I3da6058094484f4a6ffbb84f89ad4472b502a00c Reviewed-on: https://cl.tvl.fyi/c/depot/+/3704 Tested-by: BuildkiteCI Reviewed-by: tazjin <mail@tazj.in>
2021-10-05 r/2950 test(nix/readTree): test marking behavior of readTreesterni5-0/+35
This ensures in a simple example that __readTree and __readTreeChildren are populated correctly. Change-Id: I69a46b2ddde0d1f9bf0dff1c4780f033ac8fc27a Reviewed-on: https://cl.tvl.fyi/c/depot/+/3655 Tested-by: BuildkiteCI Reviewed-by: tazjin <mail@tazj.in>
2021-10-02 r/2947 feat(nix/utils): expose pathType of symlink targetsterni2-13/+104
In order to make readTree import symlinked directories I've been looking into how to detect if a symlink points to a directory (since this would allow us to use symlinks for //nix/sparseTree). I've found a hack for this: symlinkPointsToDir = path: isSymlink path && builtins.pathExists (toString path + "/.") Unfortunately it doesn't seem to be possible to distinguish whether the symlink target does not exist or is a regular file. Since it's possible, I thought might as well add this to `pathType`. To make returning the extra information workable, I've elected to use the attribute set layout used by `//nix/tag`. This doesn't require us to depend anything (as opposed to yants), but gives us pattern matching (via `nix.tag.match`) and also quite idiomatic checking of pathTypes: pathType ./foo ? file (pathType ./foo).symlink or null == "symlink-directory" Nonexistent paths are encoded like this: pathType ./foo ? missing Of course we can't use this in readTree (since it must be zero dependency), but we can easily inline this hack at some point. Change-Id: I15b64a1ea69953c95dc3239ef5860623652b3089 Reviewed-on: https://cl.tvl.fyi/c/depot/+/3535 Tested-by: BuildkiteCI Reviewed-by: Profpatsch <mail@profpatsch.de> Reviewed-by: tazjin <mail@tazj.in>
2021-09-30 r/2938 fix(nix/readTree): generate the correct marker for nix file childrensterni1-1/+1
This was a regression introduced in cl/3554. Change-Id: I0721693a6eb1b28976b28499875812b1c3d1c910 Reviewed-on: https://cl.tvl.fyi/c/depot/+/3654 Tested-by: BuildkiteCI Reviewed-by: tazjin <mail@tazj.in>
2021-09-18 r/2882 feat(nix/nint): accept attribute set with stdout, stderr and exitsterni2-3/+57
This extends the calling convention for nint in a non-breaking way: If the called script returns an attribute set instead of a string the following is done: * If the attributes `stdout` and/or `stderr` exist, their content (which must be a string currently) is written to the respective output. * If the attribute `exit` exists, nint will exit with the given exit code. Must be a number that can be converted to an `i32`. If it's missing, nint will exit without indicating an error. Change-Id: I209cf178fee3d970fdea3b26e4049e944af47457 Reviewed-on: https://cl.tvl.fyi/c/depot/+/3547 Tested-by: BuildkiteCI Reviewed-by: tazjin <mail@tazj.in>
2021-09-17 r/2881 refactor(nix/runTestsuite): clean up runTestsuitesterni1-16/+6
* goodAss wasn't used before. Simplify it to just return a boolean, so we can use it for partitionTests later. * goodIt also returns unnecessary extra meta information which is not used. Cleaning that up makes the condition extremely small, so we can inline it into (what was) goodIts. * goodIts is just called in one place, so we can inline it into res. Change-Id: I70cf4fa3f61ce1467a2ee5319f841cdd42db6a66 Reviewed-on: https://cl.tvl.fyi/c/depot/+/3548 Tested-by: BuildkiteCI Reviewed-by: Profpatsch <mail@profpatsch.de>
2021-09-17 r/2880 test(nix/utils): unit test storePathNamesterni1-0/+16
Change-Id: I4208cf9e3c5e1d922ee5b5bffd034e4ac6d0e2c0 Reviewed-on: https://cl.tvl.fyi/c/depot/+/3543 Tested-by: BuildkiteCI Reviewed-by: tazjin <mail@tazj.in>
2021-09-15 r/2869 feat(nix/readTree): record list of children added by readTreesterni1-18/+33
This change adds a new attribute to readTree nodes, `__readTreeChildren` which is a list of attribute names added to this node by readTree. This is then used by `gather` for `ci.targets` to avoid evaluating attributes unnecessarily. Especially since Nix is not as lazy as we'd like when determining types (i. e. child ? __readTree needs to force `child` even when it's not an attribute set), evaluating attributes unnecessarily is sometimes problematic. Change-Id: I0a98691d41f987e23ee7e9ba21fbe465da5fe402
2021-09-15 r/2862 refactor(nix/nint): use stdout().write_all() over print!()sterni1-3/+3
Change-Id: Ic372442c5156f1e13fea28c1b3e57d64e89ba49b Reviewed-on: https://cl.tvl.fyi/c/depot/+/3546 Tested-by: BuildkiteCI Reviewed-by: sterni <sternenseemann@systemli.org>
2021-09-15 r/2861 refactor(nix/readTree): remove unused assertMsg functionsterni1-5/+0
Change-Id: I4048a59ca3daeb541a7294ce72eebe32982d852c Reviewed-on: https://cl.tvl.fyi/c/depot/+/3553 Tested-by: BuildkiteCI Reviewed-by: tazjin <mail@tazj.in>
2021-09-14 r/2858 test(nix/utils): unit test path predicatessterni8-0/+69
Change-Id: I85f38ef8f284c4accd1ea744f61358622785358d Reviewed-on: https://cl.tvl.fyi/c/depot/+/3534 Tested-by: BuildkiteCI Reviewed-by: Profpatsch <mail@profpatsch.de>
2021-09-14 r/2857 feat(nix/runTestsuite): rebuild if test case list changessterni1-2/+5
If the result of the assertions changes for a successful test suite (this happens if tests are reworded, added or removed), this makes sure the no-op derivation is rebuilt. This makes sure that test suites show up in buildkite on ocassions other than channel bumps, since they are only added to the job list if their `outPath` is missing nowadays (see cl/3427). Change-Id: Ia1050cca5eeed8b7da84c40f6154b40760a3047f Reviewed-on: https://cl.tvl.fyi/c/depot/+/3536 Tested-by: BuildkiteCI Reviewed-by: Profpatsch <mail@profpatsch.de>
2021-09-14 r/2856 feat(nix/tag): add functions for querying a tag's name and valuesterni1-1/+14
Both are just trivial wrappers around assertIsTag to make these lookups more ergonomic. This also allows us to demote assertIsTag to an implemtation detail. Change-Id: Ib6ba2a858f4839354a57b660042b418976c4b1d9 Reviewed-on: https://cl.tvl.fyi/c/depot/+/3541 Tested-by: BuildkiteCI Reviewed-by: Profpatsch <mail@profpatsch.de>
2021-09-14 r/2855 docs(nix/tag): correct comment for assertIsTagsterni1-1/+1
Change-Id: Id54cc3a1d7c83c6a94b9446c76b00ca2ce1ab48e Reviewed-on: https://cl.tvl.fyi/c/depot/+/3540 Tested-by: BuildkiteCI Reviewed-by: Profpatsch <mail@profpatsch.de>
2021-09-12 r/2852 fix(nix/buildLisp): preserve argv[0] in buildLisp.programsterni1-7/+6
I *thought* I was being clever with the (cdr (member …)) call, but somehow completely forgot that *posix-argv* and *command-line-argument-list* are equivalent to argv, so they also contain the program name as the first element. Dropping that made argument parsing completely break down, so let's revert back to the older solution which works quite well. Change-Id: If7d3321cda0ca512bc8c23b6541ce390b81a3e24 Reviewed-on: https://cl.tvl.fyi/c/depot/+/3538 Tested-by: BuildkiteCI Reviewed-by: tazjin <mail@tazj.in>
2021-09-10 r/2834 docs(nix/tag): fix example for discrDefsterni1-2/+2
Change-Id: I8b7accb399448f57ace502642bd91fcfae416f15 Reviewed-on: https://cl.tvl.fyi/c/depot/+/3507 Tested-by: BuildkiteCI Reviewed-by: Profpatsch <mail@profpatsch.de>
2021-09-10 r/2833 chore(nint): move from //users/sterni to //nixsterni4-0/+212
Since //web/bubblegum depends on nint, we need to move it to a non user directory to conform with the policy established via cl/3434. Note that this likely doesn't mean greater stability (which isn't really implied in depot anyways), since I still would like to use a more elaborate calling convention to allow for additional useful features. Change-Id: I616f905d8df13e3363674aab69a797b0d39fdd79 Reviewed-on: https://cl.tvl.fyi/c/depot/+/3506 Tested-by: BuildkiteCI Reviewed-by: tazjin <mail@tazj.in>
2021-09-09 r/2830 feat(nix/sparseTree): get a directory with only selected childrensterni2-0/+65
Given a path (which points to a directory and a list of paths which are below that path, build a “sparse” version of that directory, so that it only contains the listed paths (and their children): $ nix-build -E 'with import ./. {}; nix.sparseTree ./. [ ./default.nix ./nix/readTree ./nix/buildLisp ./third_party/nixpkgs ./third_party/overlays ]' /nix/store/0ynj0gc613fs6mfp9snqcvdj5gfxbdzg-sparse-depot $ lr -t 'type == d' result/ result/ result/nix result/nix/buildLisp result/nix/buildLisp/example result/nix/readTree result/nix/readTree/tests […] result/third_party result/third_party/nixpkgs result/third_party/overlays result/third_party/overlays/haskell result/third_party/overlays/haskell/patches result/third_party/overlays/patches This is useful if a derivation depends on depot.path (e. g. if it wants to import depot at runtime). Usually this means that on every depot commit (or even worse, every change of .git on a local machine), this derivation has to be rebuild. By using sparseTree you can instead depend on a stripped down version of depot which only contains the bits you actually depend on, avoiding unrelated rebuilds. Change-Id: I127b108c8b177c657fb46786d0a6256516fd2c52 Reviewed-on: https://cl.tvl.fyi/c/depot/+/3503 Tested-by: BuildkiteCI Reviewed-by: tazjin <mail@tazj.in>
2021-09-09 r/2829 refactor(nix/readTree): use throw instead of assertMsgsterni1-4/+3
This gives a slightly prettier error message and won't leak the error message when builtins.tryEval is used. Currently an error message from the tests is always part of the pipeline evaluation log. Change-Id: I9b488a440368091ed42d707ba4124f592a64bd86 Reviewed-on: https://cl.tvl.fyi/c/depot/+/3502 Tested-by: BuildkiteCI Reviewed-by: tazjin <mail@tazj.in>
2021-09-09 r/2825 feat(readTree): Support scoped import argumentsVincent Ambo2-9/+15
This makes it possible to override Nix builtins within a readTree structure. Why would you want to do that, you might ask? Well ... Change-Id: Icc9cb32e5db4a2eba370cf81769c642d237d4937 Reviewed-on: https://cl.tvl.fyi/c/depot/+/3499 Tested-by: BuildkiteCI Reviewed-by: sterni <sternenseemann@systemli.org>
2021-09-08 r/2824 refactor(readTree): Pass all readTree parameters as function argsVincent Ambo3-20/+47
Instead of having a mix of depot-passed args (for the filter) and args to the readTree function itself, make everything a single attribute set of arguments passed to the function. This also makes it a bit easier to extend this in the future. Change-Id: I633c1fc96026d137b451bb604ef92be32571a0f5 Reviewed-on: https://cl.tvl.fyi/c/depot/+/3498 Tested-by: BuildkiteCI Reviewed-by: grfn <grfn@gws.fyi>
2021-08-29 r/2800 refactor(bufCheck): Assume bufCheck is run in depot checkoutVincent Ambo1-2/+2
Rather than copying the depot path into the store on each commit, assume bufCheck is run in the depot checkout (which it is, in Buildkite land). Change-Id: I4a4af2e5b45acad2d18218e503880ee63b20f078 Reviewed-on: https://cl.tvl.fyi/c/depot/+/3462 Tested-by: BuildkiteCI Reviewed-by: sterni <sternenseemann@systemli.org>
2021-08-26 r/2792 feat(readTree): Add support for path-dependent args filteringVincent Ambo1-2/+7
Adds another argument to readTree itself which can be passed when importing readTree (e.g. in our default.nix) to filter the arguments passed to a target based on that target's location in the tree. This is intentionally not yet mentioned in the docs, and also intentionally implemented in such a way that the API surface of readTree doesn't change. The reason for this is that I want to figure out whether these filter functions are actually useful, e.g. within depot by filtering user-folder passing, and then refactor the readTree API to find a public way of exposing this as part of the readTree function itself (and not its import). Relates to b/143. Change-Id: I2cdf09f67916527d2337f4bfb578749aeac51a6a Reviewed-on: https://cl.tvl.fyi/c/depot/+/3433 Tested-by: BuildkiteCI Reviewed-by: grfn <grfn@gws.fyi> Reviewed-by: sterni <sternenseemann@systemli.org>
2021-08-26 r/2779 docs(nix/buildLisp): document NIX_BUILDLISP_LISP_ARGSsterni1-0/+24
Change-Id: I54294da08ee08bcf6cba6c792a2a2235b988a778 Reviewed-on: https://cl.tvl.fyi/c/depot/+/3422 Tested-by: BuildkiteCI Reviewed-by: tazjin <mail@tazj.in>
2021-08-26 r/2778 docs(nix/buildLisp): move example further upsterni1-29/+29
Make "Example" the second section again since it got a bit buried under a lot of detailed documentation you won't necessarily need right away. Change-Id: I481354d1761c590e5872dfce8c3cf9934e278673 Reviewed-on: https://cl.tvl.fyi/c/depot/+/3421 Reviewed-by: tazjin <mail@tazj.in> Tested-by: BuildkiteCI