chore(tvix/castore/protof): buf format

Change-Id: Idf11de78b0d6eca69fda34a89f2c57a00ed89ad5
Reviewed-on: https://cl.tvl.fyi/c/depot/+/10237
Autosubmit: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
Reviewed-by: Adam Joseph <adam@westernsemico.com>
This commit is contained in:
Florian Klink 2023-12-09 15:22:33 +02:00 committed by clbot
parent db3ef5255f
commit 459d9e106f
5 changed files with 97 additions and 97 deletions

View file

@ -24,8 +24,8 @@ const (
) )
// A Directory can contain Directory, File or Symlink nodes. // A Directory can contain Directory, File or Symlink nodes.
// Each of these nodes have a name attribute, which is the basename in that directory // Each of these nodes have a name attribute, which is the basename in that
// and node type specific attributes. // directory and node type specific attributes.
// The name attribute: // The name attribute:
// - MUST not contain slashes or null bytes // - MUST not contain slashes or null bytes
// - MUST not be '.' or '..' // - MUST not be '.' or '..'
@ -108,14 +108,14 @@ type DirectoryNode struct {
Digest []byte `protobuf:"bytes,2,opt,name=digest,proto3" json:"digest,omitempty"` Digest []byte `protobuf:"bytes,2,opt,name=digest,proto3" json:"digest,omitempty"`
// Number of child elements in the Directory referred to by `digest`. // Number of child elements in the Directory referred to by `digest`.
// Calculated by summing up the numbers of `directories`, `files` and // Calculated by summing up the numbers of `directories`, `files` and
// `symlinks`, and for each directory, its size field. Used for inode // `symlinks`, and for each directory, its size field. Used for inode number
// number calculation. // calculation.
// This field is precisely as verifiable as any other Merkle tree edge. // This field is precisely as verifiable as any other Merkle tree edge.
// Resolve `digest`, and you can compute it incrementally. Resolve the // Resolve `digest`, and you can compute it incrementally. Resolve the entire
// entire tree, and you can fully compute it from scratch. // tree, and you can fully compute it from scratch.
// A credulous implementation won't reject an excessive size, but this is // A credulous implementation won't reject an excessive size, but this is
// harmless: you'll have some ordinals without nodes. Undersizing is // harmless: you'll have some ordinals without nodes. Undersizing is obvious
// obvious and easy to reject: you won't have an ordinal for some nodes. // and easy to reject: you won't have an ordinal for some nodes.
Size uint64 `protobuf:"varint,3,opt,name=size,proto3" json:"size,omitempty"` Size uint64 `protobuf:"varint,3,opt,name=size,proto3" json:"size,omitempty"`
} }

View file

@ -8,8 +8,8 @@ package tvix.castore.v1;
option go_package = "code.tvl.fyi/tvix/castore-go;castorev1"; option go_package = "code.tvl.fyi/tvix/castore-go;castorev1";
// A Directory can contain Directory, File or Symlink nodes. // A Directory can contain Directory, File or Symlink nodes.
// Each of these nodes have a name attribute, which is the basename in that directory // Each of these nodes have a name attribute, which is the basename in that
// and node type specific attributes. // directory and node type specific attributes.
// The name attribute: // The name attribute:
// - MUST not contain slashes or null bytes // - MUST not contain slashes or null bytes
// - MUST not be '.' or '..' // - MUST not be '.' or '..'
@ -30,14 +30,14 @@ message DirectoryNode {
bytes digest = 2; bytes digest = 2;
// Number of child elements in the Directory referred to by `digest`. // Number of child elements in the Directory referred to by `digest`.
// Calculated by summing up the numbers of `directories`, `files` and // Calculated by summing up the numbers of `directories`, `files` and
// `symlinks`, and for each directory, its size field. Used for inode // `symlinks`, and for each directory, its size field. Used for inode number
// number calculation. // calculation.
// This field is precisely as verifiable as any other Merkle tree edge. // This field is precisely as verifiable as any other Merkle tree edge.
// Resolve `digest`, and you can compute it incrementally. Resolve the // Resolve `digest`, and you can compute it incrementally. Resolve the entire
// entire tree, and you can fully compute it from scratch. // tree, and you can fully compute it from scratch.
// A credulous implementation won't reject an excessive size, but this is // A credulous implementation won't reject an excessive size, but this is
// harmless: you'll have some ordinals without nodes. Undersizing is // harmless: you'll have some ordinals without nodes. Undersizing is obvious
// obvious and easy to reject: you won't have an ordinal for some nodes. // and easy to reject: you won't have an ordinal for some nodes.
uint64 size = 3; uint64 size = 3;
} }
@ -69,4 +69,3 @@ message Node {
SymlinkNode symlink = 3; SymlinkNode symlink = 3;
} }
} }

View file

@ -24,6 +24,7 @@
buildPhase = '' buildPhase = ''
export HOME=$TMPDIR export HOME=$TMPDIR
buf lint buf lint
buf format -d --exit-code
buf generate buf generate
mkdir -p $out mkdir -p $out