about summary refs log tree commit diff
path: root/users/Profpatsch/netencode/netencode.rs
AgeCommit message (Collapse)AuthorFilesLines
2021-02-06 r/2181 fix(users/Profpatsch/netencode-rs-tests): reflect changed T::List typesterni1-1/+1
a044a870849d03b3a71df17e589112e0c228a06e removed boxes in T::List, but the tests were not adjusted accordingly. Seems like netencode fell victim to CI not recursing into attrsets not generated by readTree in pipeline generation. Change-Id: I65d58a82881059983f7d6bc7a32263c6671ccbba Reviewed-on: https://cl.tvl.fyi/c/depot/+/2486 Reviewed-by: Profpatsch <mail@profpatsch.de> Tested-by: BuildkiteCI
2021-01-31 r/2176 feat(users/Profpatsch): add die_* helpers for semantic exit errorsProfpatsch1-3/+4
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>
2021-01-31 r/2172 feat(users/Profpatsch/netencode): add decoder moduleProfpatsch1-0/+46
Decoders are implemented not directly on output types, but on trivial proxy types, so that we can easily combine those into a decoder, and then the associated type is the actual return value of the decoder. Change-Id: Ibce98fa09fc944e02ab327112ec7ffbc09815830 Reviewed-on: https://cl.tvl.fyi/c/depot/+/2455 Tested-by: BuildkiteCI Reviewed-by: Profpatsch <mail@profpatsch.de>
2021-01-31 r/2170 refactor(users/Profpatsch/netencode): rust read from stdin helperProfpatsch1-1/+13
Change-Id: I195c0212e224f676de5db37807731b814f99e818 Reviewed-on: https://cl.tvl.fyi/c/depot/+/2452 Tested-by: BuildkiteCI Reviewed-by: Profpatsch <mail@profpatsch.de>
2021-01-27 r/2147 fix(users/Profpatsch/netencode): remove Boxes in AST structProfpatsch1-27/+27
Apparently HashMap and Vec already do internal boxing, so the extra indirection in the value isn’t needed. Then, in order to make things uniform, move the boxing of `Sum` into the `Tag` value. No extra boxing in the recursion! \o/ Change-Id: Ic21d2e3e6ac0c6e1f045bf2c9d3e9c5af446fcff Reviewed-on: https://cl.tvl.fyi/c/depot/+/2443 Reviewed-by: Profpatsch <mail@profpatsch.de> Tested-by: BuildkiteCI
2021-01-03 r/2058 feat(Profpatsch/netencode): add netencode-mustacheProfpatsch1-1/+1
A little executable, combining the netencode and mustache libraries to make easy templating from the command line possible. Combined with the nix netencode generators, it’s now trivial to populate a mustache template with (nearly) arbitrary data. Yay. Change-Id: I5b892c38fbc33dd826a26174dd9567f0b72e6322 Reviewed-on: https://cl.tvl.fyi/c/depot/+/2320 Reviewed-by: Profpatsch <mail@profpatsch.de> Tested-by: BuildkiteCI
2021-01-03 r/2057 feat(Profpatsch): dump netencode spec & parserProfpatsch1-0/+553
The netencode standard, a no-nonsense extension of netstrings for structured data. Includes a nix generator module and a rust parsing library. Imported from https://github.com/openlab-aux/vuizvui/tree/e409df3861f48de44d0e37277ce007e348a7a0dc/pkgs/profpatsch/netencode Original license GPLv3, but I’m the sole author, so I transfer it to whatever license depot uses. Change-Id: I4f6fa97120a0fd861eeef35085a3dd642ab7c407 Reviewed-on: https://cl.tvl.fyi/c/depot/+/2319 Tested-by: BuildkiteCI Reviewed-by: Profpatsch <mail@profpatsch.de>