Commit graph

10872 commits

Author SHA1 Message Date
Vincent Ambo
56614c75e4 refactor(3p/nix/libexpr): Store nix::Env values in a std::vector
This has several advantages:

* we can ensure that the vector is traced by the GC
* we don't need to unsafely allocate memory to make an Env

Note that there was previously a check about the size of the
environment, but it's unclear why this was the case (git history
yielded nothing interesting) and it seems to have no effect.

Change-Id: I4998b879a728a6fb68e1bd187c521e2304e5047e
Reviewed-on: https://cl.tvl.fyi/c/depot/+/1265
Tested-by: BuildkiteCI
Reviewed-by: isomer <isomer@tvl.fyi>
Reviewed-by: Kane York <rikingcoding@gmail.com>
Reviewed-by: glittershark <grfn@gws.fyi>
2020-07-18 18:08:42 +00:00
Alyssa Ross
effbb277c3 chore(tvl-slapd): add display name for qyliss
Not having this set led to gerrit setting the committer to
"qyliss <hi@alyssa.is>", which is wrong.

Change-Id: I3fe02264e22dd6d739575b34ceb1221d1d6a9d98
Reviewed-on: https://cl.tvl.fyi/c/depot/+/1267
Tested-by: BuildkiteCI
Reviewed-by: qyliss <hi@alyssa.is>
2020-07-18 16:50:07 +00:00
Kane York
501d6bdaab chore(tvl-slapd): change display name to a username-like
Change-Id: I289400de6638844586a32a729333cb65a0dca4a0
Reviewed-on: https://cl.tvl.fyi/c/depot/+/1254
Tested-by: BuildkiteCI
Reviewed-by: isomer <isomer@tvl.fyi>
Reviewed-by: glittershark <grfn@gws.fyi>
Reviewed-by: tazjin <mail@tazj.in>
2020-07-18 01:23:13 +00:00
Griffin Smith
d1d6830c58 feat(gs/emacs): Install clang-format+
Change-Id: I3560932953718ab9324bc490488f39605f03ee5e
Reviewed-on: https://cl.tvl.fyi/c/depot/+/1264
Reviewed-by: glittershark <grfn@gws.fyi>
Tested-by: BuildkiteCI
2020-07-18 01:02:08 +00:00
Vincent Ambo
c9ba75cc95 chore(3p/immer): Remove .gitmodules
This breaks tooling for some people, and we aren't actually using the
git submodules.

Change-Id: I5b4dfd4ad76bf72e9dbc7de29f17f28ebf6b8ba0
Reviewed-on: https://cl.tvl.fyi/c/depot/+/1255
Tested-by: BuildkiteCI
Reviewed-by: glittershark <grfn@gws.fyi>
2020-07-18 00:56:17 +00:00
Griffin Smith
f80eb91c2a fix(gs/emacs): Properly disable c++/clang flycheck checker
This has to be disabled per-buffer

Change-Id: I56bcf25d78c56d531b361f64f26bff9e9a986c39
Reviewed-on: https://cl.tvl.fyi/c/depot/+/1257
Tested-by: BuildkiteCI
Reviewed-by: glittershark <grfn@gws.fyi>
2020-07-18 00:21:14 +00:00
Griffin Smith
be6fe93dd4 feat(3p/nix): Add NIX_DATA_DIR to shell hook
all of the executables that get built during regular development depend
on this being set to a directory that contains the nix directory -
previously we had been doing it manually every time, this automates it.

Change-Id: I4c957c0abf0a92ca7122a47d3b141a8ede280e13
Reviewed-on: https://cl.tvl.fyi/c/depot/+/1258
Tested-by: BuildkiteCI
Reviewed-by: tazjin <mail@tazj.in>
2020-07-18 00:03:24 +00:00
Vincent Ambo
f4f72bcf21 test(3p/nix): Set up scaffolding & fix up tests for value-to-{json|xml}
Configures the CMake build to load & run the GoogleTest tests.

