Previously when running all boot integration tests with
`mg build //snix/boot:tests`, and one of them failing, it was not clear
which one failed, because on failed test derivation name shown used the
same suffix for all tests. Now, for a cost of a bit more boilerplate,
test derivation name contains its name, so it's immediately obvious.
Change-Id: If8766e12048a50f21d61c615239ee62b3361ac2f
Reviewed-on: https://cl.snix.dev/c/snix/+/30674
Reviewed-by: Florian Klink <flokli@flokli.de>
Tested-by: besadii
Most of the ecosystem has moved to this formatter,
and many people configured their editors to autoformat it with this formatter.
Closes: https://git.snix.dev/snix/snix/issues/62
Change-Id: Icf39e7836c91fc2ae49fbe22a40a639105bfb0bd
Reviewed-on: https://cl.snix.dev/c/snix/+/30671
Reviewed-by: Florian Klink <flokli@flokli.de>
Tested-by: besadii
Autosubmit: Ilan Joselevich <personal@ilanjoselevich.com>
SrvOS was oudated and still using ther zstd nginx settings which are no
longer recommended to use. This made eval fail with an assertion.
Change-Id: If5edf99247e0500f6d23325a4f2dd34cb31d8252
Reviewed-on: https://cl.snix.dev/c/snix/+/30664
Autosubmit: Ilan Joselevich <personal@ilanjoselevich.com>
Tested-by: besadii
Reviewed-by: Florian Klink <flokli@flokli.de>
We already have serde_with in the workspace and using it cuts down
on code lines (very slightly).
This also adds a FromStr implementation for HashAlgo in addition to
the existing TryFrom<&str>.
Change-Id: I1b525d7391f3881d54cef0c74d22198ad394f47d
Reviewed-on: https://cl.snix.dev/c/snix/+/30652
Reviewed-by: Florian Klink <flokli@flokli.de>
Tested-by: besadii
Autosubmit: Brian Olsen <brian@maven-group.org>
This makes serde features optional behind a flag that is not enabled
by default. So Deserialize and Serialize implementations and anything
that deals with JSON.
Change-Id: I04830aa3883da13ea99a4a51b28981e8a5ecd426
Reviewed-on: https://cl.snix.dev/c/snix/+/30660
Autosubmit: Brian Olsen <brian@maven-group.org>
Reviewed-by: Florian Klink <flokli@flokli.de>
Tested-by: besadii
Because we are now using mkCargoBuild to build this crate in CI we can
get rid of the compile-tests flag and always run the compile tests.
This is because the trybuild crate works when using the the same build
method we used for rustdoc an clippy.
Change-Id: I3f168a987a09bf6f3e3e7c1ab3aaa1acd9d010cf
Reviewed-on: https://cl.snix.dev/c/snix/+/30651
Reviewed-by: Florian Klink <flokli@flokli.de>
Autosubmit: Brian Olsen <brian@maven-group.org>
Tested-by: besadii
When using mkCargoBuild we can in a later CL enable the compile tests
and get rid of the feature flag in the nix-compat-derive-tests crate.
Change-Id: Ieeb991b65beb6bf19a01d62a935b6ffaf3d405d8
Reviewed-on: https://cl.snix.dev/c/snix/+/30650
Autosubmit: Brian Olsen <brian@maven-group.org>
Tested-by: besadii
Reviewed-by: Florian Klink <flokli@flokli.de>
This just adds a dummy struct of OCIBuildService to make rustdoc build
work on non-linux targets.
Change-Id: Iea958d9ed7ac0720ffe199c5c201e7a2edbba3ed
Reviewed-on: https://cl.snix.dev/c/snix/+/30649
Autosubmit: Brian Olsen <brian@maven-group.org>
Reviewed-by: Florian Klink <flokli@flokli.de>
Tested-by: besadii
This just adds a nix attribute for running rustdoc tests.
Change-Id: I3bf2699ef03c6b7cafc0b76b32660b142cbd972c
Reviewed-on: https://cl.snix.dev/c/snix/+/30648
Tested-by: besadii
Autosubmit: Brian Olsen <brian@maven-group.org>
Reviewed-by: Florian Klink <flokli@flokli.de>
This creates a mkCargoBuild function of the shared bits from clippy and
rust-docs uses it for those targets.
Change-Id: I44f9f2b319ea4ef1d1236feabdf726f0256d5d70
Reviewed-on: https://cl.snix.dev/c/snix/+/30647
Reviewed-by: Florian Klink <flokli@flokli.de>
Autosubmit: Brian Olsen <brian@maven-group.org>
Tested-by: besadii
- Update Forgejo from 11.0.1 to 12.0.1, match upstream (see #80, cl 30121).
- Re-vendor and refresh Gerrit integration patches from lix to restore compatibility (patches broke @ cl 30628).
- Update dead emoji asset links to new locations, borrowed from lix infra (old URLs 404'd).
- Fixes build failure for ops.nixos.public01System (#169).
Context:
- Forgejo build broke after nixpkgs channel bump (cl 30628) due to outdated patches (#169).
- Emoji assets previously fetched from volpeon.ink are now archived or moved; new URLs and hashes are from lix infra.
- Gerrit patches are yoinked from lix again to restore code review tab and Gerrit CL linking (thanks emilylange).
Closes: #169
Refs: #80
Change-Id: I6a6a696423a6360b4056892e171df2baf6fa7206
Reviewed-on: https://cl.snix.dev/c/snix/+/30645
Tested-by: besadii
Autosubmit: Oleksandr Knyshuk <olk@disr.it>
Reviewed-by: Florian Klink <flokli@flokli.de>
- Extend the notification template to handle `wip-state-changed` events where a change is undrafted (i.e., `.Change.Wip` is false or not present).
- Add test cases for undrafting (should notify) and re-drafting (should not notify).
- Ensure correct handling of `.Changer.Username` for undraft notifications.
- Update Go module dependencies for test coverage. (`go mod tidy`)
This allows the IRC bot to notify when a change is moved out of
WIP/draft state, improving visibility for ready-for-review CLs.
Fixes#167.
Change-Id: I6a6a69642369726c3bd9f523ae025c34dba8c4aa
Reviewed-on: https://cl.snix.dev/c/snix/+/30641
Reviewed-by: Oleksandr Knyshuk <olk@disr.it>
Tested-by: besadii
Reviewed-by: Florian Klink <flokli@flokli.de>
Closes#114
Removes the per-crate rustfmt configs, sets default edition to 2024.
This should fix the formatting issues between some editors and CI.
Change-Id: I9bb3a5f49f8ba2c8a616f29e87b7f8093187a165
Reviewed-on: https://cl.snix.dev/c/snix/+/30595
Autosubmit: Bence Nemes <nemes.bence1@gmail.com>
Tested-by: besadii
Reviewed-by: Florian Klink <flokli@flokli.de>
Update the zstd crate from version 0.9.0 to 0.13.0, removing the TODO
comment blocking the upgrade. The dependency update also includes
related bumps to zstd-safe and zstd-sys crates, along with the
addition of pkg-config as a new transitive dependency.
Change-Id: I6a6a696459075f5ee56f448e87286b6ec39b26d3
Reviewed-on: https://cl.snix.dev/c/snix/+/30640
Tested-by: besadii
Reviewed-by: Florian Klink <flokli@flokli.de>
Part of #114
There were a lot of warnings about drop order change. They are triggered
by NixString's custom drop, but the drop doesn't have side effects so
they can be ignored.
Change-Id: I19071de0fd39b8f0d19abc917d1d89d1cf26de40
Reviewed-on: https://cl.snix.dev/c/snix/+/30592
Reviewed-by: Florian Klink <flokli@flokli.de>
Autosubmit: Bence Nemes <nemes.bence1@gmail.com>
Reviewed-by: Domen Kožar <domen@cachix.org>
Tested-by: besadii
Abstracts enviornment access to the IO trait.
It also replaces the unsafe set_var in the test harness.
Change-Id: I3908f2d3cc4392ad2f5bc843c4de63382b692dfd
Reviewed-on: https://cl.snix.dev/c/snix/+/30639
Autosubmit: Bence Nemes <nemes.bence1@gmail.com>
Tested-by: besadii
Reviewed-by: Florian Klink <flokli@flokli.de>
This was still using substituteAll, which got removed in the following
nixpkgs bump.
Change-Id: Ia07e2fce8a405973234f2c0d247579f68679446c
Reviewed-on: https://cl.snix.dev/c/snix/+/30629
Autosubmit: Florian Klink <flokli@flokli.de>
Tested-by: besadii
Reviewed-by: Ryan Lahfa <ryan@lahfa.xyz>
Passing around boxed errors here would be way more annoying, and we call
this once during database initialization.
Change-Id: I04e65dcc6fbdec591ef553bac9825f51a7d47991
Reviewed-on: https://cl.snix.dev/c/snix/+/30633
Autosubmit: Florian Klink <flokli@flokli.de>
Tested-by: besadii
Reviewed-by: Ryan Lahfa <ryan@lahfa.xyz>
We still need to unbox before calling ::with_interceptor, the proper fix
will be in https://github.com/hyperium/tonic/issues/2253.
Change-Id: I6de13de79e8ffd9d2f75268b7b232c2f6c91202d
Reviewed-on: https://cl.snix.dev/c/snix/+/30632
Tested-by: besadii
Autosubmit: Florian Klink <flokli@flokli.de>
Reviewed-by: Ryan Lahfa <ryan@lahfa.xyz>
This broke in cl/11976 and cl/11983, the ::with_interceptor() calls
went missing.
Change-Id: Ic78a88d6c102d79da58fe45d5e595d3879c12af7
Reviewed-on: https://cl.snix.dev/c/snix/+/30631
Tested-by: besadii
Autosubmit: Florian Klink <flokli@flokli.de>
Reviewed-by: Ryan Lahfa <ryan@lahfa.xyz>
This uses variables inside `format!()` strings directly,
and switches to using `std::io::Error::other(e.to_string())`
instead of std::io::Error::new(io::ErrorKind::Other, e.to_string()).
It also found an unnecessary `mut` in the test harness.
Change-Id: I406c709091e87ec64bfbdbcdc7f460af9b83d3bc
Reviewed-on: https://cl.snix.dev/c/snix/+/30630
Autosubmit: Florian Klink <flokli@flokli.de>
Tested-by: besadii
Reviewed-by: Ryan Lahfa <ryan@lahfa.xyz>
patchset and change numbers are numbers in the JSON, trying to deserialize them into a string fails:
Jul 28 20:34:03 gerrit01 gerrit-webhook-to-irccat[2430441]: time=2025-07-28T20:34:03.675Z level=WARN msg="failed to parse body" error="json: cannot unmarshal number into Go struct field PatchSet.patchSet.number of type string"
Update our library dependency to a version containing the fixed types.
Also add tests for the three messages we care about.
Change-Id: Iac44e6ad01a8590b4cafa4d301c9f45000f335d0
Reviewed-on: https://cl.snix.dev/c/snix/+/30624
Tested-by: besadii
Reviewed-by: Ryan Lahfa <ryan@lahfa.xyz>
Reviewed-by: Jade Lovelace <jade@lix.systems>
Autosubmit: Florian Klink <flokli@flokli.de>
Reviewed-by: Florian Klink <flokli@flokli.de>
This was a workaround, the workaround is not needed anymore.
Change-Id: I4a839f3733ec6cb0a26ba87dadafe304ff5ccfbe
Reviewed-on: https://cl.snix.dev/c/snix/+/30603
Autosubmit: Florian Klink <flokli@flokli.de>
Reviewed-by: Yureka <snix@yuka.dev>
Tested-by: besadii
Snix is not provided as a josh workspace, this was only the case for
Tvix, while still in the TVL repo, so we can drop that entrypoint.
Change-Id: Iafc2a6520645e607f26bcf674a3d98b646f5c9f2
Reviewed-on: https://cl.snix.dev/c/snix/+/30601
Reviewed-by: Yureka <snix@yuka.dev>
Tested-by: besadii
Autosubmit: Florian Klink <flokli@flokli.de>
Lix does this and it has eliminated anyone ever having to think about
it; it just works.
Change-Id: I24a35d2d0b31f1245172d332bac40fe0b39dc2b9
Reviewed-on: https://cl.snix.dev/c/snix/+/30604
Tested-by: besadii
Reviewed-by: Florian Klink <flokli@flokli.de>
We found this bug in Lix's config and noticed Snix had the same bug; see
4b9e84fa0a
and b47965fe8f.
Change-Id: I65b14839a62c4e779136c1c34750d15cedaaddc8
Reviewed-on: https://cl.snix.dev/c/snix/+/30605
Tested-by: besadii
Reviewed-by: Florian Klink <flokli@flokli.de>
There's no point in replicating redundant information in many different
places. Add some more pointers and encouragement to read the docs where
they live.
Change-Id: I449101cfda7c8a728d3e2f3be71dee00be780ec3
Reviewed-on: https://cl.snix.dev/c/snix/+/30599
Tested-by: besadii
Reviewed-by: Vova Kryachko <v.kryachko@gmail.com>
Autosubmit: Florian Klink <flokli@flokli.de>
Part of #114
The lock at `nix-compat/src/nix_daemon/handler.rs:186` gets released later, but
this doesnt seem to change behavior.
Change-Id: If871a090791740d98bca7a043e86af6a9b0c5463
Reviewed-on: https://cl.snix.dev/c/snix/+/30590
Autosubmit: Bence Nemes <nemes.bence1@gmail.com>
Tested-by: besadii
Reviewed-by: Florian Klink <flokli@flokli.de>
Part of #114
This edition change doesn't affect these crates except for formatting.
Change-Id: I441c967b6803f1f839379c2ec13dee3f0958fb05
Reviewed-on: https://cl.snix.dev/c/snix/+/30593
Autosubmit: Bence Nemes <nemes.bence1@gmail.com>
Reviewed-by: Ilan Joselevich <personal@ilanjoselevich.com>
Reviewed-by: Florian Klink <flokli@flokli.de>
Tested-by: besadii
Part of #114
This edition change doesn't affect this crate except for formatting.
Change-Id: I8e2650f6de776658a14ee5a11bc7a63ad57fae89
Reviewed-on: https://cl.snix.dev/c/snix/+/30591
Reviewed-by: Florian Klink <flokli@flokli.de>
Autosubmit: Bence Nemes <nemes.bence1@gmail.com>
Tested-by: besadii
Use entry.file_type() instead of entry.metadata().file_type() to avoid
unnecessary stat syscalls. The file_type() method uses the cached d_type
field from the readdir() syscall when available, eliminating the need
for additional filesystem access.
This matches the behavior described in https://github.com/NixOS/nix/pull/13412
where readDir should only read directory entries without stat'ing each file.
Change-Id: I8983f84a7cff28b2c892d5829b9880ed22be4389
Reviewed-on: https://cl.snix.dev/c/snix/+/30596
Reviewed-by: Florian Klink <flokli@flokli.de>
Tested-by: besadii