From 5d3769594ed6eb57dbb06dfb947a8429bdcca4f6 Mon Sep 17 00:00:00 2001 From: sinavir Date: Tue, 23 Jul 2024 15:14:17 +0200 Subject: [PATCH] fix: Fix compilation from outside Change-Id: I6f2ad235e00b8a08a8ec061f0a822881a2d83bca --- tvix/build/build.rs | 6 +++--- tvix/build/protos/build.proto | 2 +- tvix/build/protos/rpc_build.proto | 2 +- tvix/castore/Cargo.toml | 3 --- tvix/castore/build.rs | 8 ++++---- tvix/castore/protos/rpc_directory.proto | 2 +- tvix/store/Cargo.toml | 3 --- tvix/store/build.rs | 6 +++--- tvix/store/protos/pathinfo.proto | 2 +- tvix/store/protos/rpc_pathinfo.proto | 4 ++-- tvix/tracing/Cargo.toml | 3 --- 11 files changed, 16 insertions(+), 25 deletions(-) diff --git a/tvix/build/build.rs b/tvix/build/build.rs index 2fb8d86ee..addef665e 100644 --- a/tvix/build/build.rs +++ b/tvix/build/build.rs @@ -20,15 +20,15 @@ fn main() -> Result<()> { .extern_path(".tvix.castore.v1", "::tvix_castore::proto") .compile_protos( &[ - "tvix/build/protos/build.proto", - "tvix/build/protos/rpc_build.proto", + "build/protos/build.proto", + "build/protos/rpc_build.proto", ], // If we are in running `cargo build` manually, using `../..` works fine, // but in case we run inside a nix build, we need to instead point PROTO_ROOT // to a custom tree containing that structure. &[match std::env::var_os("PROTO_ROOT") { Some(proto_root) => proto_root.to_str().unwrap().to_owned(), - None => "../..".to_string(), + None => "..".to_string(), }], )?; diff --git a/tvix/build/protos/build.proto b/tvix/build/protos/build.proto index 1d6f8690c..f41ca01a2 100644 --- a/tvix/build/protos/build.proto +++ b/tvix/build/protos/build.proto @@ -5,7 +5,7 @@ syntax = "proto3"; package tvix.build.v1; -import "tvix/castore/protos/castore.proto"; +import "castore/protos/castore.proto"; option go_package = "code.tvl.fyi/tvix/build-go;buildv1"; diff --git a/tvix/build/protos/rpc_build.proto b/tvix/build/protos/rpc_build.proto index 73eebf78f..6107e9cba 100644 --- a/tvix/build/protos/rpc_build.proto +++ b/tvix/build/protos/rpc_build.proto @@ -4,7 +4,7 @@ syntax = "proto3"; package tvix.build.v1; -import "tvix/build/protos/build.proto"; +import "build/protos/build.proto"; option go_package = "code.tvl.fyi/tvix/build-go;buildv1"; diff --git a/tvix/castore/Cargo.toml b/tvix/castore/Cargo.toml index 09a4074aa..2c37a6b7a 100644 --- a/tvix/castore/Cargo.toml +++ b/tvix/castore/Cargo.toml @@ -98,6 +98,3 @@ xp-composition-url-refs = [] # Requires the following packages in $PATH: # cbtemulator, google-cloud-bigtable-tool integration = [] - -[lints] -workspace = true diff --git a/tvix/castore/build.rs b/tvix/castore/build.rs index 2250d4ebf..a3feac2da 100644 --- a/tvix/castore/build.rs +++ b/tvix/castore/build.rs @@ -20,16 +20,16 @@ fn main() -> Result<()> { .type_attribute(".", "#[derive(Eq, Hash)]") .compile_protos( &[ - "tvix/castore/protos/castore.proto", - "tvix/castore/protos/rpc_blobstore.proto", - "tvix/castore/protos/rpc_directory.proto", + "castore/protos/castore.proto", + "castore/protos/rpc_blobstore.proto", + "castore/protos/rpc_directory.proto", ], // If we are in running `cargo build` manually, using `../..` works fine, // but in case we run inside a nix build, we need to instead point PROTO_ROOT // to a custom tree containing that structure. &[match std::env::var_os("PROTO_ROOT") { Some(proto_root) => proto_root.to_str().unwrap().to_owned(), - None => "../..".to_string(), + None => "..".to_string(), }], ) } diff --git a/tvix/castore/protos/rpc_directory.proto b/tvix/castore/protos/rpc_directory.proto index f4f41c433..09849a209 100644 --- a/tvix/castore/protos/rpc_directory.proto +++ b/tvix/castore/protos/rpc_directory.proto @@ -4,7 +4,7 @@ syntax = "proto3"; package tvix.castore.v1; -import "tvix/castore/protos/castore.proto"; +import "castore/protos/castore.proto"; option go_package = "code.tvl.fyi/tvix/castore-go;castorev1"; diff --git a/tvix/store/Cargo.toml b/tvix/store/Cargo.toml index dd8ca78b4..653a357e4 100644 --- a/tvix/store/Cargo.toml +++ b/tvix/store/Cargo.toml @@ -81,6 +81,3 @@ xp-composition-cli = ["toml", "tvix-castore/xp-composition-url-refs"] # Requires the following packages in $PATH: # cbtemulator, google-cloud-bigtable-tool integration = [] - -[lints] -workspace = true diff --git a/tvix/store/build.rs b/tvix/store/build.rs index f3ff05ffc..95f187159 100644 --- a/tvix/store/build.rs +++ b/tvix/store/build.rs @@ -20,15 +20,15 @@ fn main() -> Result<()> { .extern_path(".tvix.castore.v1", "::tvix_castore::proto") .compile_protos( &[ - "tvix/store/protos/pathinfo.proto", - "tvix/store/protos/rpc_pathinfo.proto", + "store/protos/pathinfo.proto", + "store/protos/rpc_pathinfo.proto", ], // If we are in running `cargo build` manually, using `../..` works fine, // but in case we run inside a nix build, we need to instead point PROTO_ROOT // to a custom tree containing that structure. &[match std::env::var_os("PROTO_ROOT") { Some(proto_root) => proto_root.to_str().unwrap().to_owned(), - None => "../..".to_string(), + None => "..".to_string(), }], ) } diff --git a/tvix/store/protos/pathinfo.proto b/tvix/store/protos/pathinfo.proto index b03e7e938..8d296ae33 100644 --- a/tvix/store/protos/pathinfo.proto +++ b/tvix/store/protos/pathinfo.proto @@ -4,7 +4,7 @@ syntax = "proto3"; package tvix.store.v1; -import "tvix/castore/protos/castore.proto"; +import "castore/protos/castore.proto"; option go_package = "code.tvl.fyi/tvix/store-go;storev1"; diff --git a/tvix/store/protos/rpc_pathinfo.proto b/tvix/store/protos/rpc_pathinfo.proto index c1c91658a..bc693e08a 100644 --- a/tvix/store/protos/rpc_pathinfo.proto +++ b/tvix/store/protos/rpc_pathinfo.proto @@ -4,8 +4,8 @@ syntax = "proto3"; package tvix.store.v1; -import "tvix/castore/protos/castore.proto"; -import "tvix/store/protos/pathinfo.proto"; +import "castore/protos/castore.proto"; +import "store/protos/pathinfo.proto"; option go_package = "code.tvl.fyi/tvix/store-go;storev1"; diff --git a/tvix/tracing/Cargo.toml b/tvix/tracing/Cargo.toml index aa514fbe1..ba6c769b9 100644 --- a/tvix/tracing/Cargo.toml +++ b/tvix/tracing/Cargo.toml @@ -50,6 +50,3 @@ reqwest = [ axum = [ "dep:axum", ] - -[lints] -workspace = true