Is there a specific backend I have to turn on to h...
# general
d
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
Those are manual.
👋
d
Thanks!
Is the syntax still something like:
Copy code
files(
  name = 'files',
  sources = rglobs('*.txt', '*.csv', "*.json"),
  scope="runtime",
)
e
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
All good 🙂 Thanks John!
e
d
Are resources still a thing?
h
If this is too tedious to manually work, it's not very much work to add your custom
tailor
plugin impleementation 🙂
👍 1
d
Oh, I see them
Looking at the size of
src/resources
I may well do that 😂
any docs for that?
h
Related: there is work-in-progress for inferring resource deps - https://github.com/pantsbuild/pants/pull/14049
👍 1
Still requires tailoring though
d
Maybe we will finally solve our src/resources hairball.
h
The nice thing about inferring deps is that it's more tolerant of hairballs, since it happens at the file level
2