Commit graph

501 commits

Author SHA1 Message Date
Griffin Smith
696924b5ef feat(web/panettone): Add dev helpers for postgres db
Add a docker-compose file and lorri-based direnv for aiding in
running and connecting to a postgres database during development of
panettone.

Change-Id: I319eee52b52cd48e1f3d2e32c558989768dc19d8
Reviewed-on: https://cl.tvl.fyi/c/depot/+/1465
Tested-by: BuildkiteCI
Reviewed-by: tazjin <mail@tazj.in>
Reviewed-by: eta <eta@theta.eu.org>
2020-07-26 21:55:41 +00:00
Griffin Smith
da8bc7635e feat(3p/lisp): Add postmodern
Change-Id: If6ffd9a2344dc98e95312ddcce14ba5c2519d004
Reviewed-on: https://cl.tvl.fyi/c/depot/+/1420
Tested-by: BuildkiteCI
Reviewed-by: tazjin <mail@tazj.in>
2020-07-26 21:55:41 +00:00
Griffin Smith
e231493ff4 feat(3p/lisp): Add ironclad
Add ironclad, a common lisp library for cryptography. This is a huge
library with a lot of moving parts - probably most notable here is that
I've had to turn off compiling with `:ironclad-assembly`, as it was
causing an infinite loop in the compiler due to
https://github.com/sharplispers/ironclad/blob/master/src/opt/sbcl/cpu-features.lisp#L9-L10,
a mutually self-recursive function that looks like:

    (defun aes-ni-support-p ()
      (aes-ni-support-p))

Without knowing much about how sbcl handles native-compiled assembly, it
seems like this definition should actually be skipped entirely, due to
it being defined as a `defknown` in `fndb.lisp`:

    (defknown ironclad::aes-ni-support-p
      ()
      (boolean)
      (any)
      :overwrite-fndb-silently t)

But something about how we're compiling things was causing that not to
happen, and the infinite recursion caused the compiler to hang. This
should be fixed at some point, but given I only need this library as a
transitive dependency down a level I'm not going to attempt to do so now.

Change-Id: Id768717991404f959b003c7e2f28f1f4d532b94b
Reviewed-on: https://cl.tvl.fyi/c/depot/+/1333
Tested-by: BuildkiteCI
Reviewed-by: kanepyork <rikingcoding@gmail.com>
2020-07-26 21:21:57 +00:00
Vincent Ambo
b0e80d9465 chore(3p/lisp): Add eta & glittershark to OWNERS
Change-Id: I372d84b2fa979059bda14264b23f9c11adaf4222
Reviewed-on: https://cl.tvl.fyi/c/depot/+/1470
Reviewed-by: glittershark <grfn@gws.fyi>
Tested-by: BuildkiteCI
2020-07-26 21:21:30 +00:00
Luke Granger-Brown
a5c7e03dbd fix(gerrit): fix hovercards under Firefox
Firefox doesn't implement the IE6 fromElement/toElement, and it's
not in the MouseEvent spec (at the moment).

Replace with the worse-named but better-specified target and
relatedTarget attributes instead.

Upstream change: https://gerrit-review.googlesource.com/q/I9eeb26c032a38de9d7185749373c7982c796acb2

Change-Id: I9f9a1eb9342bc80b91b5b364a04cc5fa9a7ccaeb
Reviewed-on: https://cl.tvl.fyi/c/depot/+/1442
Tested-by: BuildkiteCI
Reviewed-by: glittershark <grfn@gws.fyi>
2020-07-26 11:29:28 +00:00
Kane York
c3608fdf87 fix(3p/nix): fix broken clang-tidy config
LineFilter doesn't actually exist in this version of clang-tidy. It was only working because the config was ignored.

Change-Id: Ice5ddb5d1031dfc2cc4fee24674464f965323d8b
Reviewed-on: https://cl.tvl.fyi/c/depot/+/1431
Reviewed-by: glittershark <grfn@gws.fyi>
Tested-by: BuildkiteCI
2020-07-26 01:04:10 +00:00
Kane York
dafb571818 chore(3p/nix): build in RelWithDebInfo mode
This eases debugging of live crashes.

