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

plain-night-51324

01/05/2023, 8:49 PM
is there a way to support wildcard when specifying files in
BUILD
and
dependencies
? I have a directory full of json, i had to specify each one using
file(name=.., source=..)
and then python tests I use all of these files, so I had a
dependencies=[…]
. tried wildcard in dependencies and got UnsupportedWildcardError
b

bitter-ability-32190

01/05/2023, 8:51 PM
Why not use a
files()
target with a wildcard in the
sources
field, then depend on that?
p

plain-night-51324

01/05/2023, 8:51 PM
ok i probably missed that, didn’t know it existed
b

bitter-ability-32190

01/05/2023, 8:52 PM
E.g.
Copy code
files(name="foo", sources=["*.json"])
python_test(name="bar", dependencies=[":foo"], ...)
🙌 1
2 Views