> [WARN] DEPRECATED: indirectly referring to a ...
# general
h
[WARN] DEPRECATED: indirectly referring to a target by using a corresponding file argument, when the target owning the file isn't applicable is scheduled to be removed in version 2.18.0.dev1
What's the background on this one? I find it incredibly convenient to not have to remember what the target address is in the build file.
b
This is specifically when running
package path/to/file.py
(or it should be! 😅 )
h
This came up for us running
pants run path/to/file.py
And I think it's because we have the
python_sources
(obvi) and a
pex_binary
So maybe there was some ambiguity there
I removed the
pex_binary
since it wasn't needed, though.
b
What version is this?
h
2.17.0 😎
b
😬
Ummmmmmmmmm this is likely a showstopper
CC @happy-kitchen-89482
h
Things worked fine with the warning fwiw
b
I'm not 100% sure how we'd fix this either.
run
is special in that it only ever expects to match one target. The core code this warning gets raised from doesn't know what context it's being called from though
That's not true, we could easily add a new parameter to
TargetRootsToFieldSetsRequest
😮‍💨 I'll go ahead and fix this on 2.17.x. Then @happy-kitchen-89482 @witty-crayon-22786 we should probably discuss somewhere what to do next
👍 1
w
oy. that deprecation has been a pain in the butt. thanks Josh: it should be worth it!
🤮 1
b