11/01/2021, 8:00 PM
I've brought this up many times, but it became stark yet again - target fields often only make sense in the context of the verbs that act on them:
Copy code
$ git diff src/python/pants/engine/
diff --git a/src/python/pants/engine/ b/src/python/pants/engine/
index 8798d9499..7d58329a1 100644
--- a/src/python/pants/engine/
+++ b/src/python/pants/engine/
@@ -588,7 +588,12 @@ class Target:
         return UnionRule(cls._plugin_field_cls, field)
     def validate(self) -> None:
-        """Validate the target, such as checking for mutually exclusive fields."""
+        """Validate the target, such as checking for mutually exclusive fields.
+        N.B.: The validation should only be of properties intrinsic to the associated files in any
+        context. If the validation only makes sense for certain goals acting on targets; those
+        validations should be done in the associated rules.
+        """
Its hard to predict what new rules may want to do with a target.