rules_rust icon indicating copy to clipboard operation
rules_rust copied to clipboard

Deprecate `rust_toolchain.target_json`

Open UebelAndre opened this issue 3 years ago • 2 comments

There have been a couple of cases where the functionality added in https://github.com/bazelbuild/rules_rust/pull/836 to teach rust_toolchain to handle json files which represent fine grain information about platform triples has caused confusion or a gap in information in "starlark-land" when writing rules. A common issue is that while you can use target_json, you still need to provide os and in some cases, a "most similar" target_arch but that can differ from what target_json actually represents. Instead of supporting either a json or explicitly defined values, I think everything should be written to the toolchain. For folks who still want to use a json file to represent their platform triples, I suggest a repository rule be updated or introduced to allow translating the json file into explicit values available in "starlark-land".

UebelAndre avatar Jul 10 '22 22:07 UebelAndre

cc @hlopko

UebelAndre avatar Jul 10 '22 22:07 UebelAndre

cc @krasimirgg

hlopko avatar Jul 11 '22 07:07 hlopko