silly-queen-7197
03/06/2024, 11:53 PM#!/home/yjabri/.cache/nce/29319df9a6ca02e838617675b5b8dd7e5b18a393c27e74979823158b85c015d9/bindings/venvs/2.19.1/bin/python3.9 -sE
when I run cat bin/pants
in the created venv
which is 131 characters long meaning linux is going to cut off the -sE
making Pants run with all my env vars which makes pantsd invalidate on any code change. This has been fixed in Pex for some time now but hasn't been incorporated into Pants
Note I have
[pex-cli]
version = "v2.1.161"
known_versions =[
'v2.1.161|macos_arm64|5bb08a677d309889b3357cd23a3a95945a4c3438cfb00ece5291dcfe89221fcc|3675619',
'v2.1.161|macos_x86_64|5bb08a677d309889b3357cd23a3a95945a4c3438cfb00ece5291dcfe89221fcc|3675619',
'v2.1.161|linux_x86_64|5bb08a677d309889b3357cd23a3a95945a4c3438cfb00ece5291dcfe89221fcc|3675619',
'v2.1.161|linux_arm64|5bb08a677d309889b3357cd23a3a95945a4c3438cfb00ece5291dcfe89221fcc|3675619',
]
In my pants.toml
which doesn't solve the above problem*
Edit - This issue appears to be caused by using an older version of pex to generate the pants.pex file that gets released. Ultimately its fixed in the 2.20 releases so this isn't a big deal. A bunch of my coworkers unfortunately have the SHEBANG cut in other places leading to Exec format error
errors.silly-queen-7197
03/07/2024, 12:09 AM2.20.0rc0
fixes this as I get
#!/bin/sh
# N.B.: This python script executes via a /bin/sh re-exec as a hack to work around a
# potential maximum shebang length of 128 bytes on this system which
# the python interpreter `exec`ed below would violate.
''''exec /home/yjabri/.cache/nce/29319df9a6ca02e838617675b5b8dd7e5b18a393c27e74979823158b85c015d9/bindings/venvs/2.20.0rc0/bin/python3.9 -sE "$0" "$@"
'''
I'll wait for 2.20. Hopefully one day I can maybe help contribute a fix rather than just complain about it 😛silly-queen-7197
03/07/2024, 12:33 AM./pants package src/python/pants:pants-pex
runs during a release it creates the shebang with the new format.
It seems like this isn't worth the effort given 2.20 is around the cornerhappy-kitchen-89482
03/07/2024, 3:09 AMhappy-kitchen-89482
03/07/2024, 3:09 AMsilly-queen-7197
03/07/2024, 8:05 PM