I'm just getting `ValueError: empty pattern` When ...
# plugins
a
I'm just getting
ValueError: empty pattern
When doing a
Get(TransitiveTargets, TransitiveTargetsRequest(...)
1
h
What is the fall line? I'm curious what goes inside the …
a
Ah.
TransitiveTargetsRequest([target])
on an airgapped PC, manually typing things
And this is on code that used to work. I'm just refactoring it. So not sure what i've not refactored properly
sorry, that's
target.address
h
OK good clarification, I was about to point out that that is fishy
So if you comment things out, you don't get the error?
a
yeah, if I put a breakpoint before the
Get
I get dropped into a debugger. I can step over the call and it errors. if I put a breakpoint after I get the error
not quite worked out how to post-mortem pants rules yet 😅
h
try using a request with an empty list
a
passes
👍 1
h
Is there more to the stack trace? Make sure that you have print stack traces enabled
a
ah ha. it's an error in Pathlib.
from*
L#88 in pants/source/source_root.py I can debug from here
❤️ 1
i think
h
Cool, definitely do let us know what happens. Sounds like this could be a bug and pants itself, which we would love to fix. What pants version is this?
a
2.10.0
ah, i've goofed my source roots
root_patterns=['./']
works without the
.
in there
h
That is a pants bug still, we should be eagerly validating this. We want it to be hard to make mistakes like this. Would you be willing to please open a ticket? (If you have any interest, a contribution would also be super appreciated)
a
cheers. Traceback helped.
yeah, will try to remember.
h
Thanks! https://github.com/pantsbuild/pants/issues/new/choose no need for a long description, sounds like a pretty self explanatory issue
a
no thank you!
hope you're feeling better after your accident
❤️ 1
h
Thanks! Way less pain now, major issue is having to live one-handed until at least April 20 for the follow up appointment. I am super grateful for modern life though, like dictation, frozen meals and floss picks 🙈
a
aha. glad to hear.
do you know of a simple use in the codebase of
SecondaryOwnerMixin
? I've got a case similar to a python entrypoint. target has dependencies. Target also has a 'src_file' field that references one of the files in it's source dependencies.
h
Look at pex binary. It is how we get file arguments working for it
We also use the entry point field from pex binary to do dependency inference