Repository navigation
[capture] report failed compilation database commands under --keep-going - #2316
Open
VladimirMakaev wants to merge 1 commit into
Open
VladimirMakaev wants to merge 1 commit into
VladimirMakaev wants to merge 1 commit into
Conversation
With `--keep-going`, Infer logged a failed compilation database command at debug level only. The compiler's own errors reached the console, mixed into the progress output, but the run exited 0 with no summary of how many files were lost or captured partially, or which ones. ```sh # compile_commands.json: a.c compiles, the command of b.c has an unknown flag infer --keep-going --compilation-database compile_commands.json # before: exit code 0; only clang's own errors, mixed into the progress output, show # that b.c was lost # now: WARNING: 1 of 2 compilation commands failed, starting with the one for b.c. ``` The warning gives the number of failed commands and the first failing file in database order, and points to the logs file, which still has the errors of each command. The count is also logged in the stats as `count.capture.failed_compilation_commands`. ## Test plan New build_systems test `clang_compilation_db_failures`: one file compiles, one has a syntax error (captured partially), and the command of one has an unknown flag (not captured). It checks the warning and the issues. The codetoanalyze tests pass.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
With
--keep-going, Infer logged a failed compilation database command at debug level only.The compiler's own errors reached the console, mixed into the progress output, but the run
exited 0 with no summary of how many files were lost or captured partially, or which ones.
The warning gives the number of failed commands and the first failing file in database order,
and points to the logs file, which still has the errors of each command. The count is also
logged in the stats as
count.capture.failed_compilation_commands.Test plan
New build_systems test
clang_compilation_db_failures: one file compiles, one has a syntax error(captured partially), and the command of one has an unknown flag (not captured). It checks the
warning and the issues. The codetoanalyze tests pass.