:boom: ```joshuacannon@CEPHANDRIUS:~/work/pants$ s...
# development
b
💥
Copy code
joshuacannon@CEPHANDRIUS:~/work/pants$ set RUST_BACKTRACE=1
joshuacannon@CEPHANDRIUS:~/work/pants$ ./pants peek src/python/pants/backend/python/dependency_inference/scripts/BUILD
06:36:15.38 [ERROR] panic at 'called `Result::unwrap()` on an `Err` value: PyErr { type: <class 'TypeError'>, value: TypeError("'int' object cannot be converted to 'PyString'"), traceback: None }', src/externs/mod.rs:145
06:36:15.38 [ERROR] Please set RUST_BACKTRACE=1, re-run, and then file a bug at <https://github.com/pantsbuild/pants/issues>.
Is the backtrace dumped somewhere?
The
BUILD
file that seemingly makes this unhappy is:
Copy code
resources(name="resources", sources=["*.py"])

# Also expose scripts as `python_sources` so they get formatted/linted/checked
python_sources()
Also:
0887ee2cd4adbfce6a488382fbd0580cbc7e81f0
BUILD
file might be a red herring
Ah yes, it's related to my changes, but I'd need a dev to explain why
Ah OK solved. If you create a
Process
and set an
env
value to an int, this will happen.
I suppose
mypy
would've told me, but the dogfooding made it impossible to run
mypy
without first hitting this error 😂
🙈 1
Perhaps the code should still map to string so there's hope. I'll open a PR
w
it is possible to actually bootstrap a PEX and then run from that… i’ve only done it once or twice, but it can be really handy for this case (“i’m going to break a lot of things, so let’s prepare”)
would be interesting to add (back, probably) support for that to the
pants
script in the repo
👍 1
b
@witty-crayon-22786 for the record I didn't know I was going to break a lot of things 😂
🤣 1
c
but it would be easy enough to stash your changes to prepare the pex, then pop them back and run.. 😉
w
yep
./pants package src/python/pants/bin:pants
will build the pex, and then you can run it with
./dist/*.pex
🔖 2
👀 1
b
This seems like a useful addition for somewhere in the docs. Maybe the "Tips and Debugging" page? https://www.pantsbuild.org/docs/rules-api-tips
w
yea, probably. it’s only useful for developing pants itself… some probably somewhere under https://www.pantsbuild.org/v2.9/docs/development
👍 1