quaint-telephone-89068
11/29/2022, 8:45 AM./pants test --debug-adapter <path to test file> I get the following error:
15:06:23.64 [INFO] Completed: Building pytest_runner.pex
15:06:23.64 [ERROR] 1 Exception encountered:
ProcessExecutionFailure: Process 'Building pytest_runner.pex' failed with exit code 1.
stdout:
stderr:
A distribution for debugpy could not be resolved for ~/.pyenv/versions/3.9.15/bin/python3.9.
Found 1 distribution for debugpy that do not apply:
1.) The wheel tags for debugpy 1.6.0 are cp38-cp38-macosx_10_15_x86_64 which do not match the supported tags of ~/.pyenv/versions/3.9.15/bin/python3.9:
cp39-cp39-macosx_13_0_arm64
... 409 more ...
@jsirois suggest on the slack the following:
[The error message above] refers not to resolving dependencies from the internet, but resolving them from a built PEX. In other words, the PEX file contains only Python 3.8 debugpy, but the PEX was launched with Python 3.9; so no dice. Towards that end, from a quick read of code, it looks like the debugpy subsystem, although it supports ICs, is requested without them:
pants/src/python/pants/backend/python/goals/pytest_runner.py
Line 543 in </pantsbuild/pants/commit/8fd8960ccb014f0e0bade811db970d513aedcef2|8fd8960>
I think that means maybe the ambient interpreter running Pants (3.9 in your case?), is what gets used to build that Pex. And that does not match the test batch in question which uses 3.8.Pants version 2.14 OS MacOS - M1 Additional info n/a pantsbuild/pants
user
12/08/2022, 2:53 PM