Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow requesters of
TargetRootsToFieldSets
to turn off the secondar…
…y ownership warning (Cherry-pick of #19721) (#19734) This change adds `warn_on_deprecated_secondary_owner_semantics` to `TargetRootsToFieldSets` (defaulting to `True`) and then has `run` set it to `False` (since `run` does its own filtering). The other (non-`run`) goals that request this type are `deploy`, `package`, `publish`, and `test`. All of which should be operating on multiple targets, and therefore should issue the warning. Before: ```console josh@cephandrius:~/work/pants$ pants run build-support/bin/terraform_tool_versions.py 14:45:12.64 ^[[33m[WARN]^[[0m DEPRECATED: indirectly referring to a target by using a corresponding file argument, when the target owning the file isn't applicable is scheduled to be removed in version 2.18.0.dev1. Refer to the following targets by their addresses: * build-support/bin:terraform_tool_versions ``` After: ```console josh@cephandrius:~/work/pants$ pants run build-support/bin/terraform_tool_versions.py ... (No warning) josh@cephandrius:~/work/pants$ pants package build-support/bin/terraform_tool_versions.py 14:45:12.64 ^[[33m[WARN]^[[0m DEPRECATED: indirectly referring to a target by using a corresponding file argument, when the target owning the file isn't applicable is scheduled to be removed in version 2.18.0.dev1. Refer to the following targets by their addresses: * build-support/bin:terraform_tool_versions ```
- Loading branch information