hedronvision / bazel-compile-commands-extractor

Goal: Enable awesome tooling for Bazel users of the C language family.
Other
659 stars 109 forks source link

.o files appear in the current directory #187

Open laurentlb opened 4 months ago

laurentlb commented 4 months ago

I've just tried this tool and it works well. Thanks a lot for your work!

However, when I run the command bazel run @hedron_compile_commands//:refresh_all, it adds lots of .o files in the current (workspace root) directory, as well as the compile_commands.json file. Is it a know issue? Am I doing something wrong?

MODULE.bazel:

bazel_dep(name = "hedron_compile_commands", dev_dependency = True)
git_override(
    module_name = "hedron_compile_commands",
    remote = "https://github.com/hedronvision/bazel-compile-commands-extractor.git",
    commit = "a14ad3a64e7bf398ab48105aaa0348e032ac87f8",
)
cpsauer commented 3 months ago

Hi Laurent! Great to meet you--and honored you used this tool and by your kind words. Sorry to be slow in replying; got way backed up here.

Showing you with .o's is definitely not a known issue or desirable behavior. Thanks for reporting. Any idea what might be causing? Does it happen just running this tool on itself? (I'm trying to repro, but failing, sadly. Does sound like it could be a flag interaction issue with the header-finding code, maybe.)

Thanks again--and happy coding, Chris

cpsauer commented 2 months ago

@laurentlb, anything else I should know here?

Anyone else seeing this?

ollehu commented 4 weeks ago

@cpsauer We are also seeing both .o and .lst (list) files in the root directory after running :refresh_compile_commands. More specifically, they only show up when we manually build the targets beforehand and then generate the database, not when just generating the database after a bazel clean.

Did you manage to resolve this somehow @laurentlb ?