chore(3p/sources): bump channels & overlays (2024-12-31)

Last one of the year! С наступающим)

Fixes:

* users/wpcarro: remove use-package from emacs packages (it has been built-in
  for a while now)
* users/sterni: the same thing
* users/aspen: remove `coz`, forwardport `gdmap` from stable
* users/flokli: dropped corneish_zen firmware from CI
  This firmware depends on a non-reproducible FOD which, when updated, causes
  build failures. We have worked around this repeatedly, but it needs to be
  fixed properly.
* tvix: regenerate Go protobufs
* tvix: address new clippy lints
* tvix/{castore,store,build}-go: update grpc/protobuf libraries
* tvix/eval: formatting fixes
* 3p/overlays/tvl: work around GCC 14 -Werrors

Change-Id: Ice5948ca7780192fb7d2abc6a48971fb875f03c9
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12933
Reviewed-by: tazjin <tazjin@tvl.su>
Reviewed-by: sterni <sternenseemann@systemli.org>
Reviewed-by: aspen <root@gws.fyi>
Autosubmit: tazjin <tazjin@tvl.su>
Tested-by: BuildkiteCI
This commit is contained in:
Vincent Ambo 2024-12-31 12:05:05 +03:00 committed by clbot
parent bd73dff0bf
commit 54f72afcda
44 changed files with 516 additions and 578 deletions

View file

@ -117,6 +117,10 @@ readTree.fix (self: (readDepot {
self.users.wpcarro.nixos.kyokoSystem
self.users.wpcarro.nixos.marcusSystem
self.users.wpcarro.nixos.tarascoSystem
# Disabled because it depends on an unstable FOD, which, when updated,
# breaks the build. Needs to be investigated by flokli.
self.users.flokli.keyboards.corneish_zen.firmware
];
# List of all buildable targets, for CI purposes.

View file

@ -56,11 +56,14 @@ let
# newer trunk fails somewhere within reqwest, trying to read a mystery file
trunk = stableNixpkgs.trunk;
# the big lis package change breaks everything in //3p/lisp, undo it for now.
# the big lisp package change breaks everything in //3p/lisp, undo it for now.
lispPackages = stableNixpkgs.lispPackages;
# mypaint is broken on stable (2024-09-05)
mypaint = stableNixpkgs.mypaint;
# gdmap is broken on unstable (2024-12-31)
gdmap = stableNixpkgs.gdmap;
};
# Overlay to expose the nixpkgs commits we are using to other Nix code.

View file

@ -109,6 +109,14 @@ depot.nix.readTree.drvTargets {
];
});
# https://gcc.gnu.org/gcc-14/porting_to.html#warnings-as-errors
thttpd = super.thttpd.overrideAttrs (oldAttrs: {
NIX_CFLAGS_COMPILE = oldAttrs.NIX_CFLAGS_COMPILE or [ ] ++ [
"-Wno-error=implicit-int"
"-Wno-error=implicit-function-declaration"
];
});
# https://github.com/NixOS/nixpkgs/pull/329415/files
grpc-health-check = super.rustPlatform.buildRustPackage {
pname = "grpc-health-check";

View file

@ -29,10 +29,10 @@
"homepage": "https://nix-community.github.io/home-manager/",
"owner": "nix-community",
"repo": "home-manager",
"rev": "8264bfe3a064d704c57df91e34b795b6ac7bad9e",
"sha256": "09dmq1dh7l6c8zp42phpyljf4npmpch840hm476ajmvw1441z96z",
"rev": "10e99c43cdf4a0713b4e81d90691d22c6a58bdf2",
"sha256": "1vklmr0vzhplcjcqg19v66c1swg3xcgw96ry90dyd4hl2cb9j80b",
"type": "tarball",
"url": "https://github.com/nix-community/home-manager/archive/8264bfe3a064d704c57df91e34b795b6ac7bad9e.tar.gz",
"url": "https://github.com/nix-community/home-manager/archive/10e99c43cdf4a0713b4e81d90691d22c6a58bdf2.tar.gz",
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
},
"impermanence": {
@ -77,10 +77,10 @@
"homepage": "",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "d70bd19e0a38ad4790d3913bf08fcbfc9eeca507",
"sha256": "1968wcqnb5gb947js0kv17hy15nc5817ra66nj33nc532d342ig0",
"rev": "88195a94f390381c6afcdaa933c2f6ff93959cb4",
"sha256": "1fs25csg0lq3v34jdzxr2qdvnyvylimmfh0qxlf39h4j1hclvbyj",
"type": "tarball",
"url": "https://github.com/NixOS/nixpkgs/archive/d70bd19e0a38ad4790d3913bf08fcbfc9eeca507.tar.gz",
"url": "https://github.com/NixOS/nixpkgs/archive/88195a94f390381c6afcdaa933c2f6ff93959cb4.tar.gz",
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
},
"nixpkgs-stable": {
@ -101,10 +101,10 @@
"homepage": "",
"owner": "oxalica",
"repo": "rust-overlay",
"rev": "b070e6030118680977bc2388868c4b3963872134",
"sha256": "1z15xqpmclxc1jldqy9g714fjx4rg37rv47jz9065bdw5gw1avvf",
"rev": "d199142e84bfaae476ffb4e09a70879d7918784d",
"sha256": "1bhapkiiii984m86cp1xkr8jh0i86vmbl5z3b9nzylfg0y7fij5f",
"type": "tarball",
"url": "https://github.com/oxalica/rust-overlay/archive/b070e6030118680977bc2388868c4b3963872134.tar.gz",
"url": "https://github.com/oxalica/rust-overlay/archive/d199142e84bfaae476ffb4e09a70879d7918784d.tar.gz",
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
},
"rustsec-advisory-db": {
@ -113,10 +113,10 @@
"homepage": "https://rustsec.org",
"owner": "RustSec",
"repo": "advisory-db",
"rev": "b02b7ca7c98eee7fe26ac18277040c3fc814b52d",
"sha256": "1gj23v4v3dpk6fcq9s8yylhx9wqkdgb2mhlhv66xmb9qrwv8v20p",
"rev": "3c6d3186ab06737d1defd2b5ae556d0ecd161603",
"sha256": "05cg2fhjqv4xly1g5a8dm0bc08yzzqn2is5s7c7kczib3j4gpiq5",
"type": "tarball",
"url": "https://github.com/RustSec/advisory-db/archive/b02b7ca7c98eee7fe26ac18277040c3fc814b52d.tar.gz",
"url": "https://github.com/RustSec/advisory-db/archive/3c6d3186ab06737d1defd2b5ae556d0ecd161603.tar.gz",
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
}
}

View file