I (grfn) also updated this to get the tests running as part of the nix
derivation, which required defining our own manual configurePhase and
installCheckPhase, rather than depending on the one provided by stdenv.
Not doing this would cause cmake to attempt to *run* the tests as part
of the buildPhase, which wouldn't work because the dynamic libraries
hadn't been put into a place where the test executables knew where to
find them. We're not sure *why* this fixes it, and for some reason
fixing this also breaks the automatic behavior of nixpkgs of passing
-j$NIX_BUILD_CORES -l$NIX_BUILD_CORES to make, but that's eaasy enough
to fix manually in a preBuild

Paired-With: Griffin Smith <grfn@gws.fyi>
Change-Id: I79d61854a3ff47301cdce8a40c76820a97bdf901
Reviewed-on: https://cl.tvl.fyi/c/depot/+/1240
Tested-by: BuildkiteCI
Reviewed-by: glittershark <grfn@gws.fyi>
2020-07-18 00:01:53 +00:00
Andreas Rammhold
e4b7d6d592 test(3p/nix/libexpr): add json/xml tests
Backported from:
c1371b6fbb

Change-Id: Ida326cf1567081a56d747c4a72f036f55cfdea37
Reviewed-on: https://cl.tvl.fyi/c/depot/+/1239
Tested-by: BuildkiteCI
Reviewed-by: Kane York <rikingcoding@gmail.com>
2020-07-18 00:00:51 +00:00
Alyssa Ross
0b01c40951 docs(REVIEWS): mention adding SSH keys to Gerrit
Change-Id: I75ecc0c9209b80ab3ae692013f4b075764e13218
Reviewed-on: https://cl.tvl.fyi/c/depot/+/1262
Tested-by: BuildkiteCI
Reviewed-by: tazjin <mail@tazj.in>
2020-07-17 23:47:51 +00:00
Kane York
4dd236be53 feat(ci): run buf check lint in CI
Breaking change detection will run but not enforce.

Emoji of water buffalo was chosen by @pedge fiat in the bufbuild slack.

Change-Id: Ie292f2bfddc0e3bc512e4a138c0b5d0fa2603bad
Reviewed-on: https://cl.tvl.fyi/c/depot/+/1247
Tested-by: BuildkiteCI
Reviewed-by: tazjin <mail@tazj.in>
Reviewed-by: glittershark <grfn@gws.fyi>
2020-07-17 22:55:13 +00:00
Alyssa Ross
cf34184038 docs(REVIEWS): use relative URL for tvl-slapd
This means that following the link locally is likely to do something
far more useful.  For example, C-c C-o in Emacs with markdown-mode
will open the tvl-slapd file, rather than opening it in the browser.

Change-Id: Icba3c195359855014fef17538a155656363a8b1e
Reviewed-on: https://cl.tvl.fyi/c/depot/+/1261
Tested-by: BuildkiteCI
Reviewed-by: tazjin <mail@tazj.in>
2020-07-17 22:53:17 +00:00
Alyssa Ross
0f7bdd6711 feat(tvl-slapd): add qyliss
Change-Id: Ia95c77be8a9c123f2e52174f76c4b01d44272191
Reviewed-on: https://cl.tvl.fyi/c/depot/+/1260
Tested-by: BuildkiteCI
Reviewed-by: tazjin <mail@tazj.in>
2020-07-17 22:53:17 +00:00
Vincent Ambo
67f0fbfcea feat(whitby): Hardcode Google DNS servers
The Hetzner DNS servers were unhappy after today's Cloudflare outage,
and that broke some of our builds - this wouldn't have happened with
Google DNS!

Change-Id: Ib74c6de9526e739f55d4a9830d945ece35b72138
Reviewed-on: https://cl.tvl.fyi/c/depot/+/1259
Tested-by: BuildkiteCI
Reviewed-by: glittershark <grfn@gws.fyi>
2020-07-17 22:27:49 +00:00
Griffin Smith
8138621b11 fix(owothia): Add " to stopword list
how *this* got classified as a verb I will never understand.

