rules_rust icon indicating copy to clipboard operation
rules_rust copied to clipboard

Remove conditional attribute switch from rules_rust

Open buildbreaker2021 opened this issue 1 year ago • 0 comments

Currently Bazel is using native CcToolchainInfo - meaning Java implementation of the provider. There is an ongoing effort to rewrite provider in Starlark. Once that happens and Bazel knows of Starlark version of the provider remove conditional switch so that it always points to Starlark attribute. So instead of:

  if hasattr(cc_toolchain, "_linker_files"):
      linker_depset = cc_toolchain._linker_files
  else:
      linker_depset = cc_toolchain.linker_files()

We would have:

linker_depset = cc_toolchain._linker_files

buildbreaker2021 avatar Jan 16 '24 15:01 buildbreaker2021