Change-Id: Ie15a7f8fb3f091cae0fbe012e58862d416a42891
Reviewed-on: https://cl.tvl.fyi/c/depot/+/1433
Tested-by: BuildkiteCI
Reviewed-by: glittershark <grfn@gws.fyi>
2020-07-25 23:37:46 +00:00
Luke Granger-Brown
e010efb040 chore(gerrit): update to 3.2.2-1002-gea26b5ee7a
This is the version currently (2020-07-25) deployed on https://gerrit-review.googlesource.com/,
and includes features such as The Attention Set.

Change-Id: Idf29f96c38d7737efb0d64c4cd294dab46fe5412
Reviewed-on: https://cl.tvl.fyi/c/depot/+/1437
Tested-by: BuildkiteCI
Reviewed-by: tazjin <mail@tazj.in>
2020-07-25 20:27:13 +00:00
Griffin Smith
b10970a66f feat(3p/nix): Start implementing RPC store client
Add a stub class for wrapping a gRPC client to the new, proto-backed nix
store protocol, along with several methods implemented but several left
throwing a not implemented exception.

Paired-With: Vincent Ambo <mail@tazj.in>
Paired-With: Perry Lorier <isomer@tvl.fyi>
Change-Id: Id943d4f6d75084b8498786d580e6c9f7c92c104d
Reviewed-on: https://cl.tvl.fyi/c/depot/+/1436
Tested-by: BuildkiteCI
Reviewed-by: kanepyork <rikingcoding@gmail.com>
2020-07-25 20:18:29 +00:00
Griffin Smith
dcaba9de64 feat(3p/nix): Add main function for grpc daemon
Implement the main function for the new, proto-based nix daemon. This
mostly replicates the behavior of the previous nix daemon - it starts a
grpc server listening on the same nix socket path and supports the same
set of options - with the exception of --stdio, which has been renamed
to --pipe and documented in the man page.

Change-Id: Ib729283c1d5d35c0e1b0a968bc1f052f5527f2d7
Reviewed-on: https://cl.tvl.fyi/c/depot/+/1356
Tested-by: BuildkiteCI
Reviewed-by: tazjin <mail@tazj.in>
Reviewed-by: kanepyork <rikingcoding@gmail.com>
2020-07-25 20:11:41 +00:00
Griffin Smith
7c56fccdad feat(3p/nix): Template systemd unit files in build
Template the systemd unit file templates as part of the nix
installPhase, putting them in the same place that the upstream nix
derivation does.

Change-Id: I3ceabfc0c837564e33b9ae7f9eeb7185d6fbe907
Reviewed-on: https://cl.tvl.fyi/c/depot/+/1429
Tested-by: BuildkiteCI
Reviewed-by: isomer <isomer@tvl.fyi>
Reviewed-by: tazjin <mail@tazj.in>
2020-07-25 14:12:04 +00:00
Kane York
bbbb97e142 chore(3p/nix): disable clang-tidy in cmake
Change-Id: I9ff1ae10afe5af066aaff377424522a19977dc3d
Reviewed-on: https://cl.tvl.fyi/c/depot/+/1428
Tested-by: BuildkiteCI
Reviewed-by: glittershark <grfn@gws.fyi>
2020-07-25 03:06:10 +00:00
Griffin Smith
0b74688e9c chore(3p/nix): Remove obsolete upload-release.pl script
This hardcodes eelco's home directory, among other things we no longer
care about.

Change-Id: Ide894107c091c37e30bba9daf473fc7dfc8b8563
Reviewed-on: https://cl.tvl.fyi/c/depot/+/1427
Tested-by: BuildkiteCI
Reviewed-by: tazjin <mail@tazj.in>
2020-07-25 02:56:05 +00:00
Griffin Smith
2f85dfe50c fix(3p/nix): Don't include depotPath in the main drv
Including depotPath in the shellHook of the main derivation for tvix
was, unsurprisingly, causing spurious rebuilds. It's still useful when
developing locally, though, so I've extracted it to a `build-shell`
derivation as a passthru attribute and updated the documentation.

Fixes: #20
Change-Id: Ibc686b9f06ec68e79759ca2c989414bd5fbce696
Reviewed-on: https://cl.tvl.fyi/c/depot/+/1426
Reviewed-by: tazjin <mail@tazj.in>
Tested-by: BuildkiteCI
2020-07-25 02:29:14 +00:00
Griffin Smith
4dca023385 feat(3p/nix): Add build for VM for testing tvix
Add an expression, based on the nixos qemu virtualisation framework, for
a basic system whose nix is tvix, to be used for testing tvix

