<@U04S45AHA> before you head out, any thoughts if ...
# development
@enough-analyst-54434 before you head out, any thoughts if
should be a global option vs. per-resolve for local requirements?
I haven't put much time yet into thinking through how users will use this, and am trying to not work more tonight. But wanted to see if you had feedback before being OOO. No worries if not
I doubt it's an option at all. I think all cases are derived from
file:// URLs or else local project paths.
Maybe I'm misunderstanding something, but the path mapping values have to be specified in an option somehow, no? Pants has to tell Pex which paths in file:// URLs or local project paths to substitute for names when creating the lockfile, and that info has to come from the user? Or is the suggestion that we automatically detect local paths and give them names based on... something?
👍 1
The latter. It's not clear the names matter if a machine can compute / set them.
As far as what to base names on, find links could just be the build-root relative path of the find links absolute path and local projects could be pre-built by pants with --intransitive to get their project name ... for example. The main thing though is that to check in a useable Pants config it, by necessity, must refer either to fixed absolute paths, say
in which case no path mapping is needed and the absolute path is appropriate to store in pants.toml or lock files or else they must be relative to the repo root in which case Pants has an appropriate name, the relative path. In the local project case my suggestion of going a step further and extracting a project name from the distributon is just an example of going firther to make things more "friendly".
Just because Pex added support for storing an optional description, doesn't need Pants needs to use that.
The key thing though is not what I think, but working through real scenarios in a sample repo. I think doing the homework to make sure this has the right ergonomics is, as always, the only real answer. That cuts past words and opinions for the most part and makes you confront reality as a user.
👍 1