Skip to content

Commit

Permalink
fix include type src failure
Browse files Browse the repository at this point in the history
Summary:
before this diff
```
cd ~/fbsource/fbcode/common/rust/cargo_from_buck/fbcode/security/flare/if/flare_if
cargo build
```
fails with errors (P1172791642)
```
Failed while running thrift compilation: No such file or directory (os error 2)
```

Reviewed By: dtolnay

Differential Revision:
D53382391

Privacy Context Container: L1124100

fbshipit-source-id: fdc9d541fb75c53b1aba3da1f57976846de78f9f
  • Loading branch information
Shayne Fletcher authored and facebook-github-bot committed Feb 3, 2024
1 parent f120815 commit 2335e04
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions shed/thrift_compiler/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -197,11 +197,15 @@ impl Config {
}
for lib_include_src in &self.lib_include_srcs {
println!("cargo:rerun-if-changed={lib_include_src}");
fs::copy(lib_include_src, out.join(lib_include_src))?;
if let GenContext::Lib = self.gen_context {
fs::copy(lib_include_src, out.join(lib_include_src))?;
}
}
for types_include_src in &self.types_include_srcs {
println!("cargo:rerun-if-changed={types_include_src}");
fs::copy(types_include_src, out.join(types_include_src))?;
if let GenContext::Types = self.gen_context {
fs::copy(types_include_src, out.join(types_include_src))?;
}
}

if let [(_name, file)] = &input[..] {
Expand Down

0 comments on commit 2335e04

Please sign in to comment.