Replace the deprecated C++ compiler marker with None - #808
Conversation
There was a problem hiding this comment.
Don't think we need to test for this.
Also; it appears we have a few (<5) files still checking this; should clean them up first.
There was a problem hiding this comment.
Are these internal usages? I didn't see them in this repo. (I did see https://github.com/protocolbuffers/protobuf/blob/b790ca9a4b222070d1d7cdf93c980ddeae8a55aa/build_defs/compiler_config_setting.bzl#L5-L25 and things like that but I think they will continue to work as they did, even with the None-valued attr?)
There was a problem hiding this comment.
Good point, it's void type on the Java side already and most of the checks are hasattr (a few test environments mock it out as True for some reason and were came up before the usages in my searches, I didn't look closely enough).
Replace the Java-backed cc_common.do_not_use_tools_cpp_compiler_present marker with its existing Starlark value, None. Bazel declares the deprecated marker as a Java void struct field, so preserving the exported field with None removes the Java dependency without changing compatibility.
Validation: buildifier -mode=check and 24 passing //tests/cc/common:cc_common_tests cases.