chore(3p/sources): Bump channels & overlays

- Adjust to ecl 23.9.9 release

- Regenerate go protos after protoc-gen-go update

- Drop dhall fork which hasn't kept up with 1.42.*

- Address new clippy warnings:

  - Variant naming of Error::ValidationError
  - Simplify .try_into().unwrap()
  - Drop unnecessary identity function
  - Test module must be last in file
  - Drop unused `pub use`

- Update agenix to 0.15.0. Current master has a installCheckPhase that
  doesn't work with C++ Nix 2.3.*:
  a23aa271be (commitcomment-137185861)

Change-Id: Ic29eef20d6fd1362ce1031364a5ca6b4edf195bd
Reviewed-on: https://cl.tvl.fyi/c/depot/+/10615
Reviewed-by: aspen <root@gws.fyi>
Tested-by: BuildkiteCI
Autosubmit: sterni <sternenseemann@systemli.org>
This commit is contained in:
sterni 2024-01-13 19:21:34 +01:00 committed by clbot
parent 9a09505b77
commit 526295a71d
16 changed files with 61 additions and 96 deletions

View file

@ -3,7 +3,7 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.31.0
// protoc-gen-go v1.32.0
// protoc (unknown)
// source: tvix/build/protos/build.proto

View file

@ -3,7 +3,7 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.31.0
// protoc-gen-go v1.32.0
// protoc (unknown)
// source: tvix/build/protos/rpc_build.proto

View file

@ -3,7 +3,7 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.31.0
// protoc-gen-go v1.32.0
// protoc (unknown)
// source: tvix/castore/protos/castore.proto

View file

@ -3,7 +3,7 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.31.0
// protoc-gen-go v1.32.0
// protoc (unknown)
// source: tvix/castore/protos/rpc_blobstore.proto

View file

@ -3,7 +3,7 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.31.0
// protoc-gen-go v1.32.0
// protoc (unknown)
// source: tvix/castore/protos/rpc_directory.proto

View file

@ -141,9 +141,7 @@ fn digest() {
assert_eq!(
d.digest(),
(&hex!("af1349b9f5f9a1a6a0404dea36dcc9499bcb25c9adc112b7cc9a93cae41f3262"))
.try_into()
.unwrap()
(&hex!("af1349b9f5f9a1a6a0404dea36dcc9499bcb25c9adc112b7cc9a93cae41f3262")).into()
)
}

View file

@ -78,11 +78,7 @@ fn test_kv_attrs_iter() {
)
.expect("constructing K/V pair attrs should succeed");
let mut iter = kv_attrs
.iter()
.collect::<Vec<_>>()
.into_iter()
.map(|(k, v)| (k, v));
let mut iter = kv_attrs.iter().collect::<Vec<_>>().into_iter();
let (k, v) = iter.next().unwrap();
assert!(k == *NAME_REF);
assert!(v.to_str().unwrap() == meaning_val.to_str().unwrap());

View file

@ -526,5 +526,3 @@ pub(crate) mod derivation_builtins {
Ok(Value::String(NixString::new_context_from(context, &path)))
}
}
pub use derivation_builtins::builtins as derivation_builtins;

View file

@ -23,7 +23,7 @@ pub enum Error<I> {
#[error("premature EOF")]
Incomplete,
#[error("validation error: {0}")]
ValidationError(super::DerivationError),
Validation(super::DerivationError),
}
pub(crate) fn parse(i: &[u8]) -> Result<Derivation, Error<&[u8]>> {
@ -33,7 +33,7 @@ pub(crate) fn parse(i: &[u8]) -> Result<Derivation, Error<&[u8]>> {
debug_assert!(rest.is_empty());
// invoke validate
derivation.validate(true).map_err(Error::ValidationError)?;
derivation.validate(true).map_err(Error::Validation)?;
Ok(derivation)
}

View file

@ -91,36 +91,6 @@ macro_rules! make {
};
}
pub(crate) use make;
#[cfg(test)]
mod test {
use super::super::tag::{self, Tag};
const TOK_A: [u8; 3] = [0xed, 0xef, 0x1c];
const TOK_B: [u8; 3] = [0xed, 0xf0, 0x1c];
const OFFSET: usize = 1;
make! {
enum Token[OFFSET] {
A = TOK_A,
B = TOK_B,
}
}
#[test]
fn example() {
assert_eq!(Token::from_u8(0xed), None);
let tag = Token::from_u8(0xef).unwrap();
assert_eq!(tag.as_bytes(), &TOK_A[..]);
let tag = Token::from_u8(0xf0).unwrap();
assert_eq!(tag.as_bytes(), &TOK_B[..]);
}
}
// The following functions are written somewhat unusually,
// since they're const functions that cannot use iterators.
@ -163,3 +133,33 @@ pub const fn min_of(mut xs: &[usize]) -> usize {
pub const fn buf_of(xs: &[usize]) -> usize {
max_of(&[min_of(xs), max_of(xs) - min_of(xs)])
}
pub(crate) use make;
#[cfg(test)]
mod test {
use super::super::tag::{self, Tag};
const TOK_A: [u8; 3] = [0xed, 0xef, 0x1c];
const TOK_B: [u8; 3] = [0xed, 0xf0, 0x1c];
const OFFSET: usize = 1;
make! {
enum Token[OFFSET] {
A = TOK_A,
B = TOK_B,
}
}
#[test]
fn example() {
assert_eq!(Token::from_u8(0xed), None);
let tag = Token::from_u8(0xef).unwrap();
assert_eq!(tag.as_bytes(), &TOK_A[..]);
let tag = Token::from_u8(0xf0).unwrap();
assert_eq!(tag.as_bytes(), &TOK_B[..]);
}
}

View file

@ -18,7 +18,7 @@ in
${regenerate}
if [[ -n "$(git status --porcelain -unormal)" ]]; then
echo "-----------------------------"
echo ".pb.go files need to be updated, mg run //tvix/store-go/generate"
echo ".pb.go files need to be updated, mg run //tvix/store-go/regenerate"
echo "-----------------------------"
git status -unormal
exit 1

View file

@ -3,7 +3,7 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.31.0
// protoc-gen-go v1.32.0
// protoc (unknown)
// source: tvix/store/protos/pathinfo.proto

View file

@ -3,7 +3,7 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.31.0
// protoc-gen-go v1.32.0
// protoc (unknown)
// source: tvix/store/protos/rpc_pathinfo.proto