Any one using pants plugins not in-repo on a more ...
# development
c
Any one using pants plugins not in-repo on a more recent pants version? It seems to have been broken since `2.18.0`: https://github.com/pantsbuild/pants/issues/21050#issuecomment-2165039127
I started chasing a red herring first, where the pip error message led me to believe there was a constraint conflict, when in fact it was a missing/unknown distribution. (full history on the ticket)
n
I opened a similar issue a while back, though never got around to dig deeper and figure out the root cause. Instead I worked around it by removing
pants_requirements()
from my not in-repo plugin’s BUILD before packaging and publishing it. https://github.com/pantsbuild/pants/issues/20729
✔️ 1
c
thanks. I was so surprised if I would've been the first one to run into this.
So, the crux is that when resolving plugins, it's done in a venv that doesn't have pantsbuild installed already, and furthermore, doesn't provide
--find-links
to pip to the
<http://wheels.pantsbuild.org|wheels.pantsbuild.org>
wheel house. I see two options to solve this: either provide
--find-links
(the easy one), or resolve plugins in a venv where pantsbuild already is present (which seems to be the more correct/efficient approach).
w
Where specifically do you run into the problem? I have ... many... in(-and-out-of)-repo plugins - but they haven't broken during execution. Was it during a specific goal?
n
It’s for out-of-repo plugins 🙂
w
Yeah, I've got a plugin repo, where I've published a plugin - and am consuming it later. Doh - typo
c
It's during plugin resolution when booting pants, so any goal. even
pants -V
does your plugins use
pants_requirements
? meaning, do they have a
Requires-Dist: pantsbuild.pants==X
in their METADATA?