Change-Id: I1ae0c5092b0f4371fb191e19f576dac89fb941ab
Reviewed-on: https://cl.tvl.fyi/c/depot/+/1250
Tested-by: BuildkiteCI
Reviewed-by: isomer <isomer@tvl.fyi>
2020-07-17 20:39:22 +00:00
Griffin Smith
b32274120c feat(3p/nix/nix-daemon): Implement Worker::VerifyStore handler
Also adds the missing check_contents field to the VerifyStoreRequest
proto message, since it was missed in the original pass. This is done
using a renumbering, which is fine in this case since the proto hasn't
been deployed yet

Change-Id: I92bf4e48a71a25ae02ae02b3deaf6e7c71fe5da7
Reviewed-on: https://cl.tvl.fyi/c/depot/+/1237
Tested-by: BuildkiteCI
Reviewed-by: isomer <isomer@tvl.fyi>
Reviewed-by: Kane York <rikingcoding@gmail.com>
2020-07-17 20:37:34 +00:00
Griffin Smith
d18246f8b2 feat(3p/nix/nix-daemon): Implement Worker::OptimiseStore handler
Change-Id: I8b1d84799a608a516d0b4980022a7edd545a1ca1
Reviewed-on: https://cl.tvl.fyi/c/depot/+/1235
Tested-by: BuildkiteCI
Reviewed-by: Kane York <rikingcoding@gmail.com>
2020-07-17 20:37:34 +00:00
Griffin Smith
1b07e588c8 feat(3p/nix/nix-daemon): Implement Worker::QuerySubstitutablePaths handler
Change-Id: I243d67b0bce29d54c7d6e08f5eee70bd395cf9a2
Reviewed-on: https://cl.tvl.fyi/c/depot/+/1234
Tested-by: BuildkiteCI
Reviewed-by: Kane York <rikingcoding@gmail.com>
2020-07-17 20:37:34 +00:00
Griffin Smith
d36ee69061 feat(3p/nix/nix-daemon): Implement Worker::QueryValidPaths handler
Change-Id: I221dcd2a3fa53ead3ea9ac47830d968bb587c6e5
Reviewed-on: https://cl.tvl.fyi/c/depot/+/1233
Tested-by: BuildkiteCI
Reviewed-by: isomer <isomer@tvl.fyi>
2020-07-17 20:37:34 +00:00
Griffin Smith
1933e4f97f feat(3p/nix/nix-daemon): Implement Worker::QueryPathFromHashPart
Change-Id: Id351a0c82f4d6e79a8f272674d8d8e86e12a9400
Reviewed-on: https://cl.tvl.fyi/c/depot/+/1232
Tested-by: BuildkiteCI
Reviewed-by: isomer <isomer@tvl.fyi>
2020-07-17 20:37:34 +00:00
Griffin Smith
a67db573e5 feat(3p/nix/nix-daemon): Implement Worker::QueryDerivationOutputNames handler
Change-Id: Ie17e37322dd0e241cd35b6d8e69bd6c968fd6ff2
Reviewed-on: https://cl.tvl.fyi/c/depot/+/1231
Tested-by: BuildkiteCI
Reviewed-by: tazjin <mail@tazj.in>
2020-07-17 20:37:34 +00:00
Griffin Smith
eb4c8717cd feat(3p/nix/nix-daemon): Implement Worker::QueryPathInfo handler
Change-Id: I580bd29356f7bcd0cc2050afda11d2e115d44c94
Reviewed-on: https://cl.tvl.fyi/c/depot/+/1230
Tested-by: BuildkiteCI
Reviewed-by: tazjin <mail@tazj.in>
2020-07-17 20:37:34 +00:00
Eelco Dolstra
80eaa1eaf9 feat(3p/nix): Add function to allocate a Value in traceable memory
Backported from:
b3e5eea4a9
fcd048a526

Intentionally skipped because we have not backported the JSON changes:
9f46f54de4

Did not apply changes ni primops.cc, because those look suspect and
are also based on something that we don't have in our tree.

Change-Id: I837787ce9f2c90267bc39fce15177980d209d4e9
Reviewed-on: https://cl.tvl.fyi/c/depot/+/1253
Tested-by: BuildkiteCI
Reviewed-by: isomer <isomer@tvl.fyi>
2020-07-17 20:04:14 +00:00
Eelco Dolstra
014436eb4a fix(3p/nix): ValueMap, VectorVector: Use traceable_allocator
We want to *trace* the 'Value *' arrays, not garbage-collect them!
Otherwise the vectors/maps can end up pointing to nowhere.

