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

dry-analyst-73584

01/20/2022, 11:18 PM
Is there a specific backend I have to turn on to have tailor recognize .txt or .json files as resources? Or do I need to manually add buildfiles for those?
e

enough-analyst-54434

01/20/2022, 11:26 PM
Those are manual.
👋
d

dry-analyst-73584

01/20/2022, 11:26 PM
Thanks!
Is the syntax still something like:
Copy code
files(
  name = 'files',
  sources = rglobs('*.txt', '*.csv', "*.json"),
  scope="runtime",
)
e

enough-analyst-54434

01/20/2022, 11:28 PM
not quite - and not sure about scope, but source globs are now just strings:
Copy code
files(sources=["**/*.txt", "**/*.csv"])
And name is optional although that maybe is going away?
Its been a loooong road - we thrash on some things.
d

dry-analyst-73584

01/20/2022, 11:29 PM
All good 🙂 Thanks John!
e

enough-analyst-54434

01/20/2022, 11:30 PM
d

dry-analyst-73584

01/20/2022, 11:31 PM
Are resources still a thing?
h

hundreds-father-404

01/20/2022, 11:31 PM
If this is too tedious to manually work, it's not very much work to add your custom
tailor
plugin impleementation 🙂
👍 1
d

dry-analyst-73584

01/20/2022, 11:31 PM
Oh, I see them
Looking at the size of
src/resources
I may well do that 😂
any docs for that?
h

happy-kitchen-89482

01/20/2022, 11:59 PM
Related: there is work-in-progress for inferring resource deps - https://github.com/pantsbuild/pants/pull/14049
👍 1
Still requires tailoring though
d

dry-analyst-73584

01/21/2022, 12:02 AM
Maybe we will finally solve our src/resources hairball.
h

happy-kitchen-89482

01/21/2022, 12:31 AM
The nice thing about inferring deps is that it's more tolerant of hairballs, since it happens at the file level
2
5 Views