Is there a way to prevent our pex-controlled lockf...
# general
c
Is there a way to prevent our pex-controlled lockfiles from locking deps for platforms we don't support (ie. i686, aarch64). We exclusively use x86_64, but I'm not seeing options that would let us restrict to that arch
h
I don’t think there is at the moment. I believe this would require plumbing
--platforms
and/or
--complete-platforms
through to
pex lock create
here
👍 1
c
Probably not worth it then. Just a minor performance and manual audit (of the lock file) nice-to-have
e
This would require Pex work. Pex already supports
--platforms
and
--complete-platforms
when creating locks as Benjy guessed, but, when
--style=universal
, which is true for all Pants use of Pex lock files, those platforms are just checked as a post-processing step after the lock is created. If they cannot resolve from the lock, the locking operation fails as a whole. With `--style={strict,sources}`then the platforms work as Benjy guessed and restrict to exactly those platforms passed in.
The pex work being, you want something in between the universal post process and the exact platform restriction. You want to use a piece of the platform - arch. Currently Pex has
--target-system
to filter on OS, which Pants uses to filter out windows currently. Pex would also need to supprt
--target-arch
for your use case @calm-ambulance-65371 afaict.