Backported from:
10e17eaa58

Change-Id: I30dc94caa80c9d982e7a14bc67ba2d065e8203aa
Reviewed-on: https://cl.tvl.fyi/c/depot/+/1252
Tested-by: BuildkiteCI
Reviewed-by: isomer <isomer@tvl.fyi>
2020-07-17 20:04:14 +00:00
Andreas Rammhold
5218c83b9f fix(3p/nix): allocate the vSourceExpr via uncollectable memory
Previously the memory would occasionally be collected during eval since
the GC doesn't consider the member variable as alive / doesn't scan the
region of memory where the pointer lives.

By using the traceable_allocator<T> allocator provided by Boehm GC we
can ensure the memory isn't collected. It should be properly freed when
SourceExprCommand goes out of scope.

Backported from:
d2c371927e

Change-Id: I1f7c745dbc66c7164bee50f4d9b0d437dbc7dd51
Reviewed-on: https://cl.tvl.fyi/c/depot/+/1251
Tested-by: BuildkiteCI
Reviewed-by: isomer <isomer@tvl.fyi>
2020-07-17 20:04:14 +00:00
Kane York
6c98d3d81f fix(nix/buildGo/example): use correct package name
Change-Id: Ie191e4154afe5aa47bb9ea5322010db014a1fa42
Reviewed-on: https://cl.tvl.fyi/c/depot/+/1246
Tested-by: BuildkiteCI
Reviewed-by: tazjin <mail@tazj.in>
2020-07-17 20:01:29 +00:00
Kane York
af47a89d6f chore(3p/nix/proto): Fix style violations in new proto defs
This is a blocker to enabling the linter.

Change-Id: I9f8d3cc19c7539086f53474a505362230fc56c04
Reviewed-on: https://cl.tvl.fyi/c/depot/+/1245
Tested-by: BuildkiteCI
Reviewed-by: tazjin <mail@tazj.in>
2020-07-17 20:01:29 +00:00
Kane York
39ab9d8fc6 feat(buf.yaml): add protobuf linter config
Change-Id: I0506d0625769caa9f9bcd623722440bebe8b28b5
Reviewed-on: https://cl.tvl.fyi/c/depot/+/1244
Tested-by: BuildkiteCI
Reviewed-by: tazjin <mail@tazj.in>
Reviewed-by: glittershark <grfn@gws.fyi>
2020-07-17 20:01:29 +00:00
Kane York
f6a9706b3b feat(3p/bufbuild): Import buf
Change-Id: Ibb35980ce3a398dd7af1c14df9eba84f0fa414b7
Reviewed-on: https://cl.tvl.fyi/c/depot/+/1243
Tested-by: BuildkiteCI
Reviewed-by: tazjin <mail@tazj.in>
Reviewed-by: isomer <isomer@tvl.fyi>
Reviewed-by: glittershark <grfn@gws.fyi>
2020-07-17 20:01:29 +00:00
isomer
cbff4fab9e chore(whitby): += Isomer
Change-Id: I446ab16d009dc24340606ab2f411197af24d79c2
Reviewed-on: https://cl.tvl.fyi/c/depot/+/1142
Reviewed-by: isomer <isomer@tvl.fyi>
Reviewed-by: tazjin <mail@tazj.in>
Reviewed-by: glittershark <grfn@gws.fyi>
Tested-by: BuildkiteCI
2020-07-17 19:38:51 +00:00
Vincent Ambo
8d5857abbc chore(3p/nix): Remove builtins.exec
This is a bad idea, it shouldn't exist, nixpkgs doesn't use it.

