Fix C++20 modules compilation failing during analysis#775
Conversation
Building any target with the cpp_modules feature failed at analysis time
with:
parameter 'needs_include_validation' got value of type 'NoneType', want 'bool'
_create_scan_deps_action called _create_compile_action without passing
needs_include_validation, so it defaulted to None and was rejected by
create_cc_compile_action. Pass it through.
The module-compile path then failed analysis as well, because
_create_compile_action did not accept the C++20 module output/modmap
arguments (additional_outputs, module_files, modmap_file,
modmap_input_file) that its caller already passes:
_create_compile_action() got unexpected keyword arguments: ...
Accept and forward them.
Fixes bazelbuild#773
|
@PikachuHyA Could you give this a try? |
@fmeum it works . thanks. |
|
Can we add a CI job with Ubuntu 24.04 (Ubuntu 26.04 would be better) and Bazel 9 to watch over the C++20 Modules-related features, so that they don’t break by accident during refactoring? Also, I’m continuing to improve Bazel’s support for C++20 Modules, such as
. If we have a related CI job to keep an eye on it, it would make things easier for reviewers. |
|
Sorry for not seeing this earlier; I was out of office and didn't notice an issue until the bazel team complained. |
|
@lilygorsheneva What about this snippet? Isn't something like this needed as well? |
|
If you mean |
|
Ah, no, I'm referring to these extra parameters: that weren't passed on correctly. Perhaps that part of my PR is still needed? |
Building any target with the cpp_modules feature failed at analysis time with:
_create_scan_deps_actioncalled_create_compile_actionwithout passingneeds_include_validation, so it defaulted toNoneand was rejected bycreate_cc_compile_action. Pass it through.The module-compile path then failed analysis as well, because
_create_compile_actiondid not accept the C++20 module output/modmap arguments (additional_outputs,module_files,modmap_file,modmap_input_file) that its caller already passes:Accept and forward them.
Fixes #773