powerful-florist-1807
10/06/2023, 6:21 PM./pants check {my_file.py}
I see the "pants-sandbox-xxx" is not a valid Python package name error. I wonder if anyone has seen this issue and what could be the root cause? I am using python 3.9, mypy==1.4.1. Thanks!
PANTS_PYTHON_INTERPRETER_CONSTRAINTS=['==3.9.*'] on MacOS_ARM64
11:17:59.03 [WARN] DEPRECATED: Running Pants in an external Python interpreter via a
./pants` script is scheduled to be removed in version 2.18.0.dev0.`
11:18:10.08 [INFO] Completed: Building mypy.pex from mypy.lock
11:18:23.49 [ERROR] Completed: Typecheck using MyPy - mypy - mypy failed (exit code 2).
pants-sandbox-D4V2qW is not a valid Python package name
ā mypy failed.
curved-television-6568
10/06/2023, 6:43 PMmypy
with those sources then in the root of the sandbox, the sandbox will be seen as the package name.enough-analyst-54434
10/06/2023, 7:03 PM--keep-sandboxes=on_failure
.enough-analyst-54434
10/06/2023, 7:04 PM__run.sh
.powerful-florist-1807
10/06/2023, 8:21 PM13:12:57.26 [INFO] Preserving local process execution dir /private/var/folders/n_/gd3n_80j2hn188krq4qj_2880000gn/T/pants-sandbox-SoUXMA for Run MyPy on 1 file.
enough-analyst-54434
10/06/2023, 8:32 PM/private/var/folders/n_/gd3n_80j2hn188krq4qj_2880000gn/T/pants-sandbox-SoUXMA
and have a look around. What do you see? What is in __run.sh
? What happens when you run ./__run.sh
?enough-analyst-54434
10/06/2023, 8:32 PMenough-analyst-54434
10/06/2023, 8:33 PM__run.sh
script is not what Pants runs, but it is a generally good simulation of what the Rust engine code executes; so it can be useful for debugging.powerful-florist-1807
10/06/2023, 8:47 PMenough-analyst-54434
10/06/2023, 8:51 PM