https://pantsbuild.org/ logo
#development
Title
# development
@enough-analyst-54434 I'm not following what the edge case is that Poetry can't handle? (new thread to avoid adding piling onto that convo)
e

enough-analyst-54434

08/09/2021, 7:02 PM
Presumably poetry does not know to restrict a lockfile to wheels only when a Pex --platform is involved.
I'm poetry doing a resolve for a Pex binary lockfile that uses platforms - Pants needs to tell me "wheels only" if there is a way to do that.
✔️ 1
Other wise the lock might include version that only have sdists and boom.
So we need to handle this or else say we can't in clear docs / error message and suggest? I don't know as a work around.
h

hundreds-father-404

08/09/2021, 7:05 PM
Ah, thanks for clarifying. Good point! I'll investigate
e

enough-analyst-54434

08/09/2021, 7:06 PM
The whole idea of using a different resolve algorithm seems like a world of hurt and confusion - but maybe things line up enough to be ok in a muddly way?
h

hundreds-father-404

08/09/2021, 7:32 PM
Yeah I don't like using a new algorithm by any means, which was I didn't originally spend much time investigating Poetry. That's fundamentally concerning that a lockfile generated by Pants via
./pants lock
may not actually work when then consumed by Pants One thing that reduces risk is Poetry is solely used for the lockfile generation, meaning that we have an escape hatch. If it generates a lockfile incompatible w/ Pex/pip, users can manually update the requirements.txt-style lockfile. Not ideal, of course
I think you were OOO when I asked in upstream GitHub issue. How much time/work do you think it would take to have Pex robustly generate lockfiles? Some of the things I think we'd need for Pants's lockfile project to be complete • robustly handle env markers, even if they're for environments different than the host. • even if Pex uses PEP 665, it can export to requirements.txt for consumption by external tooling like IDEs • don't install the wheels when locking (for perf) • include hashes for all files that may be used in different environments (ik you have concerns about that - I think we need to at least feature gate it)
e

enough-analyst-54434

08/12/2021, 3:56 AM
I can only estimate it'll take a solid day or so to think and detail enough to come up with a non-handwave estimate. So, expect some useful words by Friday evening.