Update crate references in codegen tests

Update imports to use `roto_tonic` instead of `crate` for BufferPool
and StatusBody. Remove the broad replacement of `crate` with `roto`
and add error output to `test_map_build.rs`.
This commit is contained in:
2026-05-16 19:45:46 -07:00
parent 56fc787f7a
commit b11b068345
4 changed files with 19 additions and 19 deletions
+3 -2
View File
@@ -68,10 +68,11 @@ fn test_generated_code_builds() {
// 4. Write the generated code to src/lib.rs
// The generated code uses `use crate::{...}`, but it's now in a separate crate.
// Replace `crate` with `roto` to reference the types in the dependency.
// Replace `crate` with `roto_tonic` to reference the types in the dependency.
let mut all_code = String::new();
for (_, content) in generated_files {
all_code.push_str(&content);
let replaced = content.replace("use crate::{BufferPool, StatusBody};", "use roto_tonic::{BufferPool, StatusBody};");
all_code.push_str(&replaced);
all_code.push_str("\n");
}
let lib_path = temp_project_dir.join("src/lib.rs");