Change-Id: I3c7422bb10d3ce05a3094671cb770f1f745d814c
Reviewed-on: https://cl.tvl.fyi/c/depot/+/1423
Reviewed-by: tazjin <mail@tazj.in>
Reviewed-by: Alyssa Ross <hi@alyssa.is>
Tested-by: BuildkiteCI
2020-07-25 02:29:14 +00:00
Vincent Ambo
a12b0efc9e chore(3p/nix): Reduce number of active clang-tidy checks
The full clang-tidy check suite is *very* slow. This reduced list is
some kind of middle-ground between running all checks, and having a
useful developer experience.

Crucially most of the static analyzer checks (except for the ones
related to security issues) have been disabled.

We should look into running the full suite in CI only.

Change-Id: I02b96ad3b4d1a43bd6aa90ffdcba800dad966714
Reviewed-on: https://cl.tvl.fyi/c/depot/+/1422
Tested-by: BuildkiteCI
Reviewed-by: glittershark <grfn@gws.fyi>
2020-07-25 01:02:41 +00:00
Griffin Smith
2fcf2d0d20 refactor(3p/nix): Remove custom base64 implementation
Replace the custom, rather questionable base64 implementation with
absl::Base64{Une,E}scape. To make sure that the custom implementation
was doing the same thing I've also added a test covering
nix::Hash::to_string, which was one function that used it - the test
passed prior to the replacement, and continued to pass afterwards.

The previous base64Decode function threw an exception on failure - to
avoid going too far down the rabbit hole I've replicated that
functionality at all call sites, but this should be replaced with more
sensible error handling such as StatusOr eventually.

Also, before this change:

    ❯ nix eval -f . users.tazjin.emacs.outPath
    "/nix/store/g6ri2q8nra96ix20bcsc734r1yyaylb1-tazjins-emacs"

And after:

    ❯ ./result/bin/nix eval -f . users.tazjin.emacs.outPath
    "/nix/store/g6ri2q8nra96ix20bcsc734r1yyaylb1-tazjins-emacs"

Change-Id: Id292ffbb82fe808f3f1b34670afbe7b8c13ad615
Reviewed-on: https://cl.tvl.fyi/c/depot/+/1385
Reviewed-by: tazjin <mail@tazj.in>
Tested-by: BuildkiteCI
2020-07-25 00:04:43 +00:00
Kane York
989563a75b chore(3p/nix): log whether or not clang-tidy is enabled
CMake likes to remember that we overrode it with an empty string and not use the new env var.

Change-Id: I16587f27750c9ebd4f65349bb59b37e0f8117f18
Reviewed-on: https://cl.tvl.fyi/c/depot/+/1406
Tested-by: BuildkiteCI
Reviewed-by: glittershark <grfn@gws.fyi>
2020-07-24 22:18:40 +00:00
Kane York
6039417431 fix(3p/nix): fix all UninitializedObject warnings
The cpptoml occurrences are ignored in CL 1419.

Updates: #11
Change-Id: Ifb21c93b09c67e6b6a4c9e7089abffe7616569fd
Reviewed-on: https://cl.tvl.fyi/c/depot/+/1407
Reviewed-by: glittershark <grfn@gws.fyi>
Tested-by: BuildkiteCI
2020-07-24 22:18:23 +00:00
Kane York
6a0be19edd chore(3p/nix): ignore all unfixable clang-tidy warnings
Change-Id: I641c447fc57df4fed40ed4e89d79a88342b67bc8
Reviewed-on: https://cl.tvl.fyi/c/depot/+/1419
Reviewed-by: Alyssa Ross <hi@alyssa.is>
Reviewed-by: glittershark <grfn@gws.fyi>
Tested-by: BuildkiteCI
2020-07-24 22:16:48 +00:00
Kane York
bd77090703 fix(3p/nix): do not call vfork
The use of vfork() in Nix is entirely illegal. Quote:

If the process created by vfork() returns from the function in which vfork() was
called, or calls any other function before successfully calling _exit() or
one of the exec*() family of functions, the behavior is undefined.

-- Linux man-pages, release 5.05

Add a TODO to use the higher-performance variants of clone() on Linux when it
is available.

