witty-crayon-22786
04/24/2020, 3:49 PMaloof-angle-91616
04/24/2020, 3:51 PMwitty-crayon-22786
04/24/2020, 5:29 PMhundreds-father-404
04/27/2020, 12:56 AM__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?aloof-angle-91616
04/27/2020, 1:00 AMaloof-angle-91616
04/27/2020, 1:00 AMaloof-angle-91616
04/27/2020, 1:01 AMaloof-angle-91616
04/27/2020, 1:03 AMaloof-angle-91616
04/27/2020, 1:04 AMaloof-angle-91616
04/27/2020, 1:05 AMrules.py
OR in the rust code (@witty-crayon-22786 has convinced me that it's often a great idea to keep meta-logic like this in python whenever possible) to then say "if the subject is an A, and B is within the required path, use my new rule instead"aloof-angle-91616
04/27/2020, 1:06 AMaloof-angle-91616
04/27/2020, 1:06 AMhundreds-father-404
04/27/2020, 1:07 AMaloof-angle-91616
04/27/2020, 1:07 AMaloof-angle-91616
04/27/2020, 1:07 AMaloof-angle-91616
04/27/2020, 1:08 AMrules.py
or around therealoof-angle-91616
04/27/2020, 1:13 AMaloof-angle-91616
04/27/2020, 1:13 AM@rule
methods as public (without underscores), unlike bazel, which does the exact oppositealoof-angle-91616
04/27/2020, 1:14 AMaloof-angle-91616
04/27/2020, 1:14 AMaloof-angle-91616
04/27/2020, 1:15 AMaloof-angle-91616
04/27/2020, 1:17 AMaloof-angle-91616
04/27/2020, 1:21 AMhundreds-breakfast-49010
04/27/2020, 4:36 AMhundreds-breakfast-49010
04/27/2020, 4:37 AMhundreds-breakfast-49010
04/27/2020, 4:37 AMwitty-crayon-22786
04/27/2020, 5:37 AMhundreds-breakfast-49010
04/27/2020, 3:10 PMwitty-crayon-22786
04/27/2020, 5:19 PMhundreds-father-404
04/27/2020, 8:23 PM