Open axbycc-mark opened 7 months ago
I have a similar issue, but it was due to some .d
files are not in the expected format of target.o: dependencies
.
In my case, a library has a .d
file like:
-no-canonical-prefixes: external/s2n~/crypto/s2n_aead_cipher_aes_gcm.c \
external/openssl~/include/openssl/aes.h \
After reading that part of the code, it seems the target
is unused, so I commented out the assert
from the template file. The command works after the fix.
I'm using the cuda_rules https://github.com/bazel-contrib/rules_cuda project to generate a cuda_library target. Running :refresh_all triggers the assert here https://github.com/hedronvision/bazel-compile-commands-extractor/blob/4689147cf4b1c2d507fd8bbb8eb748a7bbaad4ef/refresh.template.py#L176C45-L176C102.
The function documentation mentions this clang or gcc.
Parse a set of headers from the contents of a
*.ddependency file generated by clang (or gcc)
On my system, it is somehow encountering an nvcc generated file, erroring out with the following.
Commenting out the assert, and just returning empty set() here allows the :refresh_all to seemingly generate a correct (or at least very usable) compile_commands.json.