bazelbuild / bazel

a fast, scalable, multi-language and extensible build system
https://bazel.build
Apache License 2.0
23.07k stars 4.04k forks source link

configuration_field needs a warning not to use and a link to an example of using build settings #11309

Open laurentlb opened 4 years ago

laurentlb commented 4 years ago

https://docs.bazel.build/versions/3.1.0/skylark/lib/globals.html#configuration_field

We need a longer example of use. It should be put in https://github.com/bazelbuild/examples/tree/master/rules with a link in the documentation (so that we can easily test and maintain the snippet).

katre commented 4 years ago

@gregestren: Do we want to keep this available? I'd argue that we don't want to document it, as we don't want people using it.

laurentlb commented 4 years ago

Alternatively: document that you don't want people to use it

juliexxia commented 4 years ago

Yeah, this should be replaced by people using label-typed build settings: https://docs.google.com/document/d/1vc8v-kXjvgZOdQdnxPTaV0rrLxtP2XwnD2tAZlYJOqw/edit?pli=1#bookmark=id.22i50t6u7ub7

I think the TODOs here are really to deprecate configuration_field and add a link to an example about how to use label-typed build settings instead. Not sure if I have the bandwidth to deprecate configuration_field right at this second but can add an warning/example as part of my example sweep from the fixit.

juliexxia commented 4 years ago

I changed the name to reflect! Let me know if that direction doesn't seem right.

juliexxia commented 3 years ago

(Context: I'm moving on from Bazel on friday and spending some time triaging all bugs assigned to me before unassigning myself)

Yes this should still happen. Label-typed build settings should be able to deprecate configuration field since they fulfill the same purpose. Here's an e2e example of using label-typed build settings, it can probably be amended briefly to document an equivalent configuration_field so folks have an easy before and after

keertk commented 1 year ago

Docs moved here