Change-Id: I42370e1568ad6e2d00d70d0b66c8aded8f1288bb
Reviewed-on: https://cl.tvl.fyi/c/depot/+/1418
Tested-by: BuildkiteCI
Reviewed-by: tazjin <mail@tazj.in>
Reviewed-by: Alyssa Ross <hi@alyssa.is>
2020-07-24 22:16:08 +00:00
Kane York
388b5f1abe fix(3p/nix): fix null pointer dereferences
Change-Id: I4c37febcd4978f17720b2526c267c6bf96e84bcc
Reviewed-on: https://cl.tvl.fyi/c/depot/+/1417
Tested-by: BuildkiteCI
Reviewed-by: tazjin <mail@tazj.in>
2020-07-24 22:15:19 +00:00
Kane York
3ce4a6cc18 fix(3p/nix): fix more clang-tidy warnings
Change-Id: I1e8a4852ffa450c552a4cdfc709554799854934c
Reviewed-on: https://cl.tvl.fyi/c/depot/+/1416
Tested-by: BuildkiteCI
Reviewed-by: glittershark <grfn@gws.fyi>
2020-07-24 02:40:11 +00:00
Griffin Smith
280ec4a46c fix(3p/nix): Link nixutil to its dependencies
nixutil depends on bzip2, lzma, boost::context, brotli{enc,dec}, and
openssl, but wasn't directly linking to them. This was causing linker
errors in a test that only depended on nixutil.

Change-Id: I60e77ea7b18b08e2946fcf9176ae0f355cd71844
Reviewed-on: https://cl.tvl.fyi/c/depot/+/1384
Tested-by: BuildkiteCI
Reviewed-by: kanepyork <rikingcoding@gmail.com>
2020-07-24 00:56:07 +00:00
Kane York
9a85694b86 fix(3p/nix): remove usage of strcpy
Change-Id: I86125609f433469a8722c780fd758234211d677e
Reviewed-on: https://cl.tvl.fyi/c/depot/+/1381
Tested-by: BuildkiteCI
Reviewed-by: Alyssa Ross <hi@alyssa.is>
Reviewed-by: glittershark <grfn@gws.fyi>
2020-07-23 22:00:08 +00:00
Kane York
ec46a594df docs(3p/nix): Document fast build by disabling clang-tidy
Change-Id: I5a3a4a4013c35a3a377ad0b6068a1a40bf6d77e6
Reviewed-on: https://cl.tvl.fyi/c/depot/+/1386
Reviewed-by: glittershark <grfn@gws.fyi>
Tested-by: BuildkiteCI
2020-07-23 21:58:58 +00:00
Kane York
b8e94002d6 feat(3p/nix): run clang-tidy during builds
We need to -isystem the libcxx header files in order for clang-tidy to ignore them, as the Nix clang toolchain isn't doing that automatically.

Change-Id: I05b9e9bd522de4c0e2ad543214f6bf6ab66a306b
Reviewed-on: https://cl.tvl.fyi/c/depot/+/1359
Reviewed-by: glittershark <grfn@gws.fyi>
Tested-by: BuildkiteCI
2020-07-23 21:46:24 +00:00
Alyssa Ross
be98295dc2 feat(3p/cgit): add "this commit" option to switch form
Branches are grouped into their own section to make the "this commit"
option visually distinct.

Adding this option will result in two options being marked as selected
if a branch has the same name as a commit oid.  But that would cause
all sorts of other problems anyway (attempting to switch to the branch
would actually give you the commit, etc.), so let's not worry about
that.

A "permalink" link on the blob view next to the "plain" link would
probably be more discoverable, but that would only work for the blob
view.  The switch UI is visible everywhere.

This patch is in use already at <https://git.qyliss.net/> and
<https://spectrum-os.org/git/>.

Signed-off-by: Alyssa Ross <hi@alyssa.is>
Message-Id: <20200723204820.16776-1-hi@alyssa.is>
Cc: Profpatsch <mail@profpatsch.de>
Change-Id: I7e88d1231dd402e0ad764e16b28e9a51964c6293
Reviewed-on: https://cl.tvl.fyi/c/depot/+/1382
Tested-by: BuildkiteCI
Reviewed-by: tazjin <mail@tazj.in>
2020-07-23 20:53:04 +00:00
Alyssa Ross
231a36e203 chore(3p/nix): fix extra space in usage error
Change-Id: Ic8f8820ba8967166354951cf13af5fa134a1b6b8
Reviewed-on: https://cl.tvl.fyi/c/depot/+/1353
Tested-by: BuildkiteCI
Reviewed-by: glittershark <grfn@gws.fyi>
2020-07-23 18:55:20 +00:00
Alyssa Ross
5183e92e4f feat(3p/nix): remove allow-unsafe-native-code-during-evaluation
This formerly controlled access to builtins.exec and
builtins.importNative, but both of those are gone now, so there's no
need for this option any more.