Change-Id: Ic4d1b936d8f059d5c40f0567af165b02427d7e36
Reviewed-on: https://cl.tvl.fyi/c/depot/+/1241
Tested-by: BuildkiteCI
Reviewed-by: glittershark <grfn@gws.fyi>
2020-07-17 19:03:59 +00:00
Vincent Ambo
a2870d05a3 feat(3p/gtest): Bump version & override stdenv to libcxx
Change-Id: I19a34e80f51add5a7c6cde2650aae60c1919ad43
Reviewed-on: https://cl.tvl.fyi/c/depot/+/1238
Tested-by: BuildkiteCI
Reviewed-by: glittershark <grfn@gws.fyi>
2020-07-17 02:59:42 +00:00
Kane York
a556913079 chore(3p/nix): add glittershark to OWNERS
Change-Id: I71228383c8c7810ff8032e67bde0f45339809934
Reviewed-on: https://cl.tvl.fyi/c/depot/+/1236
Tested-by: BuildkiteCI
Reviewed-by: tazjin <mail@tazj.in>
Reviewed-by: glittershark <grfn@gws.fyi>
2020-07-17 01:24:38 +00:00
Griffin Smith
678022ad59 feat(gs/emacs): Add capture template for email tasks
The link here doesn't work, which is frustrating.

Change-Id: I70f5770226b1c39a5401d09037cce31a52f5cada
Reviewed-on: https://cl.tvl.fyi/c/depot/+/1225
Reviewed-by: lukegb <lukegb@tvl.fyi>
Tested-by: BuildkiteCI
2020-07-16 23:58:12 +00:00
Griffin Smith
d1b3514910 feat(3p/nix/nix-daemon): Implement Worker::QueryAllValidPaths handler
Change-Id: If9d2144ae872183abf47d84c94cc5c5fa23ced87
Reviewed-on: https://cl.tvl.fyi/c/depot/+/1229
Tested-by: BuildkiteCI
Reviewed-by: tazjin <mail@tazj.in>
2020-07-16 23:57:49 +00:00
Griffin Smith
ec859afe95 feat(3p/nix/nix-daemon): Implement Worker::QueryMissing handler
Change-Id: I004a0c7969e1fe27b844adfed2d3ba3e6c5279bb
Reviewed-on: https://cl.tvl.fyi/c/depot/+/1227
Tested-by: BuildkiteCI
Reviewed-by: tazjin <mail@tazj.in>
2020-07-16 23:25:25 +00:00
Vincent Ambo
5c9af8faee feat(3p/nix): Implement similar group of Worker::Query* handlers
These are the queries that are handled in the confusing case statement
in the old daemon implementation, because they have very similar
structure.

Change-Id: Ie7143354f66cef4336dff8072ede9a56271a7e89
Reviewed-on: https://cl.tvl.fyi/c/depot/+/1228
Tested-by: BuildkiteCI
Reviewed-by: glittershark <grfn@gws.fyi>
2020-07-16 23:20:15 +00:00
Vincent Ambo
32735eebdd feat(3p/nix/nix-daemon): Implement Worker::HasSubstitutes handler
Change-Id: I0b01b554eee4b4e31416aabb498ea3d8b8a8092b
Reviewed-on: https://cl.tvl.fyi/c/depot/+/1226
Tested-by: BuildkiteCI
Reviewed-by: glittershark <grfn@gws.fyi>
2020-07-16 22:48:09 +00:00
Vincent Ambo
bb66262068 feat(3p/nix/nix-daemon): Implement Worker::IsValidPath handler
Change-Id: I741c2b9b58f234a21850640e2b0c071ff4441234
Reviewed-on: https://cl.tvl.fyi/c/depot/+/1223
Tested-by: BuildkiteCI
Reviewed-by: lukegb <lukegb@tvl.fyi>
Reviewed-by: glittershark <grfn@gws.fyi>
2020-07-16 22:48:09 +00:00
Griffin Smith
f1aa62c9ee feat(gs/emacs): Install protobuf-mode
Change-Id: I711976b81b1063a79f15129973da8be12239751a
Reviewed-on: https://cl.tvl.fyi/c/depot/+/1224
Reviewed-by: lukegb <lukegb@tvl.fyi>
Tested-by: BuildkiteCI
2020-07-16 22:41:57 +00:00
Vincent Ambo
ba11727ce0 feat(3p/nix/proto): Add QueryMissing RPC call
Change-Id: I6a29c56a0f945afdef7434da539b4b91b2e4d2e6
Reviewed-on: https://cl.tvl.fyi/c/depot/+/1222
Reviewed-by: glittershark <grfn@gws.fyi>
Tested-by: BuildkiteCI
2020-07-16 22:10:22 +00:00
Vincent Ambo
afe99225b9 feat(3p/nix/proto): Add AddToStoreNar RPC call
Change-Id: I335630644205adb280d83e006baf9d497ac1ac95
Reviewed-on: https://cl.tvl.fyi/c/depot/+/1221
Tested-by: BuildkiteCI
Reviewed-by: glittershark <grfn@gws.fyi>
2020-07-16 22:10:22 +00:00
Griffin Smith
cf6c48ef47 feat(3p/nix): Add NarFromPath
What it does I will never know. It takes a path and returns a path.
Something happens in the middle.

