Convenience function for interacting with compile_commands_impl#145
Convenience function for interacting with compile_commands_impl#145nettle wants to merge 1 commit intoEricsson:mainfrom
Conversation
Why: Simplify integration src/compile_commands.bzl into src/per_file.bzl What: - Introduce get_compile_commands() function which returns only compile_commands.json File object and performs optional checks
| ), | ||
| ] | ||
|
|
||
| def get_compile_commands(ctx, check=True): |
There was a problem hiding this comment.
From what I can see, the only meaningful difference here and #141 is the check parameter. Why would ever want to skip these checks though?
There was a problem hiding this comment.
Getting files from DefaultInfo provider is a kind of common operation. Theoretically we can also get empty list or no list, and none of these is necessary a fail. That actually may apply to compile_commands.json file as well. We add checks only to handle our specific scenario. To be honest , generalizing this as a function does not look much useful to me.
Szelethus
left a comment
There was a problem hiding this comment.
Besides the check parameter, this was copy-pasted from codechecker.bzl. Please help me understand what specific concerns you have about not reusing this code?
Again, this is not a hill I intend to die on, and I'm fine to support a solution I understand, even if I disagree with it.
I actually do not see much use of this #145 as well as #141 :) |
|
It is still not clear to me why we can't modify I'm sure there is something I don't see that you do, and I'm eager to learn. Why can't the same logic from |
|
I'll put the PR in draft; we have more important issues to attend to now that #98 is unblocked. |
Why:
Simplify integration src/compile_commands.bzl into src/per_file.bzl
What:
Addresses:
Optional accessory to #98