I have a cc\_library that is header-only. Whenever I try to compile such library by itself, it won't actually compile anything. I purposely put some errors to try to get such errors on compilation, but bazel doesn't actually compile anything. Here's a small example.

```cpp
// test.h

This should not compile fdsafdsafdsa
int foo() { return 1; }

```

```py
# BUILD

cc_library(
  name = 'test',
  hdrs = ['test.h']
)

```

```
// bazel build :test
INFO: Analyzed target //:test (2 packages loaded, 3 targets configured).
INFO: Found 1 target...
Target //:test up-to-date (nothing to build)
INFO: Elapsed time: 0.083s, Critical Path: 0.00s
INFO: 0 processes.
INFO: Build completed successfully, 1 total action

```

Is this behavior intended?

I also ran the same experiment but splitting the .h and .cc files, and in that case, I got the error when I compiled.