morning (PST morning that is) all, hey if want to ...
# general
w
morning (PST morning that is) all, hey if want to debug a failure while generating a lock file, how would i do that? Retaining the sandbox:
Copy code
pants -ldebug --keep-sandboxes=always generate-lockfiles
and then executing the generated file
__run.sh
outputs the same truncated error message.
it seems like pants uses
pex lock
to generate the lock files, is there a way can run something like
pex lock --debug
somewhere so I can see the whole output?
new to pex as well not even sure if
--debug
is a supported flag for pex
c
you can provide
PEX_VERBOSE=9
😉
also, there’s a flag to tell pex to preserve the pip log file, which can be helpful as well. search this slack, it’s come up a few times before.
w
will do, by PEX_VERBOSE, do you mean this
Copy code
PEX_VERBOSE=9 pants -ldebug --keep-sandboxes=always generate-lockfiles
or do you mean edit the
.__run.sh
and add the env var
c
I do think both works, but I don’t recall if pants will preserve it or not when invoking pex. The latter is a safe bet, though.
w
ok it seems like pants does not preserve in-line env vars, but manually ediiting the file did
c
yea, so it wasn’t on the allow list by default then..