facebook / facebook/buck2

Buck not isolating the compiler process

Open
#225 11 comments 2 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
4.4k
Forks
394
PR merge metrics
No merged PRs in 30d

Description

The compiler process seems to be able to find headers that are not listed as dependencies. Is this expected?

My test case is thus:

```cpp
// hello.cpp
#include
#include "bad.h"

int main() {
printf("Hello World!\n");
return 0;
}

// bad.h

// A commented-out syntax error!
```

And a simple BUCK build script:
```python
cxx_binary(
name="hello",
srcs=["hello.cpp"],
link_style='static'
)
```

As you can see, I have forgotten to list `bad.h` as a dependency.

buck2 will happily compile this and if `bad.h` is changed, it will not recompile anything.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.