https://pantsbuild.org/ logo
#development
Title
# development
h

hundreds-father-404

04/27/2020, 12:56 AM
For Pants to be truly extensible even more extensible, I think we’ll need a mechanism to deregister rules? Lets say you don’t like how Pants’ builtin rule works for prepare_python_sources. (Maybe you want to disable injecting missing
__init__.py
files, for example). You want to use all of the core Python implementation, but want to swap out the rule that goes from
ImportablePythonSourcesRequest -> ImportanlePythonSources
with your own with the same signature. You can’t just make your own due to ambiguity, you need to first deregister the core rule. We allow this type of extensibility with the Target API, but not yet the Rules API. Should be very trivial to implement. Main questions are a) do we indeed want this, and b) how do we expose it?