@ -3,7 +3,7 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.35.2
// protoc-gen-go v1.36.0
// protoc (unknown)
// source: tvix/build/protos/build.proto
@ -60,10 +60,7 @@ const (
// support "send all BuildRequest for a nixpkgs eval to a remote builder and put
// the laptop to sleep" usecases later.
type BuildRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
state protoimpl.MessageState `protogen:"open.v1"`
// The list of all root nodes that should be visible in `inputs_dir` at the
// time of the build.
// As all references are content-addressed, no additional signatures are
@ -120,6 +117,8 @@ type BuildRequest struct {
// every input store path and output store path. The latter is necessary to scan
// for references between multi-output derivations.
RefscanNeedles []string `protobuf:"bytes,10,rep,name=refscan_needles,json=refscanNeedles,proto3" json:"refscan_needles,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *BuildRequest) Reset() {
@ -224,10 +223,7 @@ func (x *BuildRequest) GetRefscanNeedles() []string {
// A Build is (one possible) outcome of executing a [BuildRequest].
type Build struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
state protoimpl.MessageState `protogen:"open.v1"`
// The orginal build request producing the build.
BuildRequest *BuildRequest `protobuf:"bytes,1,opt,name=build_request,json=buildRequest,proto3" json:"build_request,omitempty"` // <- TODO: define hashing scheme for BuildRequest, refer to it by hash?
// The outputs that were produced after successfully building.
@ -235,6 +231,8 @@ type Build struct {
Outputs []*castore_go.Node `protobuf:"bytes,2,rep,name=outputs,proto3" json:"outputs,omitempty"`
// Contains the same number of elements as the `outputs` field.
OutputsNeedles []*Build_OutputNeedles `protobuf:"bytes,3,rep,name=outputs_needles,json=outputsNeedles,proto3" json:"outputs_needles,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *Build) Reset() {
@ -289,13 +287,12 @@ func (x *Build) GetOutputsNeedles() []*Build_OutputNeedles {
}
type BuildRequest_EnvVar struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
state protoimpl.MessageState `protogen:"open.v1"`
// name of the environment variable. Must not contain =.
Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *BuildRequest_EnvVar) Reset() {
@ -348,10 +345,7 @@ func (x *BuildRequest_EnvVar) GetValue() []byte {
// The required input paths are *not* represented in here, because it
// wouldn't be hermetic enough - see the comment around inputs too.
type BuildRequest_BuildConstraints struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
state protoimpl.MessageState `protogen:"open.v1"`
// The system that's needed to execute the build.
// Must not be empty.
System string `protobuf:"bytes,1,opt,name=system,proto3" json:"system,omitempty"`
@ -367,7 +361,9 @@ type BuildRequest_BuildConstraints struct {
// Whether the build should be able to access the network,
NetworkAccess bool `protobuf:"varint,4,opt,name=network_access,json=networkAccess,proto3" json:"network_access,omitempty"`
// Whether to provide a /bin/sh inside the build environment, usually a static bash.
ProvideBinSh bool `protobuf:"varint,5,opt,name=provide_bin_sh,json=provideBinSh,proto3" json:"provide_bin_sh,omitempty"`
ProvideBinSh bool `protobuf:"varint,5,opt,name=provide_bin_sh,json=provideBinSh,proto3" json:"provide_bin_sh,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *BuildRequest_BuildConstraints) Reset() {
@ -436,12 +432,11 @@ func (x *BuildRequest_BuildConstraints) GetProvideBinSh() bool {
}
type BuildRequest_AdditionalFile struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
state protoimpl.MessageState `protogen:"open.v1"`
Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"`
Contents []byte `protobuf:"bytes,2,opt,name=contents,proto3" json:"contents,omitempty"`
unknownFields protoimpl.UnknownFields
Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"`
Contents []byte `protobuf:"bytes,2,opt,name=contents,proto3" json:"contents,omitempty"`
sizeCache protoimpl.SizeCache
}
func (x *BuildRequest_AdditionalFile) Reset() {
@ -489,12 +484,11 @@ func (x *BuildRequest_AdditionalFile) GetContents() []byte {
}
type Build_OutputNeedles struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
state protoimpl.MessageState `protogen:"open.v1"`
// The numbers are indexing into `refscan_needles` originally specified in the BuildRequest.
Needles []uint64 `protobuf:"varint,1,rep,packed,name=needles,proto3" json:"needles,omitempty"`
Needles []uint64 `protobuf:"varint,1,rep,packed,name=needles,proto3" json:"needles,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *Build_OutputNeedles) Reset() {

View file

@ -8,7 +8,7 @@ in
(pkgs.buildGoModule {
name = "build-go";
src = depot.third_party.gitignoreSource ./.;
vendorHash = "sha256-BprOPkgyT1F6TNToCN2uSHlkCXMdmv/QK+lTvA6O/rM=";
vendorHash = "sha256:1j652an8ir1ybyj21znaipsir7mbs3v972mw27ppsjz9dgh2crx6";
}).overrideAttrs (_: {
meta.ci.extraSteps = {
check = {

View file

@ -1,19 +1,21 @@
module code.tvl.fyi/tvix/build-go
go 1.19
go 1.22
toolchain go1.23.4
require (
code.tvl.fyi/tvix/castore-go v0.0.0-20231105151352-990d6ba2175e
google.golang.org/grpc v1.51.0
google.golang.org/protobuf v1.31.0
google.golang.org/grpc v1.69.2
google.golang.org/protobuf v1.36.1
)
require (
github.com/golang/protobuf v1.5.2 // indirect
github.com/golang/protobuf v1.5.4 // indirect
github.com/klauspost/cpuid/v2 v2.0.9 // indirect
golang.org/x/net v0.0.0-20220722155237-a158d28d115b // indirect
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f // indirect
golang.org/x/text v0.4.0 // indirect
golang.org/x/net v0.30.0 // indirect
golang.org/x/sys v0.26.0 // indirect
golang.org/x/text v0.19.0 // indirect
google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013 // indirect
lukechampine.com/blake3 v1.1.7 // indirect
)

View file

@ -5,8 +5,13 @@ github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03
github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY=
github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY=
github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag=
github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE=
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=
github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
@ -17,20 +22,33 @@ github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrU
github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w=
github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0=
github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8=
github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw=
github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek=
github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps=
github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M=
github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.6 h1:BKbKCqvP6I+rmFHt06ZmyQtvB8xAkWdhFyr0ZUNZcxQ=
github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/klauspost/cpuid/v2 v2.0.9 h1:lgaqFMSdTdQYdZ04uHyN2d/eKdOMyi2YLSvlQIBFYa4=
github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk=
github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
go.opentelemetry.io/otel v1.31.0 h1:NsJcKPIW0D0H3NgzPDHmo0WW6SptzPdqg/L1zsIm2hY=
go.opentelemetry.io/otel v1.31.0/go.mod h1:O0C14Yl9FgkjqcCZAsE053C13OaddMYr/hz6clDkEJE=
go.opentelemetry.io/otel/metric v1.31.0 h1:FSErL0ATQAmYHUIzSezZibnyVlft1ybhy4ozRPcF2fE=
go.opentelemetry.io/otel/metric v1.31.0/go.mod h1:C3dEloVbLuYoX41KpmAhOqNriGbA+qqH6PQ5E5mUfnY=
go.opentelemetry.io/otel/sdk v1.31.0 h1:xLY3abVHYZ5HSfOg3l2E5LUj2Cwva5Y7yGxnSW9H5Gk=
go.opentelemetry.io/otel/sdk v1.31.0/go.mod h1:TfRbMdhvxIIr/B2N2LQW2S5v9m3gOQ/08KsbbO5BPT0=
go.opentelemetry.io/otel/sdk/metric v1.31.0 h1:i9hxxLJF/9kkvfHppyLL55aW7iIJz4JjxTeYusH7zMc=
go.opentelemetry.io/otel/sdk/metric v1.31.0/go.mod h1:CRInTMVvNhUKgSAMbKyTMxqOBC0zgyxzW55lZzX43Y8=
go.opentelemetry.io/otel/trace v1.31.0 h1:ffjsj1aRouKewfr85U2aGagJ46+MvodynlQ1HYdmJys=
go.opentelemetry.io/otel/trace v1.31.0/go.mod h1:TXZkRk7SM2ZQLtR6eoAWQFIHPvzQ06FJAsO1tJg480A=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
@ -40,25 +58,24 @@ golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73r
golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/net v0.0.0-20220722155237-a158d28d115b h1:PxfKdU9lEEDYjdIzOtC4qFWgkU2rGHdKlKowJSMN9h0=
golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
golang.org/x/net v0.30.0 h1:AcW1SDZMkb8IpzCdQUaIq2sP4sZ4zw+55h6ynffypl4=
golang.org/x/net v0.30.0/go.mod h1:2wGyMJ5iFasEhkwi13ChkO/t1ECNC4X4eBKkVFyYFlU=
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f h1:v4INt8xihDGvnrfjMDVXGxw9wrfxYyCjk0KbXjhR55s=
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.26.0 h1:KHjCJyddX0LoSTb3J+vWpupP9p0oznkqVk/IfjymZbo=
golang.org/x/sys v0.26.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.4.0 h1:BrVqGRd7+k1DiOgtnFvAkoQEWQvBc25ouMJM6429SFg=
golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
golang.org/x/text v0.19.0 h1:kTxAhCbGbxhK0IwgSKiMO5awPoDQ0RpfiVYBfK860YM=
golang.org/x/text v0.19.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY=
golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY=
golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE=
google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM=
google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc=
@ -68,8 +85,8 @@ google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEY
google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg=
google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk=
google.golang.org/grpc v1.51.0 h1:E1eGv1FTqoLIdnBCZufiSHgKjlqG6fKFf6pPWtMTh8U=
google.golang.org/grpc v1.51.0/go.mod h1:wgNDFcnuBGmxLKI/qn4T+m5BtEBYXJPvibbUPsAIPww=
google.golang.org/grpc v1.69.2 h1:U3S9QEtbXC0bYNvRtcoklF3xGtLViumSYxWykJS+7AU=
google.golang.org/grpc v1.69.2/go.mod h1:vyjdE6jLBI76dgpDojsFGNaHlxdjXN9ghpnd2o7JGZ4=
google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8=
google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0=
google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM=
@ -77,11 +94,10 @@ google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miE
google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo=
google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8=
google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
google.golang.org/protobuf v1.36.1 h1:yBPeRvTftaleIgM3PZ/WBIZ7XM/eEYAaEyCwvyjq/gk=
google.golang.org/protobuf v1.36.1/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
lukechampine.com/blake3 v1.1.7 h1:GgRMhmdsuK8+ii6UZFDL8Nb+VyMwadAgcJyfYHxG6n0=

View file

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

View file

@ -3,7 +3,7 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.3.0
// - protoc-gen-go-grpc v1.5.1
// - protoc (unknown)
// source: tvix/build/protos/rpc_build.proto
@ -18,8 +18,8 @@ import (
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.32.0 or later.
const _ = grpc.SupportPackageIsVersion7
// Requires gRPC-Go v1.64.0 or later.
const _ = grpc.SupportPackageIsVersion9
const (
BuildService_DoBuild_FullMethodName = "/tvix.build.v1.BuildService/DoBuild"
@ -41,8 +41,9 @@ func NewBuildServiceClient(cc grpc.ClientConnInterface) BuildServiceClient {
}
func (c *buildServiceClient) DoBuild(ctx context.Context, in *BuildRequest, opts ...grpc.CallOption) (*Build, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(Build)
err := c.cc.Invoke(ctx, BuildService_DoBuild_FullMethodName, in, out, opts...)
err := c.cc.Invoke(ctx, BuildService_DoBuild_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
@ -51,20 +52,24 @@ func (c *buildServiceClient) DoBuild(ctx context.Context, in *BuildRequest, opts
// BuildServiceServer is the server API for BuildService service.
// All implementations must embed UnimplementedBuildServiceServer
// for forward compatibility
// for forward compatibility.
type BuildServiceServer interface {
DoBuild(context.Context, *BuildRequest) (*Build, error)
mustEmbedUnimplementedBuildServiceServer()
}
// UnimplementedBuildServiceServer must be embedded to have forward compatible implementations.
type UnimplementedBuildServiceServer struct {
}
// UnimplementedBuildServiceServer must be embedded to have
// forward compatible implementations.
//
// NOTE: this should be embedded by value instead of pointer to avoid a nil
// pointer dereference when methods are called.
type UnimplementedBuildServiceServer struct{}
func (UnimplementedBuildServiceServer) DoBuild(context.Context, *BuildRequest) (*Build, error) {
return nil, status.Errorf(codes.Unimplemented, "method DoBuild not implemented")
}
func (UnimplementedBuildServiceServer) mustEmbedUnimplementedBuildServiceServer() {}
func (UnimplementedBuildServiceServer) testEmbeddedByValue() {}
// UnsafeBuildServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to BuildServiceServer will
@ -74,6 +79,13 @@ type UnsafeBuildServiceServer interface {
}
func RegisterBuildServiceServer(s grpc.ServiceRegistrar, srv BuildServiceServer) {
// If the following call pancis, it indicates UnimplementedBuildServiceServer was
// embedded by pointer and is nil. This will cause panics if an
// unimplemented method is ever invoked, so we test this at initialization
// time to prevent it from happening at runtime later due to I/O.
if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
t.testEmbeddedByValue()
}
s.RegisterService(&BuildService_ServiceDesc, srv)
}

View file

@ -3,7 +3,7 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.35.2
// protoc-gen-go v1.36.0
// protoc (unknown)
// source: tvix/castore/protos/castore.proto
@ -34,13 +34,12 @@ const (
// Elements in each list need to be lexicographically ordered by the name
// attribute.
type Directory struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
state protoimpl.MessageState `protogen:"open.v1"`
Directories []*DirectoryNode `protobuf:"bytes,1,rep,name=directories,proto3" json:"directories,omitempty"`
Files []*FileNode `protobuf:"bytes,2,rep,name=files,proto3" json:"files,omitempty"`
Symlinks []*SymlinkNode `protobuf:"bytes,3,rep,name=symlinks,proto3" json:"symlinks,omitempty"`
unknownFields protoimpl.UnknownFields
Directories []*DirectoryNode `protobuf:"bytes,1,rep,name=directories,proto3" json:"directories,omitempty"`
Files []*FileNode `protobuf:"bytes,2,rep,name=files,proto3" json:"files,omitempty"`
Symlinks []*SymlinkNode `protobuf:"bytes,3,rep,name=symlinks,proto3" json:"symlinks,omitempty"`
sizeCache protoimpl.SizeCache
}
func (x *Directory) Reset() {
@ -96,10 +95,7 @@ func (x *Directory) GetSymlinks() []*SymlinkNode {
// A DirectoryNode represents a directory in a Directory.
type DirectoryNode struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
state protoimpl.MessageState `protogen:"open.v1"`
// The (base)name of the directory
Name []byte `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// The blake3 hash of a Directory message, serialized in protobuf canonical form.
@ -114,7 +110,9 @@ type DirectoryNode struct {
// A credulous implementation won't reject an excessive size, but this is
// harmless: you'll have some ordinals without nodes. Undersizing is obvious
// 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"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *DirectoryNode) Reset() {
@ -170,10 +168,7 @@ func (x *DirectoryNode) GetSize() uint64 {
// A FileNode represents a regular or executable file in a Directory.
type FileNode struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
state protoimpl.MessageState `protogen:"open.v1"`
// The (base)name of the file
Name []byte `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// The blake3 digest of the file contents
@ -181,7 +176,9 @@ type FileNode struct {
// The file content size
Size uint64 `protobuf:"varint,3,opt,name=size,proto3" json:"size,omitempty"`
// Whether the file is executable
Executable bool `protobuf:"varint,4,opt,name=executable,proto3" json:"executable,omitempty"`
Executable bool `protobuf:"varint,4,opt,name=executable,proto3" json:"executable,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *FileNode) Reset() {
@ -244,14 +241,13 @@ func (x *FileNode) GetExecutable() bool {
// A SymlinkNode represents a symbolic link in a Directory.
type SymlinkNode struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
state protoimpl.MessageState `protogen:"open.v1"`
// The (base)name of the symlink
Name []byte `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// The target of the symlink.
Target []byte `protobuf:"bytes,2,opt,name=target,proto3" json:"target,omitempty"`
Target []byte `protobuf:"bytes,2,opt,name=target,proto3" json:"target,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *SymlinkNode) Reset() {
@ -300,16 +296,15 @@ func (x *SymlinkNode) GetTarget() []byte {
// A Node is either a DirectoryNode, FileNode or SymlinkNode.
type Node struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Types that are assignable to Node:
state protoimpl.MessageState `protogen:"open.v1"`
// Types that are valid to be assigned to Node:
//
// *Node_Directory
// *Node_File
// *Node_Symlink
Node isNode_Node `protobuf_oneof:"node"`
Node isNode_Node `protobuf_oneof:"node"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *Node) Reset() {
@ -342,30 +337,36 @@ func (*Node) Descriptor() ([]byte, []int) {
return file_tvix_castore_protos_castore_proto_rawDescGZIP(), []int{4}
}
func (m *Node) GetNode() isNode_Node {
if m != nil {
return m.Node
func (x *Node) GetNode() isNode_Node {
if x != nil {
return x.Node
}
return nil
}
func (x *Node) GetDirectory() *DirectoryNode {
if x, ok := x.GetNode().(*Node_Directory); ok {
return x.Directory
if x != nil {
if x, ok := x.Node.(*Node_Directory); ok {
return x.Directory
}
}
return nil
}
func (x *Node) GetFile() *FileNode {
if x, ok := x.GetNode().(*Node_File); ok {
return x.File
if x != nil {
if x, ok := x.Node.(*Node_File); ok {
return x.File
}
}
return nil
}
func (x *Node) GetSymlink() *SymlinkNode {
if x, ok := x.GetNode().(*Node_Symlink); ok {
return x.Symlink
if x != nil {
if x, ok := x.Node.(*Node_Symlink); ok {
return x.Symlink
}
}
return nil
}

View file

@ -8,7 +8,7 @@ in
(pkgs.buildGoModule {
name = "castore-go";
src = depot.third_party.gitignoreSource ./.;
vendorHash = "sha256-ZNtSSW+oCxMsBtURSrea9/GyUHDagtGefM+Ii+VkgCA=";
vendorHash = "sha256:03wwzk7irlb05y0zjfmpp5c2dxhcpnmfc169g05sn6d3ni07aly8";
}).overrideAttrs (_: {
meta.ci.extraSteps = {
check = {

View file

@ -1,22 +1,24 @@
module code.tvl.fyi/tvix/castore-go
go 1.19
go 1.22
toolchain go1.23.4
require (
github.com/stretchr/testify v1.8.1
google.golang.org/grpc v1.51.0
google.golang.org/protobuf v1.31.0
google.golang.org/grpc v1.69.2
google.golang.org/protobuf v1.36.1
lukechampine.com/blake3 v1.1.7
)
require (
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/golang/protobuf v1.5.4 // indirect
github.com/klauspost/cpuid/v2 v2.0.9 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
golang.org/x/net v0.0.0-20220722155237-a158d28d115b // indirect
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f // indirect
golang.org/x/text v0.4.0 // indirect
golang.org/x/net v0.30.0 // indirect
golang.org/x/sys v0.26.0 // indirect
golang.org/x/text v0.19.0 // indirect
google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)

View file

@ -7,6 +7,10 @@ github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY=
github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY=
github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag=
github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE=
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=
github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
@ -17,15 +21,16 @@ github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrU
github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w=
github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0=
github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8=
github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw=
github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek=
github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps=
github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M=
github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.6 h1:BKbKCqvP6I+rmFHt06ZmyQtvB8xAkWdhFyr0ZUNZcxQ=
github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/klauspost/cpuid/v2 v2.0.9 h1:lgaqFMSdTdQYdZ04uHyN2d/eKdOMyi2YLSvlQIBFYa4=
github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
@ -38,6 +43,16 @@ github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk=
github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
go.opentelemetry.io/otel v1.31.0 h1:NsJcKPIW0D0H3NgzPDHmo0WW6SptzPdqg/L1zsIm2hY=
go.opentelemetry.io/otel v1.31.0/go.mod h1:O0C14Yl9FgkjqcCZAsE053C13OaddMYr/hz6clDkEJE=
go.opentelemetry.io/otel/metric v1.31.0 h1:FSErL0ATQAmYHUIzSezZibnyVlft1ybhy4ozRPcF2fE=
go.opentelemetry.io/otel/metric v1.31.0/go.mod h1:C3dEloVbLuYoX41KpmAhOqNriGbA+qqH6PQ5E5mUfnY=
go.opentelemetry.io/otel/sdk v1.31.0 h1:xLY3abVHYZ5HSfOg3l2E5LUj2Cwva5Y7yGxnSW9H5Gk=
go.opentelemetry.io/otel/sdk v1.31.0/go.mod h1:TfRbMdhvxIIr/B2N2LQW2S5v9m3gOQ/08KsbbO5BPT0=
go.opentelemetry.io/otel/sdk/metric v1.31.0 h1:i9hxxLJF/9kkvfHppyLL55aW7iIJz4JjxTeYusH7zMc=
go.opentelemetry.io/otel/sdk/metric v1.31.0/go.mod h1:CRInTMVvNhUKgSAMbKyTMxqOBC0zgyxzW55lZzX43Y8=
go.opentelemetry.io/otel/trace v1.31.0 h1:ffjsj1aRouKewfr85U2aGagJ46+MvodynlQ1HYdmJys=
go.opentelemetry.io/otel/trace v1.31.0/go.mod h1:TXZkRk7SM2ZQLtR6eoAWQFIHPvzQ06FJAsO1tJg480A=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
@ -47,25 +62,24 @@ golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73r
golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/net v0.0.0-20220722155237-a158d28d115b h1:PxfKdU9lEEDYjdIzOtC4qFWgkU2rGHdKlKowJSMN9h0=
golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
golang.org/x/net v0.30.0 h1:AcW1SDZMkb8IpzCdQUaIq2sP4sZ4zw+55h6ynffypl4=
golang.org/x/net v0.30.0/go.mod h1:2wGyMJ5iFasEhkwi13ChkO/t1ECNC4X4eBKkVFyYFlU=
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f h1:v4INt8xihDGvnrfjMDVXGxw9wrfxYyCjk0KbXjhR55s=
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.26.0 h1:KHjCJyddX0LoSTb3J+vWpupP9p0oznkqVk/IfjymZbo=
golang.org/x/sys v0.26.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.4.0 h1:BrVqGRd7+k1DiOgtnFvAkoQEWQvBc25ouMJM6429SFg=
golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
golang.org/x/text v0.19.0 h1:kTxAhCbGbxhK0IwgSKiMO5awPoDQ0RpfiVYBfK860YM=
golang.org/x/text v0.19.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY=
golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY=
golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE=
google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM=
google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc=
@ -75,8 +89,8 @@ google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEY
google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg=
google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk=
google.golang.org/grpc v1.51.0 h1:E1eGv1FTqoLIdnBCZufiSHgKjlqG6fKFf6pPWtMTh8U=
google.golang.org/grpc v1.51.0/go.mod h1:wgNDFcnuBGmxLKI/qn4T+m5BtEBYXJPvibbUPsAIPww=
google.golang.org/grpc v1.69.2 h1:U3S9QEtbXC0bYNvRtcoklF3xGtLViumSYxWykJS+7AU=
google.golang.org/grpc v1.69.2/go.mod h1:vyjdE6jLBI76dgpDojsFGNaHlxdjXN9ghpnd2o7JGZ4=
google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8=
google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0=
google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM=
@ -84,10 +98,8 @@ google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miE
google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo=
google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8=
google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
google.golang.org/protobuf v1.36.1 h1:yBPeRvTftaleIgM3PZ/WBIZ7XM/eEYAaEyCwvyjq/gk=
google.golang.org/protobuf v1.36.1/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=

View file

@ -3,7 +3,7 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.35.2
// protoc-gen-go v1.36.0
// protoc (unknown)
// source: tvix/castore/protos/rpc_blobstore.proto
@ -24,16 +24,15 @@ const (
)
type StatBlobRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
state protoimpl.MessageState `protogen:"open.v1"`
// The blake3 digest of the blob requested
Digest []byte `protobuf:"bytes,1,opt,name=digest,proto3" json:"digest,omitempty"`
// Whether the server should reply with a list of more granular chunks.
SendChunks bool `protobuf:"varint,2,opt,name=send_chunks,json=sendChunks,proto3" json:"send_chunks,omitempty"`
// Whether the server should reply with a bao.
SendBao bool `protobuf:"varint,3,opt,name=send_bao,json=sendBao,proto3" json:"send_bao,omitempty"`
SendBao bool `protobuf:"varint,3,opt,name=send_bao,json=sendBao,proto3" json:"send_bao,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *StatBlobRequest) Reset() {
@ -88,17 +87,16 @@ func (x *StatBlobRequest) GetSendBao() bool {
}
type StatBlobResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
state protoimpl.MessageState `protogen:"open.v1"`
// If `send_chunks` was set to true, this MAY contain a list of more
// granular chunks, which then may be read individually via the `Read`
// method.
Chunks []*StatBlobResponse_ChunkMeta `protobuf:"bytes,2,rep,name=chunks,proto3" json:"chunks,omitempty"`
// If `send_bao` was set to true, this MAY contain a outboard bao.
// The exact format and message types here will still be fleshed out.
Bao []byte `protobuf:"bytes,3,opt,name=bao,proto3" json:"bao,omitempty"`
Bao []byte `protobuf:"bytes,3,opt,name=bao,proto3" json:"bao,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *StatBlobResponse) Reset() {
@ -146,12 +144,11 @@ func (x *StatBlobResponse) GetBao() []byte {
}
type ReadBlobRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
state protoimpl.MessageState `protogen:"open.v1"`
// The blake3 digest of the blob or chunk requested
Digest []byte `protobuf:"bytes,1,opt,name=digest,proto3" json:"digest,omitempty"`
Digest []byte `protobuf:"bytes,1,opt,name=digest,proto3" json:"digest,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *ReadBlobRequest) Reset() {
@ -194,11 +191,10 @@ func (x *ReadBlobRequest) GetDigest() []byte {
// This represents some bytes of a blob.
// Blobs are sent in smaller chunks to keep message sizes manageable.
type BlobChunk struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
state protoimpl.MessageState `protogen:"open.v1"`
Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"`
unknownFields protoimpl.UnknownFields
Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"`
sizeCache protoimpl.SizeCache
}
func (x *BlobChunk) Reset() {
@ -239,12 +235,11 @@ func (x *BlobChunk) GetData() []byte {
}
type PutBlobResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
state protoimpl.MessageState `protogen:"open.v1"`
// The blake3 digest of the data that was sent.
Digest []byte `protobuf:"bytes,1,opt,name=digest,proto3" json:"digest,omitempty"`
Digest []byte `protobuf:"bytes,1,opt,name=digest,proto3" json:"digest,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *PutBlobResponse) Reset() {
@ -285,14 +280,13 @@ func (x *PutBlobResponse) GetDigest() []byte {
}
type StatBlobResponse_ChunkMeta struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
state protoimpl.MessageState `protogen:"open.v1"`
// Digest of that specific chunk
Digest []byte `protobuf:"bytes,1,opt,name=digest,proto3" json:"digest,omitempty"`
// Length of that chunk, in bytes.
Size uint64 `protobuf:"varint,2,opt,name=size,proto3" json:"size,omitempty"`
Size uint64 `protobuf:"varint,2,opt,name=size,proto3" json:"size,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *StatBlobResponse_ChunkMeta) Reset() {

View file

@ -3,7 +3,7 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.3.0
// - protoc-gen-go-grpc v1.5.1
// - protoc (unknown)
// source: tvix/castore/protos/rpc_blobstore.proto
@ -18,8 +18,8 @@ import (
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.32.0 or later.
const _ = grpc.SupportPackageIsVersion7
// Requires gRPC-Go v1.64.0 or later.
const _ = grpc.SupportPackageIsVersion9
const (
BlobService_Stat_FullMethodName = "/tvix.castore.v1.BlobService/Stat"
@ -30,6 +30,11 @@ const (
// BlobServiceClient is the client API for BlobService service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
//
// BlobService allows reading (or uploading) content-addressed blobs of data.
// BLAKE3 is used as a hashing function for the data. Uploading a blob will
// return the BLAKE3 digest of it, and that's the identifier used to Read/Stat
// them too.
type BlobServiceClient interface {
// Stat can be used to check for the existence of a blob, as well as
// gathering more data about it, like more granular chunking information
@ -47,13 +52,13 @@ type BlobServiceClient interface {
// The server may decide on whatever chunking it may seem fit as a size for
// the individual BlobChunk sent in the response stream, this is mostly to
// keep individual messages at a manageable size.
Read(ctx context.Context, in *ReadBlobRequest, opts ...grpc.CallOption) (BlobService_ReadClient, error)
Read(ctx context.Context, in *ReadBlobRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[BlobChunk], error)
// Put uploads a Blob, by reading a stream of bytes.
//
// The way the data is chunked up in individual BlobChunk messages sent in
// the stream has no effect on how the server ends up chunking blobs up, if
// it does at all.
Put(ctx context.Context, opts ...grpc.CallOption) (BlobService_PutClient, error)
Put(ctx context.Context, opts ...grpc.CallOption) (grpc.ClientStreamingClient[BlobChunk, PutBlobResponse], error)
}
type blobServiceClient struct {
@ -65,20 +70,22 @@ func NewBlobServiceClient(cc grpc.ClientConnInterface) BlobServiceClient {
}
func (c *blobServiceClient) Stat(ctx context.Context, in *StatBlobRequest, opts ...grpc.CallOption) (*StatBlobResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(StatBlobResponse)
err := c.cc.Invoke(ctx, BlobService_Stat_FullMethodName, in, out, opts...)
err := c.cc.Invoke(ctx, BlobService_Stat_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *blobServiceClient) Read(ctx context.Context, in *ReadBlobRequest, opts ...grpc.CallOption) (BlobService_ReadClient, error) {
stream, err := c.cc.NewStream(ctx, &BlobService_ServiceDesc.Streams[0], BlobService_Read_FullMethodName, opts...)
func (c *blobServiceClient) Read(ctx context.Context, in *ReadBlobRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[BlobChunk], error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
stream, err := c.cc.NewStream(ctx, &BlobService_ServiceDesc.Streams[0], BlobService_Read_FullMethodName, cOpts...)
if err != nil {
return nil, err
}
x := &blobServiceReadClient{stream}
x := &grpc.GenericClientStream[ReadBlobRequest, BlobChunk]{ClientStream: stream}
if err := x.ClientStream.SendMsg(in); err != nil {
return nil, err
}
@ -88,60 +95,30 @@ func (c *blobServiceClient) Read(ctx context.Context, in *ReadBlobRequest, opts
return x, nil
}
type BlobService_ReadClient interface {
Recv() (*BlobChunk, error)
grpc.ClientStream
}
// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type BlobService_ReadClient = grpc.ServerStreamingClient[BlobChunk]
type blobServiceReadClient struct {
grpc.ClientStream
}
func (x *blobServiceReadClient) Recv() (*BlobChunk, error) {
m := new(BlobChunk)
if err := x.ClientStream.RecvMsg(m); err != nil {
return nil, err
}
return m, nil
}
func (c *blobServiceClient) Put(ctx context.Context, opts ...grpc.CallOption) (BlobService_PutClient, error) {
stream, err := c.cc.NewStream(ctx, &BlobService_ServiceDesc.Streams[1], BlobService_Put_FullMethodName, opts...)
func (c *blobServiceClient) Put(ctx context.Context, opts ...grpc.CallOption) (grpc.ClientStreamingClient[BlobChunk, PutBlobResponse], error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
stream, err := c.cc.NewStream(ctx, &BlobService_ServiceDesc.Streams[1], BlobService_Put_FullMethodName, cOpts...)
if err != nil {
return nil, err
}
x := &blobServicePutClient{stream}
x := &grpc.GenericClientStream[BlobChunk, PutBlobResponse]{ClientStream: stream}
return x, nil
}
type BlobService_PutClient interface {
Send(*BlobChunk) error
CloseAndRecv() (*PutBlobResponse, error)
grpc.ClientStream
}
type blobServicePutClient struct {
grpc.ClientStream
}
func (x *blobServicePutClient) Send(m *BlobChunk) error {
return x.ClientStream.SendMsg(m)
}
func (x *blobServicePutClient) CloseAndRecv() (*PutBlobResponse, error) {
if err := x.ClientStream.CloseSend(); err != nil {
return nil, err
}
m := new(PutBlobResponse)
if err := x.ClientStream.RecvMsg(m); err != nil {
return nil, err
}
return m, nil
}
// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type BlobService_PutClient = grpc.ClientStreamingClient[BlobChunk, PutBlobResponse]
// BlobServiceServer is the server API for BlobService service.
// All implementations must embed UnimplementedBlobServiceServer
// for forward compatibility
// for forward compatibility.
//
// BlobService allows reading (or uploading) content-addressed blobs of data.
// BLAKE3 is used as a hashing function for the data. Uploading a blob will
// return the BLAKE3 digest of it, and that's the identifier used to Read/Stat
// them too.
type BlobServiceServer interface {
// Stat can be used to check for the existence of a blob, as well as
// gathering more data about it, like more granular chunking information
@ -159,30 +136,34 @@ type BlobServiceServer interface {
// The server may decide on whatever chunking it may seem fit as a size for
// the individual BlobChunk sent in the response stream, this is mostly to
// keep individual messages at a manageable size.
Read(*ReadBlobRequest, BlobService_ReadServer) error
Read(*ReadBlobRequest, grpc.ServerStreamingServer[BlobChunk]) error
// Put uploads a Blob, by reading a stream of bytes.
//
// The way the data is chunked up in individual BlobChunk messages sent in
// the stream has no effect on how the server ends up chunking blobs up, if
// it does at all.
Put(BlobService_PutServer) error
Put(grpc.ClientStreamingServer[BlobChunk, PutBlobResponse]) error
mustEmbedUnimplementedBlobServiceServer()
}
// UnimplementedBlobServiceServer must be embedded to have forward compatible implementations.
type UnimplementedBlobServiceServer struct {
}
// UnimplementedBlobServiceServer must be embedded to have
// forward compatible implementations.
//
// NOTE: this should be embedded by value instead of pointer to avoid a nil
// pointer dereference when methods are called.
type UnimplementedBlobServiceServer struct{}
func (UnimplementedBlobServiceServer) Stat(context.Context, *StatBlobRequest) (*StatBlobResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Stat not implemented")
}
func (UnimplementedBlobServiceServer) Read(*ReadBlobRequest, BlobService_ReadServer) error {
func (UnimplementedBlobServiceServer) Read(*ReadBlobRequest, grpc.ServerStreamingServer[BlobChunk]) error {
return status.Errorf(codes.Unimplemented, "method Read not implemented")
}
func (UnimplementedBlobServiceServer) Put(BlobService_PutServer) error {
func (UnimplementedBlobServiceServer) Put(grpc.ClientStreamingServer[BlobChunk, PutBlobResponse]) error {
return status.Errorf(codes.Unimplemented, "method Put not implemented")
}
func (UnimplementedBlobServiceServer) mustEmbedUnimplementedBlobServiceServer() {}
func (UnimplementedBlobServiceServer) testEmbeddedByValue() {}
// UnsafeBlobServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to BlobServiceServer will
@ -192,6 +173,13 @@ type UnsafeBlobServiceServer interface {
}
func RegisterBlobServiceServer(s grpc.ServiceRegistrar, srv BlobServiceServer) {
// If the following call pancis, it indicates UnimplementedBlobServiceServer was
// embedded by pointer and is nil. This will cause panics if an
// unimplemented method is ever invoked, so we test this at initialization
// time to prevent it from happening at runtime later due to I/O.
if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
t.testEmbeddedByValue()
}
s.RegisterService(&BlobService_ServiceDesc, srv)
}
@ -218,47 +206,18 @@ func _BlobService_Read_Handler(srv interface{}, stream grpc.ServerStream) error
if err := stream.RecvMsg(m); err != nil {
return err
}
return srv.(BlobServiceServer).Read(m, &blobServiceReadServer{stream})
return srv.(BlobServiceServer).Read(m, &grpc.GenericServerStream[ReadBlobRequest, BlobChunk]{ServerStream: stream})
}
type BlobService_ReadServer interface {
Send(*BlobChunk) error
grpc.ServerStream
}
type blobServiceReadServer struct {
grpc.ServerStream
}
func (x *blobServiceReadServer) Send(m *BlobChunk) error {
return x.ServerStream.SendMsg(m)
}
// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type BlobService_ReadServer = grpc.ServerStreamingServer[BlobChunk]
func _BlobService_Put_Handler(srv interface{}, stream grpc.ServerStream) error {
return srv.(BlobServiceServer).Put(&blobServicePutServer{stream})
return srv.(BlobServiceServer).Put(&grpc.GenericServerStream[BlobChunk, PutBlobResponse]{ServerStream: stream})
}
type BlobService_PutServer interface {
SendAndClose(*PutBlobResponse) error
Recv() (*BlobChunk, error)
grpc.ServerStream
}
type blobServicePutServer struct {
grpc.ServerStream
}
func (x *blobServicePutServer) SendAndClose(m *PutBlobResponse) error {
return x.ServerStream.SendMsg(m)
}
func (x *blobServicePutServer) Recv() (*BlobChunk, error) {
m := new(BlobChunk)
if err := x.ServerStream.RecvMsg(m); err != nil {
return nil, err
}
return m, nil
}
// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type BlobService_PutServer = grpc.ClientStreamingServer[BlobChunk, PutBlobResponse]
// BlobService_ServiceDesc is the grpc.ServiceDesc for BlobService service.
// It's only intended for direct use with grpc.RegisterService,

View file

@ -3,7 +3,7 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.35.2
// protoc-gen-go v1.36.0
// protoc (unknown)
// source: tvix/castore/protos/rpc_directory.proto
@ -24,11 +24,8 @@ const (
)
type GetDirectoryRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Types that are assignable to ByWhat:
state protoimpl.MessageState `protogen:"open.v1"`
// Types that are valid to be assigned to ByWhat:
//
// *GetDirectoryRequest_Digest
ByWhat isGetDirectoryRequest_ByWhat `protobuf_oneof:"by_what"`
@ -36,7 +33,9 @@ type GetDirectoryRequest struct {
// Directory messages SHOULD be streamed in a recursive breadth-first walk,
// but other orders are also fine, as long as Directory messages are only
// sent after they are referred to from previously sent Directory messages.
Recursive bool `protobuf:"varint,2,opt,name=recursive,proto3" json:"recursive,omitempty"`
Recursive bool `protobuf:"varint,2,opt,name=recursive,proto3" json:"recursive,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *GetDirectoryRequest) Reset() {
@ -69,16 +68,18 @@ func (*GetDirectoryRequest) Descriptor() ([]byte, []int) {
return file_tvix_castore_protos_rpc_directory_proto_rawDescGZIP(), []int{0}
}
func (m *GetDirectoryRequest) GetByWhat() isGetDirectoryRequest_ByWhat {
if m != nil {
return m.ByWhat
func (x *GetDirectoryRequest) GetByWhat() isGetDirectoryRequest_ByWhat {
if x != nil {
return x.ByWhat
}
return nil
}
func (x *GetDirectoryRequest) GetDigest() []byte {
if x, ok := x.GetByWhat().(*GetDirectoryRequest_Digest); ok {
return x.Digest
if x != nil {
if x, ok := x.ByWhat.(*GetDirectoryRequest_Digest); ok {
return x.Digest
}
}
return nil
}
@ -104,11 +105,10 @@ type GetDirectoryRequest_Digest struct {
func (*GetDirectoryRequest_Digest) isGetDirectoryRequest_ByWhat() {}
type PutDirectoryResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
state protoimpl.MessageState `protogen:"open.v1"`
RootDigest []byte `protobuf:"bytes,1,opt,name=root_digest,json=rootDigest,proto3" json:"root_digest,omitempty"`
unknownFields protoimpl.UnknownFields
RootDigest []byte `protobuf:"bytes,1,opt,name=root_digest,json=rootDigest,proto3" json:"root_digest,omitempty"`
sizeCache protoimpl.SizeCache
}
func (x *PutDirectoryResponse) Reset() {

View file

@ -3,7 +3,7 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.3.0
// - protoc-gen-go-grpc v1.5.1
// - protoc (unknown)
// source: tvix/castore/protos/rpc_directory.proto
@ -18,8 +18,8 @@ import (
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.32.0 or later.
const _ = grpc.SupportPackageIsVersion7
// Requires gRPC-Go v1.64.0 or later.
const _ = grpc.SupportPackageIsVersion9
const (
DirectoryService_Get_FullMethodName = "/tvix.castore.v1.DirectoryService/Get"
@ -40,7 +40,7 @@ type DirectoryServiceClient interface {
// Directory digests that are at the "root", aka the last element that's
// sent in a Put. This makes sense for implementations bundling closures of
// directories together in batches.
Get(ctx context.Context, in *GetDirectoryRequest, opts ...grpc.CallOption) (DirectoryService_GetClient, error)
Get(ctx context.Context, in *GetDirectoryRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[Directory], error)
// Put uploads a graph of Directory messages.
// Individual Directory messages need to be send in an order walking up
// from the leaves to the root - a Directory message can only refer to
@ -50,7 +50,7 @@ type DirectoryServiceClient interface {
// so sending subsequent ones can be omitted.
// We might add a separate method, allowing to send partial graphs at a later
// time, if requiring to send the full graph turns out to be a problem.
Put(ctx context.Context, opts ...grpc.CallOption) (DirectoryService_PutClient, error)
Put(ctx context.Context, opts ...grpc.CallOption) (grpc.ClientStreamingClient[Directory, PutDirectoryResponse], error)
}
type directoryServiceClient struct {
@ -61,12 +61,13 @@ func NewDirectoryServiceClient(cc grpc.ClientConnInterface) DirectoryServiceClie
return &directoryServiceClient{cc}
}
func (c *directoryServiceClient) Get(ctx context.Context, in *GetDirectoryRequest, opts ...grpc.CallOption) (DirectoryService_GetClient, error) {
stream, err := c.cc.NewStream(ctx, &DirectoryService_ServiceDesc.Streams[0], DirectoryService_Get_FullMethodName, opts...)
func (c *directoryServiceClient) Get(ctx context.Context, in *GetDirectoryRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[Directory], error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
stream, err := c.cc.NewStream(ctx, &DirectoryService_ServiceDesc.Streams[0], DirectoryService_Get_FullMethodName, cOpts...)
if err != nil {
return nil, err
}
x := &directoryServiceGetClient{stream}
x := &grpc.GenericClientStream[GetDirectoryRequest, Directory]{ClientStream: stream}
if err := x.ClientStream.SendMsg(in); err != nil {
return nil, err
}
@ -76,60 +77,25 @@ func (c *directoryServiceClient) Get(ctx context.Context, in *GetDirectoryReques
return x, nil
}
type DirectoryService_GetClient interface {
Recv() (*Directory, error)
grpc.ClientStream
}
// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type DirectoryService_GetClient = grpc.ServerStreamingClient[Directory]
type directoryServiceGetClient struct {
grpc.ClientStream
}
func (x *directoryServiceGetClient) Recv() (*Directory, error) {
m := new(Directory)
if err := x.ClientStream.RecvMsg(m); err != nil {
return nil, err
}
return m, nil
}
func (c *directoryServiceClient) Put(ctx context.Context, opts ...grpc.CallOption) (DirectoryService_PutClient, error) {
stream, err := c.cc.NewStream(ctx, &DirectoryService_ServiceDesc.Streams[1], DirectoryService_Put_FullMethodName, opts...)
func (c *directoryServiceClient) Put(ctx context.Context, opts ...grpc.CallOption) (grpc.ClientStreamingClient[Directory, PutDirectoryResponse], error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
stream, err := c.cc.NewStream(ctx, &DirectoryService_ServiceDesc.Streams[1], DirectoryService_Put_FullMethodName, cOpts...)
if err != nil {
return nil, err
}
x := &directoryServicePutClient{stream}
x := &grpc.GenericClientStream[Directory, PutDirectoryResponse]{ClientStream: stream}
return x, nil
}
type DirectoryService_PutClient interface {
Send(*Directory) error
CloseAndRecv() (*PutDirectoryResponse, error)
grpc.ClientStream
}
type directoryServicePutClient struct {
grpc.ClientStream
}
func (x *directoryServicePutClient) Send(m *Directory) error {
return x.ClientStream.SendMsg(m)
}
func (x *directoryServicePutClient) CloseAndRecv() (*PutDirectoryResponse, error) {
if err := x.ClientStream.CloseSend(); err != nil {
return nil, err
}
m := new(PutDirectoryResponse)
if err := x.ClientStream.RecvMsg(m); err != nil {
return nil, err
}
return m, nil
}
// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type DirectoryService_PutClient = grpc.ClientStreamingClient[Directory, PutDirectoryResponse]
// DirectoryServiceServer is the server API for DirectoryService service.
// All implementations must embed UnimplementedDirectoryServiceServer
// for forward compatibility
// for forward compatibility.
type DirectoryServiceServer interface {
// Get retrieves a stream of Directory messages, by using the lookup
// parameters in GetDirectoryRequest.
@ -141,7 +107,7 @@ type DirectoryServiceServer interface {
// Directory digests that are at the "root", aka the last element that's
// sent in a Put. This makes sense for implementations bundling closures of
// directories together in batches.
Get(*GetDirectoryRequest, DirectoryService_GetServer) error
Get(*GetDirectoryRequest, grpc.ServerStreamingServer[Directory]) error
// Put uploads a graph of Directory messages.
// Individual Directory messages need to be send in an order walking up
// from the leaves to the root - a Directory message can only refer to
@ -151,21 +117,25 @@ type DirectoryServiceServer interface {
// so sending subsequent ones can be omitted.
// We might add a separate method, allowing to send partial graphs at a later
// time, if requiring to send the full graph turns out to be a problem.
Put(DirectoryService_PutServer) error
Put(grpc.ClientStreamingServer[Directory, PutDirectoryResponse]) error
mustEmbedUnimplementedDirectoryServiceServer()
}
// UnimplementedDirectoryServiceServer must be embedded to have forward compatible implementations.
type UnimplementedDirectoryServiceServer struct {
}
// UnimplementedDirectoryServiceServer must be embedded to have
// forward compatible implementations.
//
// NOTE: this should be embedded by value instead of pointer to avoid a nil
// pointer dereference when methods are called.
type UnimplementedDirectoryServiceServer struct{}
func (UnimplementedDirectoryServiceServer) Get(*GetDirectoryRequest, DirectoryService_GetServer) error {
func (UnimplementedDirectoryServiceServer) Get(*GetDirectoryRequest, grpc.ServerStreamingServer[Directory]) error {
return status.Errorf(codes.Unimplemented, "method Get not implemented")
}
func (UnimplementedDirectoryServiceServer) Put(DirectoryService_PutServer) error {
func (UnimplementedDirectoryServiceServer) Put(grpc.ClientStreamingServer[Directory, PutDirectoryResponse]) error {
return status.Errorf(codes.Unimplemented, "method Put not implemented")
}
func (UnimplementedDirectoryServiceServer) mustEmbedUnimplementedDirectoryServiceServer() {}
func (UnimplementedDirectoryServiceServer) testEmbeddedByValue() {}
// UnsafeDirectoryServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to DirectoryServiceServer will
@ -175,6 +145,13 @@ type UnsafeDirectoryServiceServer interface {
}
func RegisterDirectoryServiceServer(s grpc.ServiceRegistrar, srv DirectoryServiceServer) {
// If the following call pancis, it indicates UnimplementedDirectoryServiceServer was
// embedded by pointer and is nil. This will cause panics if an
// unimplemented method is ever invoked, so we test this at initialization
// time to prevent it from happening at runtime later due to I/O.
if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
t.testEmbeddedByValue()
}
s.RegisterService(&DirectoryService_ServiceDesc, srv)
}
@ -183,47 +160,18 @@ func _DirectoryService_Get_Handler(srv interface{}, stream grpc.ServerStream) er
if err := stream.RecvMsg(m); err != nil {
return err
}
return srv.(DirectoryServiceServer).Get(m, &directoryServiceGetServer{stream})
return srv.(DirectoryServiceServer).Get(m, &grpc.GenericServerStream[GetDirectoryRequest, Directory]{ServerStream: stream})
}
type DirectoryService_GetServer interface {
Send(*Directory) error
grpc.ServerStream
}
type directoryServiceGetServer struct {
grpc.ServerStream
}
func (x *directoryServiceGetServer) Send(m *Directory) error {
return x.ServerStream.SendMsg(m)
}
// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type DirectoryService_GetServer = grpc.ServerStreamingServer[Directory]
func _DirectoryService_Put_Handler(srv interface{}, stream grpc.ServerStream) error {
return srv.(DirectoryServiceServer).Put(&directoryServicePutServer{stream})
return srv.(DirectoryServiceServer).Put(&grpc.GenericServerStream[Directory, PutDirectoryResponse]{ServerStream: stream})
}
type DirectoryService_PutServer interface {
SendAndClose(*PutDirectoryResponse) error
Recv() (*Directory, error)
grpc.ServerStream
}
type directoryServicePutServer struct {
grpc.ServerStream
}
func (x *directoryServicePutServer) SendAndClose(m *PutDirectoryResponse) error {
return x.ServerStream.SendMsg(m)
}
func (x *directoryServicePutServer) Recv() (*Directory, error) {
m := new(Directory)
if err := x.ServerStream.RecvMsg(m); err != nil {
return nil, err
}
return m, nil
}
// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type DirectoryService_PutServer = grpc.ClientStreamingServer[Directory, PutDirectoryResponse]
// DirectoryService_ServiceDesc is the grpc.ServiceDesc for DirectoryService service.
// It's only intended for direct use with grpc.RegisterService,

View file

@ -165,7 +165,7 @@ where
}
}
impl<'a, P, R> AsyncRead for ReferenceReader<'a, P, R>
impl<P, R> AsyncRead for ReferenceReader<'_, P, R>
where
R: AsyncRead,
P: AsRef<[u8]>,
@ -183,7 +183,7 @@ where
}
}
impl<'a, P, R> AsyncBufRead for ReferenceReader<'a, P, R>
impl<P, R> AsyncBufRead for ReferenceReader<'_, P, R>
where
R: AsyncRead,
P: AsRef<[u8]>,

View file

@ -81,7 +81,7 @@ impl<'a> VersionPartsIter<'a> {
/// like `2.3 < 2.3.0pre` ensues. Luckily for us, this means that we can
/// lexicographically compare two version strings, _if_ we append an extra
/// component to both versions.
pub fn new_for_cmp(version: &'a BStr) -> Chain<Self, Once<VersionPart>> {
pub fn new_for_cmp(version: &'a BStr) -> Chain<Self, Once<VersionPart<'a>>> {
Self::new(version).chain(once(VersionPart::Word("".into())))
}
}

View file

@ -293,13 +293,13 @@ impl<'co, 'ro, 'env, IO> EvaluationBuilder<'co, 'ro, 'env, IO> {
}
}
impl<'co, 'ro, 'env, IO> EvaluationBuilder<'co, 'ro, 'env, IO> {
impl<IO> EvaluationBuilder<'_, '_, '_, IO> {
pub fn source_map(&mut self) -> &SourceCode {
self.source_map.get_or_insert_with(SourceCode::default)
}
}
impl<'co, 'ro, 'env> EvaluationBuilder<'co, 'ro, 'env, Box<dyn EvalIO>> {
impl EvaluationBuilder<'_, '_, '_, Box<dyn EvalIO>> {
/// Initialize an `Evaluation`, without the import statement available, and
/// all IO operations stubbed out.
pub fn new_pure() -> Self {
@ -427,7 +427,7 @@ impl<'co, 'ro, 'env> Evaluation<'co, 'ro, 'env, Box<dyn EvalIO>> {
}
}
impl<'co, 'ro, 'env, IO> Evaluation<'co, 'ro, 'env, IO>
impl<IO> Evaluation<'_, '_, '_, IO>
where
IO: AsRef<dyn EvalIO> + 'static,
{

View file

@ -14,7 +14,7 @@ pub fn pretty_print_expr(expr: &ast::Expr) -> String {
#[repr(transparent)]
struct SerializeAST<S>(S);
impl<'a> Serialize for SerializeAST<&'a ast::Apply> {
impl Serialize for SerializeAST<&ast::Apply> {
fn serialize<S: Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error> {
let mut map = serializer.serialize_map(Some(3))?;
map.serialize_entry("kind", "apply")?;
@ -24,7 +24,7 @@ impl<'a> Serialize for SerializeAST<&'a ast::Apply> {
}
}
impl<'a> Serialize for SerializeAST<&'a ast::Assert> {
impl Serialize for SerializeAST<&ast::Assert> {
fn serialize<S: Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error> {
let mut map = serializer.serialize_map(Some(3))?;
map.serialize_entry("kind", "assert")?;
@ -34,7 +34,7 @@ impl<'a> Serialize for SerializeAST<&'a ast::Assert> {
}
}
impl<'a> Serialize for SerializeAST<&'a ast::Error> {
impl Serialize for SerializeAST<&ast::Error> {
fn serialize<S: Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error> {
let mut map = serializer.serialize_map(Some(2))?;
map.serialize_entry("kind", "error")?;
@ -43,7 +43,7 @@ impl<'a> Serialize for SerializeAST<&'a ast::Error> {
}
}
impl<'a> Serialize for SerializeAST<&'a ast::IfElse> {
impl Serialize for SerializeAST<&ast::IfElse> {
fn serialize<S: Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error> {
let mut map = serializer.serialize_map(Some(4))?;
map.serialize_entry("kind", "if_else")?;
@ -54,7 +54,7 @@ impl<'a> Serialize for SerializeAST<&'a ast::IfElse> {
}
}
impl<'a> Serialize for SerializeAST<&'a ast::Select> {
impl Serialize for SerializeAST<&ast::Select> {
fn serialize<S: Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error> {
let size = match self.0.default_expr() {
Some(_) => 4,
@ -85,7 +85,7 @@ impl Serialize for SerializeAST<ast::InterpolPart<String>> {
}
}
impl<'a> Serialize for SerializeAST<&'a ast::Str> {
impl Serialize for SerializeAST<&ast::Str> {
fn serialize<S: Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error> {
let mut map = serializer.serialize_map(Some(2))?;
map.serialize_entry("kind", "string")?;
@ -115,7 +115,7 @@ impl Serialize for SerializeAST<ast::InterpolPart<ast::PathContent>> {
}
}
impl<'a> Serialize for SerializeAST<&'a ast::Path> {
impl Serialize for SerializeAST<&ast::Path> {
fn serialize<S: Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error> {
let mut map = serializer.serialize_map(Some(2))?;
map.serialize_entry("kind", "path")?;
@ -129,7 +129,7 @@ impl<'a> Serialize for SerializeAST<&'a ast::Path> {
}
}
impl<'a> Serialize for SerializeAST<&'a ast::Literal> {
impl Serialize for SerializeAST<&ast::Literal> {
fn serialize<S: Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error> {
let mut map = serializer.serialize_map(Some(2))?;
map.serialize_entry("kind", "literal")?;
@ -185,7 +185,7 @@ impl Serialize for SerializeAST<ast::Param> {
}
}
impl<'a> Serialize for SerializeAST<&'a ast::Lambda> {
impl Serialize for SerializeAST<&ast::Lambda> {
fn serialize<S: Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error> {
let mut map = serializer.serialize_map(Some(3))?;
map.serialize_entry("kind", "lambda")?;
@ -195,7 +195,7 @@ impl<'a> Serialize for SerializeAST<&'a ast::Lambda> {
}
}
impl<'a> Serialize for SerializeAST<&'a ast::LegacyLet> {
impl Serialize for SerializeAST<&ast::LegacyLet> {
fn serialize<S: Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error> {
let mut map = serializer.serialize_map(Some(3))?;
map.serialize_entry("kind", "legacy_let")?;
@ -218,7 +218,7 @@ impl<'a> Serialize for SerializeAST<&'a ast::LegacyLet> {
}
}
impl<'a> Serialize for SerializeAST<&'a ast::LetIn> {
impl Serialize for SerializeAST<&ast::LetIn> {
fn serialize<S: Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error> {
let mut map = serializer.serialize_map(Some(3))?;
map.serialize_entry("kind", "let")?;
@ -242,7 +242,7 @@ impl<'a> Serialize for SerializeAST<&'a ast::LetIn> {
}
}
impl<'a> Serialize for SerializeAST<&'a ast::List> {
impl Serialize for SerializeAST<&ast::List> {
fn serialize<S: Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error> {
let list = self.0.items().map(SerializeAST).collect::<Vec<_>>();
@ -254,7 +254,7 @@ impl<'a> Serialize for SerializeAST<&'a ast::List> {
}
}
impl<'a> Serialize for SerializeAST<&'a ast::BinOp> {
impl Serialize for SerializeAST<&ast::BinOp> {
fn serialize<S: Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error> {
let mut map = serializer.serialize_map(Some(4))?;
map.serialize_entry("kind", "binary_op")?;
@ -286,7 +286,7 @@ impl<'a> Serialize for SerializeAST<&'a ast::BinOp> {
}
}
impl<'a> Serialize for SerializeAST<&'a ast::Paren> {
impl Serialize for SerializeAST<&ast::Paren> {
fn serialize<S: Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error> {
let mut map = serializer.serialize_map(Some(2))?;
map.serialize_entry("kind", "paren")?;
@ -295,7 +295,7 @@ impl<'a> Serialize for SerializeAST<&'a ast::Paren> {
}
}
impl<'a> Serialize for SerializeAST<&'a ast::Root> {
impl Serialize for SerializeAST<&ast::Root> {
fn serialize<S: Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error> {
let mut map = serializer.serialize_map(Some(2))?;
map.serialize_entry("kind", "root")?;
@ -330,7 +330,7 @@ impl Serialize for SerializeAST<ast::Inherit> {
}
}
impl<'a> Serialize for SerializeAST<&'a ast::AttrSet> {
impl Serialize for SerializeAST<&ast::AttrSet> {
fn serialize<S: Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error> {
let mut map = serializer.serialize_map(None)?;
map.serialize_entry("kind", "attrset")?;
@ -354,7 +354,7 @@ impl<'a> Serialize for SerializeAST<&'a ast::AttrSet> {
}
}
impl<'a> Serialize for SerializeAST<&'a ast::UnaryOp> {
impl Serialize for SerializeAST<&ast::UnaryOp> {
fn serialize<S: Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error> {
let mut map = serializer.serialize_map(Some(3))?;
map.serialize_entry("kind", "unary_op")?;
@ -372,7 +372,7 @@ impl<'a> Serialize for SerializeAST<&'a ast::UnaryOp> {
}
}
impl<'a> Serialize for SerializeAST<&'a ast::Ident> {
impl Serialize for SerializeAST<&ast::Ident> {
fn serialize<S: Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error> {
let mut map = serializer.serialize_map(Some(2))?;
map.serialize_entry("kind", "ident")?;
@ -381,7 +381,7 @@ impl<'a> Serialize for SerializeAST<&'a ast::Ident> {
}
}
impl<'a> Serialize for SerializeAST<&'a ast::With> {
impl Serialize for SerializeAST<&ast::With> {
fn serialize<S: Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error> {
let mut map = serializer.serialize_map(Some(3))?;
map.serialize_entry("kind", "with")?;
@ -391,7 +391,7 @@ impl<'a> Serialize for SerializeAST<&'a ast::With> {
}
}
impl<'a> Serialize for SerializeAST<&'a ast::Dynamic> {
impl Serialize for SerializeAST<&ast::Dynamic> {
fn serialize<S: Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error> {
let mut map = serializer.serialize_map(Some(2))?;
map.serialize_entry("kind", "dynamic")?;
@ -424,7 +424,7 @@ impl Serialize for SerializeAST<ast::Attrpath> {
}
}
impl<'a> Serialize for SerializeAST<&'a ast::HasAttr> {
impl Serialize for SerializeAST<&ast::HasAttr> {
fn serialize<S: Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error> {
let mut map = serializer.serialize_map(Some(3))?;
map.serialize_entry("kind", "has_attr")?;
@ -434,7 +434,7 @@ impl<'a> Serialize for SerializeAST<&'a ast::HasAttr> {
}
}
impl<'a> Serialize for SerializeAST<&'a ast::Expr> {
impl Serialize for SerializeAST<&ast::Expr> {
fn serialize<S: Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error> {
match self.0 {
ast::Expr::Apply(node) => Serialize::serialize(&SerializeAST(node), serializer),

View file

@ -506,7 +506,7 @@ impl<'a> Iterator for Iter<KeyValue<'a>> {
}
}
impl<'a> ExactSizeIterator for Iter<KeyValue<'a>> {
impl ExactSizeIterator for Iter<KeyValue<'_>> {
fn len(&self) -> usize {
match &self.0 {
KeyValue::Empty => 0,
@ -554,7 +554,7 @@ impl<'a> IntoIterator for &'a NixAttrs {
}
}
impl<'a> ExactSizeIterator for Keys<'a> {
impl ExactSizeIterator for Keys<'_> {
fn len(&self) -> usize {
match &self.0 {
KeysInner::Empty => 0,

View file

@ -121,7 +121,7 @@ static WRITE_FLOAT_OPTIONS: LazyLock<lexical_core::WriteFloatOptions> = LazyLock
/// type, or a type error. This only works for types that implement
/// `Copy`, as returning a reference to an inner thunk value is not
/// possible.
///
/// Generate an `as_*/to_*` accessor method that returns either the
/// expected type, or a type error.
macro_rules! gen_cast {

View file

@ -5,10 +5,8 @@ use std::path::PathBuf;
/// src/libutil/util.cc of cppnix. Currently it does not match that
/// behavior; it uses the `path_clean` library which is based on the
/// Go standard library
///
/// TODO: make this match the behavior of cppnix
/// TODO: write tests for this
// TODO: make this match the behavior of cppnix
// TODO: write tests for this
pub fn canon_path(path: PathBuf) -> PathBuf {
path.clean()
}

View file

@ -307,7 +307,7 @@ thread_local! {
/// represented as a single *thin* pointer to a packed data structure containing the
/// [context][NixContext] and the string data itself (which is a raw byte array, to match the Nix
/// string semantics that allow any array of bytes to be represented by a string).
///
/// This memory representation is documented in [`NixStringInner`], but since Rust prefers to deal
/// with slices via *fat pointers* (pointers that include the length in the *pointer*, not in the
/// heap allocation), we have to do mostly manual layout management and allocation for this
@ -506,7 +506,7 @@ impl<'de> Deserialize<'de> for NixString {
{
struct StringVisitor;
impl<'de> Visitor<'de> for StringVisitor {
impl Visitor<'_> for StringVisitor {
type Value = NixString;
fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
@ -729,9 +729,8 @@ impl NixString {
/// referring to their `drvPath`, i.e. their full sources and binary closure.
/// It yields derivation paths.
pub fn iter_ctx_derivation(&self) -> impl Iterator<Item = &str> {
return self
.iter_context()
.flat_map(|context| context.iter_derivation());
self.iter_context()
.flat_map(|context| context.iter_derivation())
}
/// Iterates over "single" context elements, e.g. single derived paths,
@ -739,9 +738,8 @@ impl NixString {
/// The first element of the tuple is the output name
/// and the second element is the derivation path.
pub fn iter_ctx_single_outputs(&self) -> impl Iterator<Item = (&str, &str)> {
return self
.iter_context()
.flat_map(|context| context.iter_single_outputs());
self.iter_context()
.flat_map(|context| context.iter_single_outputs())
}
/// Returns whether this Nix string possess a context or not.

View file

@ -230,7 +230,7 @@ pub fn pin_generator(
Box::pin(f)
}
impl<'o, IO> VM<'o, IO>
impl<IO> VM<'_, IO>
where
IO: AsRef<dyn EvalIO> + 'static,
{

View file

@ -1,6 +1,6 @@
/// This module provides macros which are used in the implementation
/// of the VM for the implementation of repetitive operations.
///
/// This macro simplifies the implementation of arithmetic operations,
/// correctly handling the behaviour on different pairings of number
/// types.

View file

@ -49,7 +49,7 @@ trait GetSpan {
fn get_span(self) -> Span;
}
impl<'o, IO> GetSpan for &VM<'o, IO> {
impl<IO> GetSpan for &VM<'_, IO> {
fn get_span(self) -> Span {
self.reasonable_span
}
@ -983,7 +983,7 @@ where
}
/// Implementation of helper functions for the runtime logic above.
impl<'o, IO> VM<'o, IO>
impl<IO> VM<'_, IO>
where
IO: AsRef<dyn EvalIO> + 'static,
{

View file

@ -22,7 +22,7 @@ impl PartialEq<Symbol> for Path {
}
}
impl<'a> PartialEq<Symbol> for &'a Path {
impl PartialEq<Symbol> for &Path {
fn eq(&self, word: &Symbol) -> bool {
self.is_ident(word.0)
}

View file

@ -75,7 +75,7 @@ pub struct FileReader<'a, 'r> {
inner: BytesReader<&'a mut Reader<'r>, PadPar>,
}
impl<'a, 'r> FileReader<'a, 'r> {
impl FileReader<'_, '_> {
pub fn is_empty(&self) -> bool {
self.len() == 0
}
@ -85,7 +85,7 @@ impl<'a, 'r> FileReader<'a, 'r> {
}
}
impl<'a, 'r> AsyncRead for FileReader<'a, 'r> {
impl AsyncRead for FileReader<'_, '_> {
fn poll_read(
self: Pin<&mut Self>,
cx: &mut task::Context,
@ -95,7 +95,7 @@ impl<'a, 'r> AsyncRead for FileReader<'a, 'r> {
}
}
impl<'a, 'r> AsyncBufRead for FileReader<'a, 'r> {
impl AsyncBufRead for FileReader<'_, '_> {
fn poll_fill_buf(self: Pin<&mut Self>, cx: &mut task::Context) -> Poll<io::Result<&[u8]>> {
Pin::new(&mut self.get_mut().inner).poll_fill_buf(cx)
}

View file

@ -431,7 +431,7 @@ impl ArchiveReaderStatus<'_> {
}
}
impl<'a, 'r> ArchiveReader<'a, 'r> {
impl<'r> ArchiveReader<'_, 'r> {
/// Create a new child reader from this one.
/// In debug mode, this reader will panic if called before the new child is exhausted / calls `ready_parent`
fn child(&mut self) -> ArchiveReader<'_, 'r> {

View file

@ -74,7 +74,7 @@ impl VerifyingKey {
return false;
}
return signature.verify(fingerprint.as_bytes(), &self.verifying_key);
signature.verify(fingerprint.as_bytes(), &self.verifying_key)
}
}

View file

@ -226,7 +226,7 @@ where
}
}
impl<'a, 'b: 'a> FromStr for StorePath<String> {
impl FromStr for StorePath<String> {
type Err = Error;
/// Construct a [StorePath] by passing the `$digest-$name` string

View file

@ -8,7 +8,7 @@ in
(pkgs.buildGoModule {
name = "store-go";
src = depot.third_party.gitignoreSource ./.;
vendorHash = "sha256-JAxjSI4efCwbAUbvS7AQ5ZbVlf3ebGDBzDFMTK7dvl4=";
vendorHash = "sha256:1zj42lwx33fwl1kng3zr4mgsnyhik2s728cm9c57qplbrhigpvdz";
}).overrideAttrs (_: {
meta.ci.extraSteps = {
check = {

View file

@ -1,25 +1,26 @@
module code.tvl.fyi/tvix/store-go
go 1.19
go 1.22
toolchain go1.23.4
require (
code.tvl.fyi/tvix/castore-go v0.0.0-20231105151352-990d6ba2175e
github.com/google/go-cmp v0.5.9
github.com/nix-community/go-nix v0.0.0-20231009143713-ebca3299475b
github.com/stretchr/testify v1.8.1
google.golang.org/grpc v1.59.0
google.golang.org/protobuf v1.31.0
code.tvl.fyi/tvix/castore-go v0.0.0-20241229150222-1eaea0d040a5
github.com/google/go-cmp v0.6.0
github.com/nix-community/go-nix v0.0.0-20241231094847-b5eacc9958cd
github.com/stretchr/testify v1.9.0
google.golang.org/grpc v1.69.2
google.golang.org/protobuf v1.36.1
)
require (
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/klauspost/cpuid/v2 v2.2.5 // indirect
github.com/klauspost/cpuid/v2 v2.2.9 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
golang.org/x/net v0.17.0 // indirect
golang.org/x/sys v0.14.0 // indirect
golang.org/x/text v0.14.0 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20231030173426-d783a09b4405 // indirect
golang.org/x/net v0.33.0 // indirect
golang.org/x/sys v0.28.0 // indirect
golang.org/x/text v0.21.0 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20241230172942-26aa7a208def // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
lukechampine.com/blake3 v1.2.1 // indirect
lukechampine.com/blake3 v1.3.0 // indirect
)

View file

@ -1,47 +1,50 @@
code.tvl.fyi/tvix/castore-go v0.0.0-20231105151352-990d6ba2175e h1:Nj+anfyEYeEdhnIo2BG/N1ZwQl1IvI7AH3TbNDLwUOA=
code.tvl.fyi/tvix/castore-go v0.0.0-20231105151352-990d6ba2175e/go.mod h1:+vKbozsa04yy2TWh3kUVU568jaza3Hf0p1jAEoMoCwA=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
code.tvl.fyi/tvix/castore-go v0.0.0-20241229150222-1eaea0d040a5 h1:pnBDZ4/HrjH76hdNpjJZOhKbGFPBEmTVMZqwbwzEMe0=
code.tvl.fyi/tvix/castore-go v0.0.0-20241229150222-1eaea0d040a5/go.mod h1:+vKbozsa04yy2TWh3kUVU568jaza3Hf0p1jAEoMoCwA=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg=
github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38=
github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/klauspost/cpuid/v2 v2.2.5 h1:0E5MSMDEoAulmXNFquVs//DdoomxaoTY1kUhbc/qbZg=
github.com/klauspost/cpuid/v2 v2.2.5/go.mod h1:Lcz8mBdAVJIBVzewtcLocK12l3Y+JytZYpaMropDUws=
github.com/nix-community/go-nix v0.0.0-20231009143713-ebca3299475b h1:AWEKOdDO3JnHApQDOmONEKLXbMCQJhYJJfJpiWB9VGI=
github.com/nix-community/go-nix v0.0.0-20231009143713-ebca3299475b/go.mod h1:hHM9UK2zOCjvmiLgeaW4LVbOW/vBaRWFJGzfi31/slQ=
github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY=
github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY=
github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag=
github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE=
github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek=
github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps=
github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/klauspost/cpuid/v2 v2.2.9 h1:66ze0taIn2H33fBvCkXuv9BmCwDfafmiIVpKV9kKGuY=
github.com/klauspost/cpuid/v2 v2.2.9/go.mod h1:rqkxqrZ1EhYM9G+hXH7YdowN5R5RGN6NK4QwQ3WMXF8=
github.com/nix-community/go-nix v0.0.0-20241231094847-b5eacc9958cd h1:SHwu+Di8uuowbCkuYJeRon3ciXAl5pAme1xItHkIf30=
github.com/nix-community/go-nix v0.0.0-20241231094847-b5eacc9958cd/go.mod h1:qgCw4bBKZX8qMgGeEZzGFVT3notl42dBjNqO2jut0M0=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo=
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk=
github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM=
golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE=
golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q=
golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ=
golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
google.golang.org/genproto/googleapis/rpc v0.0.0-20231030173426-d783a09b4405 h1:AB/lmRny7e2pLhFEYIbl5qkDAUt2h0ZRO4wGPhZf+ik=
google.golang.org/genproto/googleapis/rpc v0.0.0-20231030173426-d783a09b4405/go.mod h1:67X1fPuzjcrkymZzZV1vvkFeTn2Rvc6lYF9MYFGCcwE=
google.golang.org/grpc v1.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk=
google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98=
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8=
google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg=
github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
go.opentelemetry.io/otel v1.31.0 h1:NsJcKPIW0D0H3NgzPDHmo0WW6SptzPdqg/L1zsIm2hY=
go.opentelemetry.io/otel v1.31.0/go.mod h1:O0C14Yl9FgkjqcCZAsE053C13OaddMYr/hz6clDkEJE=
go.opentelemetry.io/otel/metric v1.31.0 h1:FSErL0ATQAmYHUIzSezZibnyVlft1ybhy4ozRPcF2fE=
go.opentelemetry.io/otel/metric v1.31.0/go.mod h1:C3dEloVbLuYoX41KpmAhOqNriGbA+qqH6PQ5E5mUfnY=
go.opentelemetry.io/otel/sdk v1.31.0 h1:xLY3abVHYZ5HSfOg3l2E5LUj2Cwva5Y7yGxnSW9H5Gk=
go.opentelemetry.io/otel/sdk v1.31.0/go.mod h1:TfRbMdhvxIIr/B2N2LQW2S5v9m3gOQ/08KsbbO5BPT0=
go.opentelemetry.io/otel/sdk/metric v1.31.0 h1:i9hxxLJF/9kkvfHppyLL55aW7iIJz4JjxTeYusH7zMc=
go.opentelemetry.io/otel/sdk/metric v1.31.0/go.mod h1:CRInTMVvNhUKgSAMbKyTMxqOBC0zgyxzW55lZzX43Y8=
go.opentelemetry.io/otel/trace v1.31.0 h1:ffjsj1aRouKewfr85U2aGagJ46+MvodynlQ1HYdmJys=
go.opentelemetry.io/otel/trace v1.31.0/go.mod h1:TXZkRk7SM2ZQLtR6eoAWQFIHPvzQ06FJAsO1tJg480A=
golang.org/x/net v0.33.0 h1:74SYHlV8BIgHIFC/LrYkOGIwL19eTYXQ5wc6TBuO36I=
golang.org/x/net v0.33.0/go.mod h1:HXLR5J+9DxmrqMwG9qjGCxZ+zKXxBru04zlTvWlWuN4=
golang.org/x/sys v0.28.0 h1:Fksou7UEQUWlKvIdsqzJmUmCX3cZuD2+P3XyyzwMhlA=
golang.org/x/sys v0.28.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/text v0.21.0 h1:zyQAAkrwaneQ066sspRyJaG9VNi/YJ1NfzcGB3hZ/qo=
golang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ=
google.golang.org/genproto/googleapis/rpc v0.0.0-20241230172942-26aa7a208def h1:4P81qv5JXI/sDNae2ClVx88cgDDA6DPilADkG9tYKz8=
google.golang.org/genproto/googleapis/rpc v0.0.0-20241230172942-26aa7a208def/go.mod h1:bdAgzvd4kFrpykc5/AC2eLUiegK9T/qxZHD4hXYf/ho=
google.golang.org/grpc v1.69.2 h1:U3S9QEtbXC0bYNvRtcoklF3xGtLViumSYxWykJS+7AU=
google.golang.org/grpc v1.69.2/go.mod h1:vyjdE6jLBI76dgpDojsFGNaHlxdjXN9ghpnd2o7JGZ4=
google.golang.org/protobuf v1.36.1 h1:yBPeRvTftaleIgM3PZ/WBIZ7XM/eEYAaEyCwvyjq/gk=
google.golang.org/protobuf v1.36.1/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
lukechampine.com/blake3 v1.2.1 h1:YuqqRuaqsGV71BV/nm9xlI0MKUv4QC54jQnBChWbGnI=
lukechampine.com/blake3 v1.2.1/go.mod h1:0OFRp7fBtAylGVCO40o87sbupkyIGgbpv1+M1k1LM6k=
lukechampine.com/blake3 v1.3.0 h1:sJ3XhFINmHSrYCgl958hscfIa3bw8x4DqMP3u1YvoYE=
lukechampine.com/blake3 v1.3.0/go.mod h1:0OFRp7fBtAylGVCO40o87sbupkyIGgbpv1+M1k1LM6k=

View file

@ -3,7 +3,7 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.35.2
// protoc-gen-go v1.36.0
// protoc (unknown)
// source: tvix/store/protos/pathinfo.proto
@ -102,10 +102,7 @@ func (NARInfo_CA_Hash) EnumDescriptor() ([]byte, []int) {
// PathInfo shows information about a Nix Store Path.
// That's a single element inside /nix/store.
type PathInfo struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
state protoimpl.MessageState `protogen:"open.v1"`
// The path can be a directory, file or symlink.
Node *castore_go.Node `protobuf:"bytes,1,opt,name=node,proto3" json:"node,omitempty"`
// List of references (output path hashes)
@ -113,7 +110,9 @@ type PathInfo struct {
// base32-encoded string.
References [][]byte `protobuf:"bytes,2,rep,name=references,proto3" json:"references,omitempty"`
// see below.
Narinfo *NARInfo `protobuf:"bytes,3,opt,name=narinfo,proto3" json:"narinfo,omitempty"`
Narinfo *NARInfo `protobuf:"bytes,3,opt,name=narinfo,proto3" json:"narinfo,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *PathInfo) Reset() {
@ -171,14 +170,13 @@ func (x *PathInfo) GetNarinfo() *NARInfo {
// It is commonly formatted by a nixbase32-encoding the digest, and
// concatenating the name, separated by a `-`.
type StorePath struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
state protoimpl.MessageState `protogen:"open.v1"`
// The string after digest and `-`.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// The digest (20 bytes).
Digest []byte `protobuf:"bytes,2,opt,name=digest,proto3" json:"digest,omitempty"`
Digest []byte `protobuf:"bytes,2,opt,name=digest,proto3" json:"digest,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *StorePath) Reset() {
@ -235,10 +233,7 @@ func (x *StorePath) GetDigest() []byte {
// moving to another signature scheme is desired.
// Even then, it still makes sense to hold this data, for old clients.
type NARInfo struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
state protoimpl.MessageState `protogen:"open.v1"`
// This size of the NAR file, in bytes.
NarSize uint64 `protobuf:"varint,1,opt,name=nar_size,json=narSize,proto3" json:"nar_size,omitempty"`
// The sha256 of the NAR file representation.
@ -276,7 +271,9 @@ type NARInfo struct {
//
// We use an enum to encode the possible combinations, and optimize for the
// common case, `fixed:recursive`, identified as `NAR_SHA256`.
Ca *NARInfo_CA `protobuf:"bytes,6,opt,name=ca,proto3" json:"ca,omitempty"`
Ca *NARInfo_CA `protobuf:"bytes,6,opt,name=ca,proto3" json:"ca,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *NARInfo) Reset() {
@ -353,12 +350,11 @@ func (x *NARInfo) GetCa() *NARInfo_CA {
// This represents a (parsed) signature line in a .narinfo file.
type NARInfo_Signature struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
state protoimpl.MessageState `protogen:"open.v1"`
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
unknownFields protoimpl.UnknownFields
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
sizeCache protoimpl.SizeCache
}
func (x *NARInfo_Signature) Reset() {
@ -406,14 +402,13 @@ func (x *NARInfo_Signature) GetData() []byte {
}
type NARInfo_CA struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
state protoimpl.MessageState `protogen:"open.v1"`
// The hashing type used.
Type NARInfo_CA_Hash `protobuf:"varint,1,opt,name=type,proto3,enum=tvix.store.v1.NARInfo_CA_Hash" json:"type,omitempty"`
// The digest, in raw bytes.
Digest []byte `protobuf:"bytes,2,opt,name=digest,proto3" json:"digest,omitempty"`
Digest []byte `protobuf:"bytes,2,opt,name=digest,proto3" json:"digest,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *NARInfo_CA) Reset() {

View file

@ -3,7 +3,7 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.35.2
// protoc-gen-go v1.36.0
// protoc (unknown)
// source: tvix/store/protos/rpc_pathinfo.proto
@ -27,14 +27,13 @@ const (
// The parameters that can be used to lookup a (single) PathInfo object.
// Currently, only a lookup by output hash is supported.
type GetPathInfoRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Types that are assignable to ByWhat:
state protoimpl.MessageState `protogen:"open.v1"`
// Types that are valid to be assigned to ByWhat:
//
// *GetPathInfoRequest_ByOutputHash
ByWhat isGetPathInfoRequest_ByWhat `protobuf_oneof:"by_what"`
ByWhat isGetPathInfoRequest_ByWhat `protobuf_oneof:"by_what"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *GetPathInfoRequest) Reset() {
@ -67,16 +66,18 @@ func (*GetPathInfoRequest) Descriptor() ([]byte, []int) {
return file_tvix_store_protos_rpc_pathinfo_proto_rawDescGZIP(), []int{0}
}
func (m *GetPathInfoRequest) GetByWhat() isGetPathInfoRequest_ByWhat {
if m != nil {
return m.ByWhat
func (x *GetPathInfoRequest) GetByWhat() isGetPathInfoRequest_ByWhat {
if x != nil {
return x.ByWhat
}
return nil
}
func (x *GetPathInfoRequest) GetByOutputHash() []byte {
if x, ok := x.GetByWhat().(*GetPathInfoRequest_ByOutputHash); ok {
return x.ByOutputHash
if x != nil {
if x, ok := x.ByWhat.(*GetPathInfoRequest_ByOutputHash); ok {
return x.ByOutputHash
}
}
return nil
}
@ -98,9 +99,9 @@ func (*GetPathInfoRequest_ByOutputHash) isGetPathInfoRequest_ByWhat() {}
// The parameters that can be used to lookup (multiple) PathInfo objects.
// Currently no filtering is possible, all objects are returned.
type ListPathInfoRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
state protoimpl.MessageState `protogen:"open.v1"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *ListPathInfoRequest) Reset() {
@ -138,14 +139,13 @@ func (*ListPathInfoRequest) Descriptor() ([]byte, []int) {
// It contains the size of the NAR representation (in bytes), and the sha56
// digest.
type CalculateNARResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
state protoimpl.MessageState `protogen:"open.v1"`
// This size of the NAR file, in bytes.
NarSize uint64 `protobuf:"varint,1,opt,name=nar_size,json=narSize,proto3" json:"nar_size,omitempty"`
// The sha256 of the NAR file representation.
NarSha256 []byte `protobuf:"bytes,2,opt,name=nar_sha256,json=narSha256,proto3" json:"nar_sha256,omitempty"`
NarSha256 []byte `protobuf:"bytes,2,opt,name=nar_sha256,json=narSha256,proto3" json:"nar_sha256,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *CalculateNARResponse) Reset() {

View file

@ -3,7 +3,7 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.3.0
// - protoc-gen-go-grpc v1.5.1
// - protoc (unknown)
// source: tvix/store/protos/rpc_pathinfo.proto
@ -19,8 +19,8 @@ import (
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.32.0 or later.
const _ = grpc.SupportPackageIsVersion7
// Requires gRPC-Go v1.64.0 or later.
const _ = grpc.SupportPackageIsVersion9
const (
PathInfoService_Get_FullMethodName = "/tvix.store.v1.PathInfoService/Get"
@ -64,7 +64,7 @@ type PathInfoServiceClient interface {
CalculateNAR(ctx context.Context, in *castore_go.Node, opts ...grpc.CallOption) (*CalculateNARResponse, error)
// Return a stream of PathInfo messages matching the criteria specified in
// ListPathInfoRequest.
List(ctx context.Context, in *ListPathInfoRequest, opts ...grpc.CallOption) (PathInfoService_ListClient, error)
List(ctx context.Context, in *ListPathInfoRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[PathInfo], error)
}
type pathInfoServiceClient struct {
@ -76,8 +76,9 @@ func NewPathInfoServiceClient(cc grpc.ClientConnInterface) PathInfoServiceClient
}
func (c *pathInfoServiceClient) Get(ctx context.Context, in *GetPathInfoRequest, opts ...grpc.CallOption) (*PathInfo, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(PathInfo)
err := c.cc.Invoke(ctx, PathInfoService_Get_FullMethodName, in, out, opts...)
err := c.cc.Invoke(ctx, PathInfoService_Get_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
@ -85,8 +86,9 @@ func (c *pathInfoServiceClient) Get(ctx context.Context, in *GetPathInfoRequest,
}
func (c *pathInfoServiceClient) Put(ctx context.Context, in *PathInfo, opts ...grpc.CallOption) (*PathInfo, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(PathInfo)
err := c.cc.Invoke(ctx, PathInfoService_Put_FullMethodName, in, out, opts...)
err := c.cc.Invoke(ctx, PathInfoService_Put_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
@ -94,20 +96,22 @@ func (c *pathInfoServiceClient) Put(ctx context.Context, in *PathInfo, opts ...g
}
func (c *pathInfoServiceClient) CalculateNAR(ctx context.Context, in *castore_go.Node, opts ...grpc.CallOption) (*CalculateNARResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(CalculateNARResponse)
err := c.cc.Invoke(ctx, PathInfoService_CalculateNAR_FullMethodName, in, out, opts...)
err := c.cc.Invoke(ctx, PathInfoService_CalculateNAR_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *pathInfoServiceClient) List(ctx context.Context, in *ListPathInfoRequest, opts ...grpc.CallOption) (PathInfoService_ListClient, error) {
stream, err := c.cc.NewStream(ctx, &PathInfoService_ServiceDesc.Streams[0], PathInfoService_List_FullMethodName, opts...)
func (c *pathInfoServiceClient) List(ctx context.Context, in *ListPathInfoRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[PathInfo], error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
stream, err := c.cc.NewStream(ctx, &PathInfoService_ServiceDesc.Streams[0], PathInfoService_List_FullMethodName, cOpts...)
if err != nil {
return nil, err
}
x := &pathInfoServiceListClient{stream}
x := &grpc.GenericClientStream[ListPathInfoRequest, PathInfo]{ClientStream: stream}
if err := x.ClientStream.SendMsg(in); err != nil {
return nil, err
}
@ -117,26 +121,12 @@ func (c *pathInfoServiceClient) List(ctx context.Context, in *ListPathInfoReques
return x, nil
}
type PathInfoService_ListClient interface {
Recv() (*PathInfo, error)
grpc.ClientStream
}
type pathInfoServiceListClient struct {
grpc.ClientStream
}
func (x *pathInfoServiceListClient) Recv() (*PathInfo, error) {
m := new(PathInfo)
if err := x.ClientStream.RecvMsg(m); err != nil {
return nil, err
}
return m, nil
}
// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type PathInfoService_ListClient = grpc.ServerStreamingClient[PathInfo]
// PathInfoServiceServer is the server API for PathInfoService service.
// All implementations must embed UnimplementedPathInfoServiceServer
// for forward compatibility
// for forward compatibility.
type PathInfoServiceServer interface {
// Return a PathInfo message matching the criteria specified in the
// GetPathInfoRequest message.
@ -169,13 +159,16 @@ type PathInfoServiceServer interface {
CalculateNAR(context.Context, *castore_go.Node) (*CalculateNARResponse, error)
// Return a stream of PathInfo messages matching the criteria specified in
// ListPathInfoRequest.
List(*ListPathInfoRequest, PathInfoService_ListServer) error
List(*ListPathInfoRequest, grpc.ServerStreamingServer[PathInfo]) error
mustEmbedUnimplementedPathInfoServiceServer()
}
// UnimplementedPathInfoServiceServer must be embedded to have forward compatible implementations.
type UnimplementedPathInfoServiceServer struct {
}
// UnimplementedPathInfoServiceServer must be embedded to have
// forward compatible implementations.
//
// NOTE: this should be embedded by value instead of pointer to avoid a nil
// pointer dereference when methods are called.
type UnimplementedPathInfoServiceServer struct{}
func (UnimplementedPathInfoServiceServer) Get(context.Context, *GetPathInfoRequest) (*PathInfo, error) {
return nil, status.Errorf(codes.Unimplemented, "method Get not implemented")
@ -186,10 +179,11 @@ func (UnimplementedPathInfoServiceServer) Put(context.Context, *PathInfo) (*Path
func (UnimplementedPathInfoServiceServer) CalculateNAR(context.Context, *castore_go.Node) (*CalculateNARResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method CalculateNAR not implemented")
}
func (UnimplementedPathInfoServiceServer) List(*ListPathInfoRequest, PathInfoService_ListServer) error {
func (UnimplementedPathInfoServiceServer) List(*ListPathInfoRequest, grpc.ServerStreamingServer[PathInfo]) error {
return status.Errorf(codes.Unimplemented, "method List not implemented")
}
func (UnimplementedPathInfoServiceServer) mustEmbedUnimplementedPathInfoServiceServer() {}
func (UnimplementedPathInfoServiceServer) testEmbeddedByValue() {}
// UnsafePathInfoServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to PathInfoServiceServer will
@ -199,6 +193,13 @@ type UnsafePathInfoServiceServer interface {
}
func RegisterPathInfoServiceServer(s grpc.ServiceRegistrar, srv PathInfoServiceServer) {
// If the following call pancis, it indicates UnimplementedPathInfoServiceServer was
// embedded by pointer and is nil. This will cause panics if an
// unimplemented method is ever invoked, so we test this at initialization
// time to prevent it from happening at runtime later due to I/O.
if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
t.testEmbeddedByValue()
}
s.RegisterService(&PathInfoService_ServiceDesc, srv)
}
@ -261,21 +262,11 @@ func _PathInfoService_List_Handler(srv interface{}, stream grpc.ServerStream) er
if err := stream.RecvMsg(m); err != nil {
return err
}
return srv.(PathInfoServiceServer).List(m, &pathInfoServiceListServer{stream})
return srv.(PathInfoServiceServer).List(m, &grpc.GenericServerStream[ListPathInfoRequest, PathInfo]{ServerStream: stream})
}
type PathInfoService_ListServer interface {
Send(*PathInfo) error
grpc.ServerStream
}
type pathInfoServiceListServer struct {
grpc.ServerStream
}
func (x *pathInfoServiceListServer) Send(m *PathInfo) error {
return x.ServerStream.SendMsg(m)
}
// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type PathInfoService_ListServer = grpc.ServerStreamingServer[PathInfo]
// PathInfoService_ServiceDesc is the grpc.ServiceDesc for PathInfoService service.
// It's only intended for direct use with grpc.RegisterService,

View file

@ -29,7 +29,7 @@ pub fn accept_trace<B>(request: axum::http::Request<B>) -> axum::http::Request<B
struct HeaderExtractor<'a>(&'a axum::http::HeaderMap);
#[cfg(feature = "otlp")]
impl<'a> Extractor for HeaderExtractor<'a> {
impl Extractor for HeaderExtractor<'_> {
/// Get a value for a key from the HeaderMap. If the value is not valid ASCII, returns None.
fn get(&self, key: &str) -> Option<&str> {
self.0.get(key).and_then(|v| {

View file

@ -23,7 +23,6 @@ with lib;
# benchmarking+profiling
cargo-criterion
cargo-flamegraph
coz
inferno
hotspot
] ++ optionals (stdenv.isLinux) [

View file

@ -44,7 +44,6 @@ let
epkgs.melpaPackages.paredit
epkgs.melpaPackages.rainbow-delimiters
epkgs.melpaPackages.sly
epkgs.melpaPackages.use-package
epkgs.melpaPackages.yaml-mode
epkgs.rust-mode
epkgs.tvlPackages.tvl

View file

@ -139,7 +139,6 @@ let
tide
ts
tuareg
use-package
vterm
web-mode
which-key