Closed dvsorokin closed 3 years ago
Bazel/C++: Generate Compilation Database fails with the error:
INFO: Invocation ID: 58786031-b770-44b5-a91f-342266d84192 ERROR: /bazel/cache/my_project/25a3c77a065e294bcbb59ec17782c259/external/bazel_vscode_compdb/aspects.bzl:329:19: name 'json' is not defined ERROR: Extension 'aspects.bzl' has errors ERROR: Analysis of aspect '@bazel_vscode_compdb//:aspects.bzl%compilation_database_aspect of //path_to_my_target' failed; build aborted: Extension 'aspects.bzl' has errors INFO: Elapsed time: 0.203s INFO: 0 processes. INFO: Build Event Protocol files produced successfully. The terminal process "bash '-c', 'bazel build --override_repository=bazel_vscode_compdb=/home/oper/.vscode-server/extensions/stackbuild.bazel-stack-vscode-cc-1.1.2/compdb/ --aspects=@bazel_vscode_compdb//:aspects.bzl%compilation_database_aspect --color=no --noshow_progress --noshow_loading_progress --output_groups=compdb_files,header_files --build_event_json_file=/tmp/tmp-5392-5LoJNl1KOOTa --config=local //path_to_my_target && /home/oper/.vscode-server/extensions/stackbuild.bazel-stack-vscode-cc-1.1.2/compdb/postprocess.py -b /tmp/tmp-5392-5LoJNl1KOOTa && rm /tmp/tmp-5392-5LoJNl1KOOTa'" terminated with exit code: 1.
What am I doing wrong?
I just ran into the same issue. Is this issue solved? @dvsorokin
No, unfortunately
You should update Bazel version. Not sure, which version if sufficient, but on Bazel 3.7.1 I faced the same issue.
Bazel/C++: Generate Compilation Database fails with the error:
INFO: Invocation ID: 58786031-b770-44b5-a91f-342266d84192 ERROR: /bazel/cache/my_project/25a3c77a065e294bcbb59ec17782c259/external/bazel_vscode_compdb/aspects.bzl:329:19: name 'json' is not defined ERROR: Extension 'aspects.bzl' has errors ERROR: Analysis of aspect '@bazel_vscode_compdb//:aspects.bzl%compilation_database_aspect of //path_to_my_target' failed; build aborted: Extension 'aspects.bzl' has errors INFO: Elapsed time: 0.203s INFO: 0 processes. INFO: Build Event Protocol files produced successfully. The terminal process "bash '-c', 'bazel build --override_repository=bazel_vscode_compdb=/home/oper/.vscode-server/extensions/stackbuild.bazel-stack-vscode-cc-1.1.2/compdb/ --aspects=@bazel_vscode_compdb//:aspects.bzl%compilation_database_aspect --color=no --noshow_progress --noshow_loading_progress --output_groups=compdb_files,header_files --build_event_json_file=/tmp/tmp-5392-5LoJNl1KOOTa --config=local //path_to_my_target && /home/oper/.vscode-server/extensions/stackbuild.bazel-stack-vscode-cc-1.1.2/compdb/postprocess.py -b /tmp/tmp-5392-5LoJNl1KOOTa && rm /tmp/tmp-5392-5LoJNl1KOOTa'" terminated with exit code: 1.
What am I doing wrong?