Using include-first in workspace members
Open
- Dominant language
- Rust
- Stars
- 3
- Forks
- 1
- PR merge metrics
- No merged PRs in 30d
Description
When building a workspace, the working directory during build will be root directory. When building member crates `src/{}` will point to `root/src/{}` instead of `root/member/src/{}` [here](https://github.com/google/include-first/blob/main/src/lib.rs#L50).
I suggest changing this line to something like this:
```rust
let filename = Path::new(&std::env::var("CARGO_MANIFEST_DIR").unwrap()).join("src").join(filename.trim_matches('"'));
```
`CARGO_MANIFEST_DIR` always points to the directory of the package currently being built.
Contributor guide
Assessment
This issue has not been assessed yet.