I recall an option related to nesting or linking p...
# general
g
I recall an option related to nesting or linking pants repositories, but I can't find any options related to this at all. Have I hallucinated that this should work?
1
I think I'm looking for the
subproject_roots
option. 🦆
f
What are you trying to do exactly? (I'm curious about options like this)
g
We have one open-source repository that currently uses PDM, and one closed-source repository with our related internal infra etc. This currently uses a git-link dependency to consume the open-source repository, which means that every change in the open repository blows out all caches due to the having to regenerate lockfiles. So we're now going to investigate switching the open-source repo to pants and consuming it as a submodule or subtree instead.
f
That makes sense. I wonder how this option works in practice. I've seen it before, but I've never used it, so I'm not sure how it works or what it does
c
I think you're right about
subproject_roots
. It's the only option I've heard of in this regard, and only once at that.
f
They don't seem to be used for anything in the code though https://github.com/search?q=repo%3Apantsbuild%2Fpants+subprojectroots&type=code
Oh I guess
AddressInput
uses it
I'm trying to interpret from the code how this is used, but I'll admit I'm losing the thread of what's happening here: https://github.com/pantsbuild/pants/blob/d7dff7a6580259bf993140c7581c5abae823820d/src/rust/engine/src/externs/address.rs#L152
Is there anyone that has some context on what
subproject_roots
are meant to be used for and how it's supposed to work? I'm trying it out and it doesn't seem to ... do anything? Like adding targets and stuff works normally. Maybe it trims addresses within the subproject relative to the subproject root?
c
I think address mangling is about as much as it does.. but I dunno 🤷