enough-analyst-5443411/01/2021, 8:00 PM
Its hard to predict what new rules may want to do with a target.
$ git diff src/python/pants/engine/target.py diff --git a/src/python/pants/engine/target.py b/src/python/pants/engine/target.py index 8798d9499..7d58329a1 100644 --- a/src/python/pants/engine/target.py +++ b/src/python/pants/engine/target.py @@ -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. + """ @dataclass(frozen=True)