about summary refs log tree commit diff
path: root/users/Profpatsch/my-prelude (unfollow)
AgeCommit message (Collapse)AuthorFilesLines
106 min. r/8552 chore(web/atward): remove sourcegraph supportVincent Ambo3-173/+5
We're moving away from sourcegraph to livegrep and so on, as Sourcegraph has gone fully proprietary. This removes support for redirecting to Sourcegraph. Relates to b/290 Change-Id: I04ccf8dfef72113cd49d444151cb0c3eb834845d Reviewed-on: https://cl.tvl.fyi/c/depot/+/12268 Reviewed-by: Profpatsch <mail@profpatsch.de> Tested-by: BuildkiteCI
23 hours r/8551 feat(tazjin/german-string): add constructor that leaks a Vec<u8>Vincent Ambo1-2/+29
Change-Id: Id0b6b4794128573ddb62e82fd77d080e564978be Reviewed-on: https://cl.tvl.fyi/c/depot/+/12264 Tested-by: BuildkiteCI Reviewed-by: tazjin <tazjin@tvl.su> Autosubmit: tazjin <tazjin@tvl.su>
23 hours r/8550 feat(tazjin/german-string): add persistent construction from staticsVincent Ambo1-9/+56
Makes it possible to construct persistent German Strings from data with 'static lifetime. This doesn't leak any additional data. Change-Id: Ifb3a36ff72b106724883302e4c2195ac54acd352 Reviewed-on: https://cl.tvl.fyi/c/depot/+/12263 Tested-by: BuildkiteCI Reviewed-by: tazjin <tazjin@tvl.su> Autosubmit: tazjin <tazjin@tvl.su>
23 hours r/8549 refactor(tazjin/german-string): add type for encoding storage classVincent Ambo1-6/+24
Adds a StorageClassPtr type that is set up to be able to steal bits from an aligned pointer to encode the storage class of a German String. Change-Id: I64591174eac1ebcb73e624a59bd107ba1e02c69d Reviewed-on: https://cl.tvl.fyi/c/depot/+/12262 Reviewed-by: tazjin <tazjin@tvl.su> Autosubmit: tazjin <tazjin@tvl.su> Tested-by: BuildkiteCI
39 hours r/8548 fix(tvix/castore): u32 -> u64 in DirectoryError::SizeOverflow messageBen Webb1-1/+1
Fix a discrepancy in the error message for DirectoryError::SizeOverflow. The message indicates that the SizeOverflow error occurs when total size exceeds u32::MAX, but that's not true. All size fields within the castore's internal Directory ADT are u64, and the SizeOverflow error is only returned after a call to the checked_add implementation on u64. See tvix/castore/nodes/directory.rs +111 and tvix/castore/nodes/directory.rs +88 as of this commit. Change-Id: I74d161ea8927362e1cb601ba163489aa96fb91b1 Reviewed-on: https://cl.tvl.fyi/c/depot/+/12259 Tested-by: BuildkiteCI Reviewed-by: flokli <flokli@flokli.de>
2 days r/8547 feat(nix-compat/nix_http): init parse_nar[info]_strFlorian Klink15-178/+634
This moves the URL component parsing code we had in nar-bridge to nix-compat. We change the function signature to return an Option, not a Result<_, StatusCode>. This allows returning more appropriate error codes, as we can ok_or(…) at the callsite, which we now do: on an upload to an invalid path, we now return "unauthorized", while on a GET/HEAD, we return "not found". This also adds support to parse compression suffixes. While not supported in nar-bridge, other users of nix-compat might very well want to parse these paths. Also fix the error message when parsing NAR urls, it mentioned 32, not 52, which is a copypasta error from the narinfo URL parsing code. Change-Id: Id1be9a8044814b54ce68b125c52dfe933c9c4f74 Reviewed-on: https://cl.tvl.fyi/c/depot/+/12260 Reviewed-by: raitobezarius <tvl@lahfa.xyz> Autosubmit: flokli <flokli@flokli.de> Tested-by: BuildkiteCI
3 days r/8546 feat(kontemplate): defaults can now have nested valuesArmin Schlegel2-1/+23
See https://b.tvl.fyi/issues/409 for details. Change-Id: Ibb54fab7a78e0e5f708c2a7dc8bb26ac0b2b4689 Signed-off-by: Armin Schlegel <a.schlegel@gridx.de> Reviewed-on: https://cl.tvl.fyi/c/depot/+/11972 Tested-by: BuildkiteCI Reviewed-by: tazjin <tazjin@tvl.su>
3 days r/8545 refactor(nix-compat/store_path): make StorePath generic on SFlorian Klink15-294/+280
Similar to how cl/12253 already did this for `Signature`, we apply the same logic to `StorePath`. `StorePathRef<'a>'` is now a `StorePath<&'a str>`, and there's less redundant code for the two different implementation. `.as_ref()` returns a `StorePathRef<'_>`, `.to_owned()` gives a `StorePath<String>` (for now). I briefly thought about only publicly exporting `StorePath<String>` as `StorePath`, but the diff is not too large and this will make it easier to gradually introduce more flexibility in which store paths to accept. Also, remove some silliness in `StorePath::from_absolute_path_full`, which now doesn't allocate anymore. Change-Id: Ife8843857a1a0a3a99177ca997649fd45b8198e6 Reviewed-on: https://cl.tvl.fyi/c/depot/+/12258 Autosubmit: flokli <flokli@flokli.de> Tested-by: BuildkiteCI Reviewed-by: Connor Brewster <cbrewster@hey.com>
3 days r/8544 refactor(nix-compat/aterm): update function names a bitFlorian Klink3-26/+26
Don't call functions bstr or str when they return BString or String, it's confusing. Rename them to `string` and `bytes`. We might be able to generalize over this being BString or Vec<u8> later. Change-Id: I8198551ed3ba1cfc479bf7e3cbbc13a426faf4c0 Reviewed-on: https://cl.tvl.fyi/c/depot/+/12257 Autosubmit: flokli <flokli@flokli.de> Tested-by: BuildkiteCI Reviewed-by: Connor Brewster <cbrewster@hey.com>
3 days r/8543 feat(tools/depotfmt): Get gofmt from pkgs.go instead of buildGoIlan Joselevich1-2/+2
This allows importing just //tools/depotfmt.nix when using a josh workspace. Change-Id: Idf7eb438be1cc1e60445aace982fdca1f4367595 Reviewed-on: https://cl.tvl.fyi/c/depot/+/12254 Tested-by: BuildkiteCI Autosubmit: Ilan Joselevich <personal@ilanjoselevich.com> Reviewed-by: flokli <flokli@flokli.de>
3 days r/8542 chore(aspen/system): Turn off disableWhileTyping for libinputAspen Smith1-6/+1
I... actually really hate this, it turns out. Plus it breaks video games, lol. Change-Id: I4b86e38ee78f5f3b6ffec5e7cc4f1dc054d91c56 Reviewed-on: https://cl.tvl.fyi/c/depot/+/12256 Reviewed-by: aspen <root@gws.fyi> Autosubmit: aspen <root@gws.fyi> Tested-by: BuildkiteCI
4 days r/8541 feat(tvix/nix-compat): entry locator in listing structuresRyan Lahfa2-1/+113
This implements a simple DFS locator in listing structures. It is interoperable with the Rust standard library paths, we also build our own errors to restrict path values to reasonable secure defaults, e.g. relative paths with no `..` component. Tests are added for this new feature for a positive and a negative check. In addition, a path validation test was added. The Windows-style prefix is gated on the Windows platform as UNIX does not parse `C:\\` as a `Component::Prefix(_)` but as a `Component::Normal(_)`. Change-Id: Iae2a80bebd8138e41af94aa7d09f2842c3c5a786 Signed-off-by: Ryan Lahfa <tvl@lahfa.xyz> Reviewed-on: https://cl.tvl.fyi/c/depot/+/12255 Reviewed-by: flokli <flokli@flokli.de> Tested-by: BuildkiteCI
4 days r/8540 feat(nix-compat/narinfo/signature): generalize name fieldFlorian Klink9-45/+117
Requiring `name` to be a `&str` means it'll get annoying to pass around `Signature`, but being able to pass them around in an owned fashion is kinda a requirement for a stronger typed `PathInfo` struct, where we want to have full ownership. Rework the `Signature` struct to become generic over the type of the `name` field. This means, it becomes possible to have owned versions of it. We don't want to impose `String` or `SmolStr` for example, but want to leave it up to the nix-compat user to decide. Provide a type alias for the existing `&str` variant (`SignatureRef`), and use it where we previously used the non-generic `Signature` one. Add some tests to ensure it's possible to *use* `Signature` with both `String` and `SmolStr` (but only pull in `smol_str` as dev dependency for the tests). Also, add some more docstrings, these were a bit sparse. Change-Id: I3f75691498c6bda9cd072d2d9dac83c4f6c57287 Reviewed-on: https://cl.tvl.fyi/c/depot/+/12253 Autosubmit: flokli <flokli@flokli.de> Tested-by: BuildkiteCI Reviewed-by: raitobezarius <tvl@lahfa.xyz>
4 days r/8539 feat(tvix/nix-compat): add a basic listing deserializerRyan Lahfa4-0/+77
.ls files are useful to seek in a NAR without parsing it entirely. The responsibility of validating the files is on the caller. Change-Id: I5d1da28b5479c38f20ca5babe60e362a2217c9ea Signed-off-by: Ryan Lahfa <tvl@lahfa.xyz> Reviewed-on: https://cl.tvl.fyi/c/depot/+/12196 Tested-by: BuildkiteCI Reviewed-by: flokli <flokli@flokli.de>
4 days r/8538 feat(tvix): drop usage of sparseTree in favor of lib.sourceByRegexIlan Joselevich6-41/+25
We can avoid depending on things outside //tvix by just using a similar util from nixpkgs. Change-Id: I9ea3e1f0a8a059ea10caaec173569ba9f316aec6 Reviewed-on: https://cl.tvl.fyi/c/depot/+/12247 Tested-by: BuildkiteCI Reviewed-by: flokli <flokli@flokli.de>
4 days r/8537 feat(tvix/boot/tests): use pkgs.nixos instead of nixosForIlan Joselevich1-4/+5