about summary refs log tree commit diff
path: root/users/Profpatsch/read-http/default.nix
diff options
context:
space:
mode:
authorProfpatsch <mail@profpatsch.de>2021-01-31T15·38+0100
committerProfpatsch <mail@profpatsch.de>2021-01-31T16·06+0000
commit492b79ec7a1844700ff75e19b39e3bc21f93dc23 (patch)
tree8b03f572a054bee26f511ee80c746c4ca15eb64c /users/Profpatsch/read-http/default.nix
parent83634341aa6683e1b96717757557c7d83a89b3fd (diff)
feat(users/Profpatsch): add die_* helpers for semantic exit errors r/2176
There is this semantic exit code schema championed by execline and
skaware tooling, and we refined and documented it a bit in lorri
https://github.com/nix-community/lorri/blob/d1d673d42090f0cfe8ab9b92b465315a9e7d30a3/src/ops/mod.rs#L24-L35
in the past.

This just transcribes the error messages into simple helper functions.

Applies the functions to the places where we would panic or die
`sys::exit()` instead.

Change-Id: I15ca05cd6f99a25a3378518be94110eab416354e
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2475
Tested-by: BuildkiteCI
Reviewed-by: Profpatsch <mail@profpatsch.de>
Diffstat (limited to 'users/Profpatsch/read-http/default.nix')
-rw-r--r--users/Profpatsch/read-http/default.nix20
1 files changed, 0 insertions, 20 deletions
diff --git a/users/Profpatsch/read-http/default.nix b/users/Profpatsch/read-http/default.nix
deleted file mode 100644
index 41fe1c7fedcc..000000000000
--- a/users/Profpatsch/read-http/default.nix
+++ /dev/null
@@ -1,20 +0,0 @@
-{ depot, pkgs, ... }:
-
-let
-
-  # reads a http request (stdin), and writes all headers to stdout, as netencoded dict
-  read-http = depot.users.Profpatsch.writers.rustSimple {
-    name = "read-http";
-    dependencies = [
-      depot.users.Profpatsch.rust-crates.ascii
-      depot.users.Profpatsch.rust-crates.httparse
-      depot.users.Profpatsch.netencode.netencode-rs
-      depot.users.Profpatsch.arglib.netencode.rust
-    ];
-  } (builtins.readFile ./read-http.rs);
-
-in {
-  inherit
-    read-http
-    ;
-}