https://pantsbuild.org/ logo
#general
Title
# general
l

loud-laptop-17949

10/26/2022, 6:23 PM
Does anyone know if there is a way to turn on unmatched_build_file_globs=warn per-target? I want this because I am trying to normalize our use of python_test_utils (to use it in every test directory), but many directories do not (yet) have a file matched by one of the file globs.
b

bitter-ability-32190

10/26/2022, 6:24 PM
I don't think so, not today.
h

hundreds-father-404

10/26/2022, 6:27 PM
I think someone may have opened a ticket proposing this
l

loud-laptop-17949

10/26/2022, 6:28 PM
w

witty-crayon-22786

10/26/2022, 6:28 PM
are you all using
tailor
to create those targets? it should automatically create the
python_test_utils
if you need them
(and not create them if you don’t)
l

loud-laptop-17949

10/26/2022, 6:29 PM
yeah we currently have
python_sources
in a bunch of places where it should be
python_test_utils
. I tink most of those were from before
python_test_utils
existed.
so all the files are currently covered by a target, I just watch to switch which target covers them
👍 1
e

eager-dress-66405

10/27/2022, 6:11 AM
I think tailor still creates
python_sources
targets for most of these. It correctly makes a
python_test_utils
for
conftest.py
etc, but most of the files we're talking about here are just regular python modules that happen to live under a
tests
directory (the convention in our codebase) and are only imported from actual tests.
I was hoping that there was something stopping
python_sources
from depending on
python_test_utils
, but I don't actually see that documented on https://www.pantsbuild.org/docs/reference-python_test_utils. They also show as
python_sources
when using
./pants peek
or
--filter-target-type
. It would be nice is there was some way to differentiate these when querying pants.
5 Views