kumar8600 / flycheck-clangcheck

A Flycheck checker difinition for ClangCheck.
11 stars 7 forks source link

Problematic issues with build directories #1

Open stsquad opened 9 years ago

stsquad commented 9 years ago

Due to the way the builder works around calling clang-check directly it will get confused by not being in the right build directory (e.g. in QEMU it fails to find config-target.h which is in the target build directory). I'm working on a fix to pass the build directory as an option.

stsquad commented 9 years ago

After a bunch of experimentation this seems tricky to solve. In my version of the checker I had simply used source-original and relied on a :predicate to ensure we had saved the buffer. Then clang-check could be called normally and resolve everything. Because we are trying to maintain the on-the-fly checking we need to somehow ensure clang-check is called in the build-directory referenced in compile_commands.json. Maybe this means messing with default-directory while building up the command unless there is someway to define a prequel set of commands before running the checker.

Sarcasm commented 9 years ago

FYI, in irony-mode I use the -working-directory DIR compile option for the compile_commands.json's directory. I don't remember this ever being an issue.

stsquad commented 7 years ago

I have a feeling newer clang-checks are much better at picking up compile_commands.json. I'm trying to find out when this changed because I could remove a lot of the parsing junk if that is the case.