Change-Id: I6850cbd6be264fbfb1b209a60026dadbd0ba1232
Reviewed-on: https://cl.tvl.fyi/c/depot/+/1341
Reviewed-by: glittershark <grfn@gws.fyi>
Tested-by: BuildkiteCI
2020-07-23 18:55:12 +00:00
Alyssa Ross
855995325e feat(3p/nix): remove builtins.importNative
This is the shared object equivalent of builtins.exec, or a plugins
equivalent accessible from the Nix language.  Either way, since we
don't have builtins.exec or plugins any more, I think it makes sense
to remove this builtin.

This will also allow us to drop the
allow-unsafe-native-code-during-evaluation option, which formerly
controlled whether builtins.exec and builtins.importNative were
enabled.

Cc: Griffin Smith <grfn@gws.fyi>
Cc: Profpatsch <mail@profpatsch.de>
Change-Id: I8993a8a79d559c102647308a2684c089bbc06713
Reviewed-on: https://cl.tvl.fyi/c/depot/+/1340
Reviewed-by: glittershark <grfn@gws.fyi>
Reviewed-by: Profpatsch <mail@profpatsch.de>
Tested-by: BuildkiteCI
2020-07-23 04:53:23 +00:00
Griffin Smith
b1c0866037 feat(3p/lisp): Add LASS
Add LASS, a CSS library

Change-Id: I225959b12210895d0e5baf8a41ac09b0351f0aed
Reviewed-on: https://cl.tvl.fyi/c/depot/+/1349
Tested-by: BuildkiteCI
Reviewed-by: tazjin <mail@tazj.in>
2020-07-23 04:28:13 +00:00
Griffin Smith
08397fd757 feat(3p/lisp): Add many packages
Add the following packages along with their transitive dependencies:
- trivial-ldap
- defclass-std
- easy-routes

Change-Id: Ib24517f18d14d57540362132c9a24ff2a5a4bd9d
Reviewed-on: https://cl.tvl.fyi/c/depot/+/1336
Tested-by: BuildkiteCI
Reviewed-by: tazjin <mail@tazj.in>
Reviewed-by: kanepyork <rikingcoding@gmail.com>
2020-07-23 00:08:29 +00:00
Vincent Ambo
950ba404be fix(3p/nix): Fix string escaping issue in schema include
The SQL schemas are included as string constants which are
concatenated into a header file. In the previous Makefiles, this was
done with envsubst or something - we moved it to CMake.

There was a missing quote around the string to be interpolated, which
meant that CMake interpreted the semicolons as part of its language
syntax and did not emit them.

Change-Id: Ibb4512788b26b53f297db3535094dc0194614446
Reviewed-on: https://cl.tvl.fyi/c/depot/+/1342
Reviewed-by: kanepyork <rikingcoding@gmail.com>
Reviewed-by: glittershark <grfn@gws.fyi>
Tested-by: BuildkiteCI
2020-07-22 01:28:32 +00:00
Griffin Smith
3b02fcb0a7 feat(3p/lisp): Add cl-who
Change-Id: I35fcb65966be2bc63ef534ab0d575aae8beb3cdf
Reviewed-on: https://cl.tvl.fyi/c/depot/+/1327
Reviewed-by: tazjin <mail@tazj.in>
Tested-by: BuildkiteCI
2020-07-21 22:58:17 +00:00
Vincent Ambo
38a262872a chore(3p/nix): Compile under -Wall -Werror
Change-Id: Ia44c68678a0b62e14228fafec88e7591ce3f4cee
Reviewed-on: https://cl.tvl.fyi/c/depot/+/1295
Tested-by: BuildkiteCI
Reviewed-by: glittershark <grfn@gws.fyi>
2020-07-20 16:47:39 +00:00
Griffin Smith
17ca547ed3 feat(3p/nix/nix-daemon): add factory function for WorkerServiceImpl
Add a forward-declared factory function for constructing and returning a
WorkerServiceImpl, for eventual use in the main function for the nix
daemon

