Does anyone have any suggestions for resolving thi...
# general
f
Does anyone have any suggestions for resolving this error? Command:
Copy code
pants tailor check ::
What I tried: Updating
pants.toml
like so (based on another thread)
Copy code
build_ignore = [
   'cookiecutter/',
   '\{\{cookiecutter.project_slug\}\}',
]

[tailor]
ignore_paths = [
   'cookiecutter/',
   '\{\{cookiecutter.project_slug\}\}',
]
Error:
Copy code
Engine traceback:
  in `tailor` goal

IntrinsicError: Could not parse glob exclude pattern `"cookiecutter/cloud_function/{{cookiecutter.project_slug}}/*_test.sh"`: Glob { glob: Some("cookiecutter/cloud_function/{{cookiecutter.project_slug}}/*_test.sh"), err: "nested alternate groups are not allowed"
Resolution: Problem was with the 'ignore' option 🤦🏻‍♂️- needed to use
pants_ignore
not
build_ignore
or
ignore_paths
- the following seems to work (at least to avoid throwing the glob error)
Copy code
pants_ignore = [
   "cookiecutter/",
]
a
So double backslashes, single quotes. I'm not sure about toml escaping, I absolutely hate everything about it, but worth a try
f
Thanks for the suggestion! Yeah I tried that as well but I get the below error, so I had switched to single quotes
Copy code
IntrinsicError: Could not parse glob exclude pattern `"\\\\{\\\\{cookiecutter.project_slug\\\\}\\\\}"`: Glob { glob: Some("\\\\{\\\\{cookiecutter.project_slug\\\\}\\\\}"), err: "nested alternate groups are not allowed" }
a
You mean single backslashes?
f
My bad - yes single backslashes
a
We just ignore the template directory altogether, but I don't think I've ever personally used cookiecutter, and we never use tailor anyway, so can't really help more, sorry
I'd try to see how toml interprets that string, maybe that'll give you a hint.
f
Oh all good, I appreciate the help, thanks! How do you ignore the template directory? That's what I was trying to do but couldn't figure out a way. I'm not committed to cookiecutter if you have another project scaffolding tool you like as well?
a
Our project scaffolding strategy is "copy another app/lib that looks like it might be similar" 😄
And, we just have
Copy code
build_ignore = ["/cookiecutters/"]
🙏 1
f
Haha gotcha, fair enough! Ok great - thanks for sharing that with me! Very helpful to know what other folks do
a
We do have some cookiecutter templates for common apps, but I think maybe just a couple of teams use them.
We have a very brute force approach to pants, in general. 😞
f
Hey as long as it works! I'm still trying to navigate the config 😅