Hi friends! this is most likely a lazy question bu...
# general
w
Hi friends! this is most likely a lazy question but, we just migrated a part of our build flow from v1 -> v2 and have started to receive an error when there are no targets that match the given rule, anyway to ignore that error? Example error in thread
Copy code
pants.engine.target.NoValidTargetsException: The `publish` goal only works with the following target types:
  * python_binary
  * python_dist
  * python_grpcio_library
  * python_library
  * python_tests
  * python_thrift_library

You specified ``, which only included the following target types:
  *
h
Yes, are you using
TargetsToValidFieldSetsRequest
still? Set
error_if_no_valid_targets=False
w
let me check!
wowowow so simple
😄 1
thanks eric
❤️ 1
h
(This is an example of why we’re so giddy about the Rules API. It makes it easy to factor out common functionality like this
TargetsToValidFieldSetsRequest
thing, while getting caching and parallelization for free)