Change-Id: I9032d69b6ee3bc3b1f39f3d5d55f951cffad8145
Reviewed-on: https://cl.tvl.fyi/c/depot/+/1293
Tested-by: BuildkiteCI
Reviewed-by: isomer <isomer@tvl.fyi>
2020-07-20 14:45:43 +00:00
Griffin Smith
2ef1060361 chore(3p/nix): Remove support for plugins
Plugins seem to not really be used anywhere (I can find one plugin
that's actually defined, and it doesn't seem very useful, especially
since we got rid of builtins.exec) and their presence is adding
additional complexity and potential sources of bugs to an already
unsteady refactor. At some point we may want to bring back
something *like* plugins, but their design will likely be different and
it will definitely be after we have a functioning Nix again.

Change-Id: I3bc40e55917f70bf260fbc208c1705e2e6a7c626
Reviewed-on: https://cl.tvl.fyi/c/depot/+/1291
Tested-by: BuildkiteCI
Reviewed-by: Alyssa Ross <hi@alyssa.is>
Reviewed-by: isomer <isomer@tvl.fyi>
2020-07-20 14:45:43 +00:00
Vincent Ambo
15afa8472e fix(3p/nix): Fix all remaining compiler warnings
This compiles under `-Wall -Werror`.

The largest chunk of this change is `final` qualifiers for the various
Nix CLI command structs, which inherit from a Command class that has
more virtual functions than are implemented by each command.

Change-Id: I0925e6e1a39013f026773db5816e4a77d50f3b4a
Reviewed-on: https://cl.tvl.fyi/c/depot/+/1294
Tested-by: BuildkiteCI
Reviewed-by: isomer <isomer@tvl.fyi>
Reviewed-by: kanepyork <rikingcoding@gmail.com>
2020-07-19 22:00:59 +00:00
Vincent Ambo
ca50fb66d2 chore(3p/nix): Update deprecated 'pure-parser' setting
This setting was renamed to api.pure about 300 years ago and caused
warnings to be issued.

Change-Id: If883b0667c3afe67ae3d2a9950a796688cfbea7a
Reviewed-on: https://cl.tvl.fyi/c/depot/+/1290
Tested-by: BuildkiteCI
Reviewed-by: glittershark <grfn@gws.fyi>
2020-07-19 19:02:06 +00:00
Vincent Ambo
7a8880a0df refactor(3p/nix): Remove remaining prefork-compat type
Removes the verbosity enum, which is no longer actively used anywhere
other than a daemon protocol implementation bit that doesn't actually
work.

Since the verbosity was marked deprecated, this removes one of the
last remaining warnings.

Change-Id: Iaee9d1d6c14b30daac83bb44bcacff32a0e07fb0
Reviewed-on: https://cl.tvl.fyi/c/depot/+/1289
Tested-by: BuildkiteCI
Reviewed-by: glittershark <grfn@gws.fyi>
2020-07-19 19:02:06 +00:00
Vincent Ambo
324d385b29 refactor(3p/nix): Rename & undeprecate Bindings::lexicographicOrder
The function is renamed to `SortedByKeys`, which is more descriptive,
and annotated with a comment about what it is used for.

The deprecation warning has been removed because this function is
currently functionally required.

Change-Id: I0ee3a76deff05f366feca9ddac8f38ab34bffbd0
Reviewed-on: https://cl.tvl.fyi/c/depot/+/1288
Tested-by: BuildkiteCI
Reviewed-by: glittershark <grfn@gws.fyi>
2020-07-19 19:02:06 +00:00
Vincent Ambo
02066a4bab chore(3p/nix): Enable clang-format check in derivation build
This is the easiest way to get the checks up and running for now, but
we will probably want to separate out things like this into a separate
build step in the future.

Change-Id: I8e1a1095aef09b1eee97abad5b6240bc64d14b8c
Reviewed-on: https://cl.tvl.fyi/c/depot/+/1287
Tested-by: BuildkiteCI
Reviewed-by: glittershark <grfn@gws.fyi>
2020-07-19 16:54:52 +00:00
Vincent Ambo
61a7b97c39 test(3p/nix): Enable output comparison for evaluator success tests
Enables loading of the expected output of evaluator tests from the
corresponding .exp files, and checks that the output matches.

