stackb / bazel-stack-vscode-cc

C/C++ Support For Bazel Stack VSCode Extension
Apache License 2.0
31 stars 7 forks source link

Get CompileCommands from namedSetOfFiles #12

Closed wannesvanloock closed 2 years ago

wannesvanloock commented 2 years ago

This fixes #11. For multiple target the original stderr approach does not seem to work. I noticed the same info was present in the namedSetOfFiles entries in the build event json file. I don't know why the original approach fails though.

lucabergamini commented 2 years ago

@pcj FYI

pcj commented 2 years ago

Actually I think https://github.com/stackb/bazel-stack-vscode-cc/pull/13 is a more simple fix. For example, I always use a remote cache, and as such this would be a breaking change.

pcj commented 2 years ago

Parsing the namedSetOfFiles may be the most generic approach here, but I think in order to make it work with remote cache, the namedSetOfFiles need to be mapped back the correct output group of the generating target, and then also be able to download from bytestream URLs (which requires a gRPC bytestream client, which is possible to write but would significantly increase the number of dependencies needed for this extension).

wannesvanloock commented 2 years ago

Thanks for having a look and fixing in another way!