Change-Id: I499a9df700e5b954c9aaf6d694753ff34e773dfd
Reviewed-on: https://cl.tvl.fyi/c/depot/+/1210
Tested-by: BuildkiteCI
Reviewed-by: tazjin <mail@tazj.in>
2020-07-16 21:41:40 +00:00
Griffin Smith
c3e96bcfa2 feat(3p/nix): Add AddSignatures
Change-Id: Ic37409c7987c261dc3eb91382d40f458fae6ea0c
Reviewed-on: https://cl.tvl.fyi/c/depot/+/1209
Reviewed-by: tazjin <mail@tazj.in>
Tested-by: BuildkiteCI
2020-07-16 21:41:40 +00:00
Griffin Smith
f4baaf79e2 feat(3p/nix): Add BuildDerivation proto
Change-Id: Ib66b4ff2da72677e74b6a713186c72f66d9f6f88
Reviewed-on: https://cl.tvl.fyi/c/depot/+/1208
Tested-by: BuildkiteCI
Reviewed-by: tazjin <mail@tazj.in>
2020-07-16 21:41:40 +00:00
Griffin Smith
db4ac8ea7c chore(3p/nix/worker-protocol): Add missing includes
These files were always implicitly depended upon by worker-protocol.hh, but just so happened also always be included in places where the other ones were already present.

We are likely getting rid of this file sooner rather than later, but in
the meantime this will cause clangd to shut up while I'm editing the
file.

Change-Id: I0d765f8b86828b6612e5483417e452221ea3c5b1
Reviewed-on: https://cl.tvl.fyi/c/depot/+/1207
Reviewed-by: tazjin <mail@tazj.in>
Tested-by: BuildkiteCI
2020-07-16 21:40:58 +00:00
Griffin Smith
4468e411fd feat(3p/nix): Add VerifyStore
Change-Id: I6a0596e986867e94857da461c746a80750830f7b
Reviewed-on: https://cl.tvl.fyi/c/depot/+/1206
Tested-by: BuildkiteCI
Reviewed-by: tazjin <mail@tazj.in>
2020-07-16 21:40:58 +00:00
Griffin Smith
3999439fbb feat(3p/nix): Add OptimiseStore
Change-Id: I0d254504801283e018eef41bd5ea9850b17c0d80
Reviewed-on: https://cl.tvl.fyi/c/depot/+/1205
Tested-by: BuildkiteCI
Reviewed-by: tazjin <mail@tazj.in>
2020-07-16 21:40:58 +00:00
Griffin Smith
b6cb681c0b feat(3p/nix): Add QueryValidDerivers
Change-Id: I52965bdbf143ae11201e1fafed1c25b3d8f1bee9
Reviewed-on: https://cl.tvl.fyi/c/depot/+/1204
Tested-by: BuildkiteCI
Reviewed-by: tazjin <mail@tazj.in>
2020-07-16 21:40:58 +00:00
Griffin Smith
143ef52592 feat(3p/nix): Add path query ops
Add QueryValidPaths and QuerySubstitutablePaths, both of which filter a
list of paths based on a set of criteria.

Change-Id: I6aa4647efe82b82dc9582a311643d5f9b6d521d5
Reviewed-on: https://cl.tvl.fyi/c/depot/+/1203
Tested-by: BuildkiteCI
Reviewed-by: tazjin <mail@tazj.in>
2020-07-16 21:40:58 +00:00