Can I configure pants so `pants run` errors print ...
# general
t
Can I configure pants so
pants run
errors print the original source path in a Python stacktrace, instead of the
…/.pants.d/tmp…
source path?
./pants run
stack trace looks like:
Copy code
File "/Users/hawkeye/my_apps/.pants.d/tmpw_o_zgqz/./example/main.py", line 4, in <module>
    from module.lib import bar
ImportError: cannot import name 'bar' from 'module.lib' (/Users/hawkeye/my_apps/.pants.d/tmpw_o_zgqz/./module/lib/__init__.py)
But what I want is:
Copy code
File "/Users/hawkeye/my_apps/example/main.py", line 4, in <module>
    from module.lib import bar
ImportError: cannot import name 'bar' from 'module.lib' (/Users/hawkeye/my_apps/module/lib/__init__.py)
h
There's no way to do that right now AFAIK, but that would be a great feature to implement
👍 1
And probably not hard to do, could be a good first issue for a new contributor
h
t
Got it, thanks for the info!