Replies: 1 comment 4 replies
-
I think that this could be solved by adding a module to the registry that allows optional capabilities (im avoiding the term feature here as it has a different meaning within Bazel) to be registered and marked as required via a module extension. Modules could use the extension to indicate that they optionally provide a certain capability (e.g. curl could register This should even suffice to implement https://docs.google.com/document/d/132vEDnQZY0PtF9ko6HoLQ2dqk6meZnSrUfc1gsKuBkk/edit?usp=drivesdk: rules_cc could just offer capabilities that enumerate the C++ standards and in the end choose the highest one that has been required. |
Beta Was this translation helpful? Give feedback.
-
While this may apply to any use of bazel, it is particularly relevant in the context of dependencies on third-party libraries.
libcurl, for example, has many optional features that must be enabled at build time, such as support for http2 or brotli/zstd content-encoding.
This could be done with build_setting, but then all required options are essentially the responsibility of the top-level project. There is no good way for a library to say that it needs libcurl with http2 support. While a transition would sort of allow that, what we want is to build a single copy of curl with all of the required features, not multiple copies of curl with different sets of features.
See discussion on slack: https://bazelbuild.slack.com/archives/C014RARENH0/p1702790320489509?thread_ts=1702671095.223429&cid=C014RARENH0
Beta Was this translation helpful? Give feedback.
All reactions