From 920b7118d5b0917e426367107f7b7b66089a8d7b 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: I63a331b8e7e46e248811ab074f778f8467329911 --- tvix/build/Cargo.toml | 3 --- 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/nar-bridge/Cargo.toml | 3 --- 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 --- 13 files changed, 16 insertions(+), 31 deletions(-) diff --git a/tvix/build/Cargo.toml b/tvix/build/Cargo.toml index c0cf86408..9072c1287 100644 --- a/tvix/build/Cargo.toml +++ b/tvix/build/Cargo.toml @@ -31,6 +31,3 @@ tonic-reflection = ["dep:tonic-reflection", "tvix-castore/tonic-reflection"] [dev-dependencies] rstest = "0.19.0" - -[lints] -workspace = true diff --git a/tvix/build/build.rs b/tvix/build/build.rs index 09604c3e3..02d089521 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( &[ - "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 sparseTree 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 f1f6bf0b0..de2e6fe83 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 ded2292db..8bb3fba90 100644 --- a/tvix/castore/Cargo.toml +++ b/tvix/castore/Cargo.toml @@ -126,6 +126,3 @@ tonic-reflection = ["dep:tonic-reflection"] # 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 98e2ab348..b35839e57 100644 --- a/tvix/castore/build.rs +++ b/tvix/castore/build.rs @@ -20,16 +20,16 @@ fn main() -> Result<()> { .type_attribute(".", "#[derive(Eq, Hash)]") .compile( &[ - "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 sparseTree 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/nar-bridge/Cargo.toml b/tvix/nar-bridge/Cargo.toml index c2a03d981..a033b849b 100644 --- a/tvix/nar-bridge/Cargo.toml +++ b/tvix/nar-bridge/Cargo.toml @@ -40,6 +40,3 @@ otlp = ["tvix-tracing/otlp"] [dev-dependencies] hex-literal = "0.4.1" rstest = "0.19.0" - -[lints] -workspace = true diff --git a/tvix/store/Cargo.toml b/tvix/store/Cargo.toml index dfe49e7ff..5a66ed674 100644 --- a/tvix/store/Cargo.toml +++ b/tvix/store/Cargo.toml @@ -83,6 +83,3 @@ xp-store-composition = ["toml"] # 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 8a92ab26f..75ef9bbfe 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( &[ - "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 sparseTree 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 3f3e5330c..8c151615d 100644 --- a/tvix/tracing/Cargo.toml +++ b/tvix/tracing/Cargo.toml @@ -49,6 +49,3 @@ reqwest = [ axum = [ "dep:axum", ] - -[lints] -workspace = true