This again leaves some tests behind in the disabled folder, but we now
have almost the entire suite up and running so I can get around to
cleaning up the disabled ones.

Other note: Some tests had XML output, despite not being related to
XML testing at all - I'm not sure why they chose to do this, but have
converted those test outputs to normal Nix instead.

We have a separate test suite for JSON & XML serialisation already,
which was contributed by andi-.

Change-Id: Id7c42c836edfec4c22db9d893e35489f3e6dd559
Reviewed-on: https://cl.tvl.fyi/c/depot/+/1285
Tested-by: BuildkiteCI
Reviewed-by: isomer <isomer@tvl.fyi>
Reviewed-by: glittershark <grfn@gws.fyi>
2020-07-19 16:33:34 +00:00
Vincent Ambo
97e6499225 test(3p/nix): Partially enable evaluator success tests
Enables the `eval-okay-` test suite, with some caveats:

* The output is not yet checked against the expected value, so the
  tests only check that pure evaluation succeeds
* A handful of tests have been disabled as they are causing failures
  that may be related to the DummyStore implementation.

Both of these will be addressed in followup commits, but there is
already some value in having the pure evaluation tests pass.

Change-Id: I62236c95ebffb06dc64a45455a8ee04344c400b7
Reviewed-on: https://cl.tvl.fyi/c/depot/+/1284
Tested-by: BuildkiteCI
Reviewed-by: isomer <isomer@tvl.fyi>
Reviewed-by: glittershark <grfn@gws.fyi>
2020-07-19 16:33:34 +00:00
Griffin Smith
54a5750770 test(3p/nix): Add property tests for attribute set
Add a set of property tests for the attribute set (Bindings) class
checking that the Merge operation satisfies the monoid laws. This
will hopefully become useful to make sure we're not breaking the
language semantics as we work towards optimizing or replacing the
implementation, but also serves as a test bed for adding
rapidcheck-based property tests to the codebase.

Change-Id: I1b4b7b6503d08d80c1c5a8f9408fd4b787d00e8e
Reviewed-on: https://cl.tvl.fyi/c/depot/+/1283
Reviewed-by: isomer <isomer@tvl.fyi>
Tested-by: BuildkiteCI
2020-07-19 16:26:52 +00:00
Griffin Smith
6ff0d7992f feat(3p): Add rapidcheck
Pulled from the commit at current master, overridden to build with clang
and enable gtest and gmock integration.

Change-Id: I10008e8c591bd0c7cc26566b2a050ef2a55bb346
Reviewed-on: https://cl.tvl.fyi/c/depot/+/1282
Tested-by: BuildkiteCI
Reviewed-by: tazjin <mail@tazj.in>
2020-07-19 16:26:52 +00:00
Kane York
f1080c022a fix(3p/nix): convert all holders of EvalState into gc
Change-Id: Ia0d1fdd5c73941d02da0ca7152600f966cee5ccb
Reviewed-on: https://cl.tvl.fyi/c/depot/+/1280
Tested-by: BuildkiteCI
Reviewed-by: tazjin <mail@tazj.in>
2020-07-19 06:40:35 +00:00
Vincent Ambo
105ad71015 refactor(3p/nix/libexpr): Move some code out of lexer.l
Moves a function that is not dependent on the generated code over to
parser.hh. This function also looks like it could be improved, but
that is left as an exercise for the reader.

Code that remains in lexer.l has been reformatted, while we're here.

Change-Id: I9c26bb4eed0772a720d0715029e8bc10ab16ac38
Reviewed-on: https://cl.tvl.fyi/c/depot/+/1279
Tested-by: BuildkiteCI
Reviewed-by: Kane York <rikingcoding@gmail.com>
2020-07-19 02:59:41 +00:00
Kane York
9f5f71616a feat(3p/absl): import StatusOr from tensorflow
Additionally, add tests for the macros. A future CL will enable the tests in CI.

Change-Id: Id4445a1aa65bf6751b87606f37654f3fc6d20efc
Tested-By: kanepyork <rikingcoding@gmail.com>
Reviewed-on: https://cl.tvl.fyi/c/depot/+/1274
Reviewed-by: tazjin <mail@tazj.in>
Reviewed-by: glittershark <grfn@gws.fyi>
Tested-by: BuildkiteCI
2020-07-19 00:51:00 +00:00