Add option tagging and categorizing enums.

Begin work of transferring option categorization to a sustainable, documented setup.

DocumentationCategories will replace the existing string category field, and will group flags in generated documentation. Each flag must belong to exactly 1 DocumentationCategory, whichever is most applicable or a new one.

OptionEffectTags will document the effects of tags and will be used for filtering flags. These tags, unlike the categories, should be complete. All options that do affect Bazel's output should be tagged as affecting Bazel's output, for example. This is necessary for them to be useful when trying to isolate the cause of an issue or behavior by allowing irrelevant options to be filtered out. Each flag must have at least 1 intended behavior, so should have 1+ OptionEffectTag. If no effect tag applies, find a general tag that would apply and add it to all relevant options.

OptionMetadataTags will hold information about the flag itself. Information about the lifecycle of a flag, for example, should belong in an OptionMetadataTag. It is useful for filtering, since it describes how trustworthy we might think the flag would be, but does not actually describe the “intent” or “meaning” of a flag. This can be an empty list, but options can also have multiple OptionMetadataTags

All options will be switched from the old "category" field to this new system. A few general OptionsBases are provided as an example.

PiperOrigin-RevId: 160180328
GitOrigin-RevId: e73f881b66e5540051f92f8ffab5570b6856fea8
Change-Id: I607f9bce70aa841e2f46510d2fac368a29e35453
2 files changed
tree: 979794944a4fb1cd68fe2b2db645174c3f04d727
  1. java/