high-energy-55500
10/29/2021, 12:52 PMpantsbuild.pants
. i’m on a clean M1 Pro macbook pro with barely anything installed so far (essentially just homebrew, pyenv, poetry, and python):
martim@Argon allpdl % poetry install
Installing dependencies from lock file
Package operations: 1 install, 0 updates, 0 removals
• Installing pantsbuild.pants (2.7.0): Failed
RuntimeError
Unable to find installation candidates for pantsbuild.pants (2.7.0)
at ~/.poetry/lib/poetry/installation/chooser.py:72 in choose_for
68│
69│ links.append(link)
70│
71│ if not links:
→ 72│ raise RuntimeError(
73│ "Unable to find installation candidates for {}".format(package)
74│ )
75│
76│ # Get the best link
martim@Argon allpdl % ./pants -V
Bootstrapping Pants using /Users/martim/.pyenv/shims/python3
Installing pantsbuild.pants==2.7.0 into a virtual environment at /Users/martim/.cache/pants/setup/bootstrap-Darwin-arm64/2.7.0_py38
created virtual environment CPython3.8.10.final.0-64 in 140ms
creator CPython3Posix(dest=/Users/martim/.cache/pants/setup/bootstrap-Darwin-arm64/pants.317fyy/install, clear=False, no_vcs_ignore=False, global=False)
seeder FromAppData(download=False, pip=bundle, setuptools=bundle, wheel=bundle, via=copy, app_data_dir=/Users/martim/Library/Application Support/virtualenv)
added seed packages: pip==21.1.2, setuptools==57.0.0, wheel==0.36.2
activators BashActivator,CShellActivator,FishActivator,PowerShellActivator,PythonActivator,XonshActivator
Requirement already satisfied: pip in /Users/martim/.cache/pants/setup/bootstrap-Darwin-arm64/pants.317fyy/install/lib/python3.8/site-packages (21.1.2)
Collecting pip
Using cached pip-21.3.1-py3-none-any.whl (1.7 MB)
Installing collected packages: pip
Attempting uninstall: pip
Found existing installation: pip 21.1.2
Uninstalling pip-21.1.2:
Successfully uninstalled pip-21.1.2
Successfully installed pip-21.3.1
ERROR: Could not find a version that satisfies the requirement pantsbuild.pants==2.7.0 (from versions: 0.0.17, 0.0.18, 0.0.20, 0.0.21, 0.0.22, 0.0.23, 0.0.24, 0.0.25, 0.0.26, 0.0.27, 0.0.28, 0.0.29, 0.0.30, 0.0.31, 0.0.32, 0.0.33, 0.0.34, 0.0.35, 0.0.36, 0.0.37, 0.0.38, 0.0.39, 0.0.40, 0.0.41, 0.0.42, 0.0.43, 0.0.44, 0.0.45, 0.0.46, 0.0.47, 0.0.48, 0.0.49, 0.0.50, 0.0.51, 0.0.52, 0.0.53, 0.0.54, 0.0.55, 0.0.56, 0.0.57, 0.0.58, 0.0.59, 0.0.60, 0.0.61, 0.0.62, 0.0.63, 0.0.64, 0.0.65, 0.0.66, 0.0.67, 0.0.68, 0.0.69, 0.0.70, 0.0.71, 0.0.72, 0.0.73, 0.0.74, 0.0.75, 0.0.76, 0.0.77, 0.0.79, 0.0.80, 0.0.81, 0.0.82, 1.0.0, 1.0.1, 1.1.0, 1.2.0, 1.2.1, 1.3.0, 1.4.0, 1.5.0, 1.6.0, 1.7.0)
ERROR: No matching distribution found for pantsbuild.pants==2.7.0
any clue what the issue might be? 😕adorable-spoon-41460
10/29/2021, 1:53 PM15:46:09.41 [DEBUG] spawned local process as Some(99409) for Process { argv: ["/Users/sinisaderasevic/.pyenv/versions/3.9.7/bin/python", "./pex", "--python-path", "/Users/sinisaderasevic/.pyenv/versions/3.9.7/bin:/Users/sinisaderasevic/.virtualenvs/apollo/bin:/Users/sinisaderasevic/.pyenv/shims:/Users/sinisaderasevic/.pyenv/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin", "--tmpdir", ".tmp", "--interpreter-constraint", "CPython==3.9.*", "--", "-c", "import hashlib, os, sys\n\npython = os.path.realpath(sys.executable)\nprint(python)\n\nhasher = hashlib.sha256()\nwith open(python, \"rb\") as fp:\n for chunk in iter(lambda: fp.read(8192), b\"\"):\n hasher.update(chunk)\nprint(hasher.hexdigest())\n"], env: {"CPPFLAGS": "", "LC_CTYPE": "en_US.UTF-8", "LDFLAGS": "", "PATH": "/Users/sinisaderasevic/.virtualenvs/apollo/bin:/Users/sinisaderasevic/.pyenv/shims:/Users/sinisaderasevic/.pyenv/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin", "PEX_IGNORE_RCFILES": "true", "PEX_PYTHON_PATH": "/Users/sinisaderasevic/.pyenv/versions/3.9.7/bin:/Users/sinisaderasevic/.virtualenvs/apollo/bin:/Users/sinisaderasevic/.pyenv/shims:/Users/sinisaderasevic/.pyenv/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin", "PEX_ROOT": ".cache/pex_root"}, working_directory: None, input_files: Digest { hash: Fingerprint<26cf32db81511eab7e4996e09d5a21b162c66212333573648332b89025965ab8>, size_bytes: 158 }, output_files: {}, output_directories: {}, timeout: None, execution_slot_variable: None, description: "Find interpreter for constraints: CPython==3.9.*", level: Debug, append_only_caches: {CacheName("pex_root"): CacheDest(".cache/pex_root")}, jdk_home: None, platform_constraint: None, is_nailgunnable: false, cache_scope: PerRestartSuccessful }
15:46:09.80 [DEBUG] Completed: Find interpreter for constraints: CPython==3.9.*
15:46:09.80 [DEBUG] Completed: Scheduling: Find interpreter for constraints: CPython==3.9.*
15:46:09.80 [DEBUG] Completed: Find Python interpreter for constraints
15:46:09.80 [DEBUG] Completed: pants.backend.python.util_rules.pex.build_pex_component
15:46:09.80 [DEBUG] Completed: pants.backend.python.util_rules.pex.build_pex
15:46:09.80 [DEBUG] Completed: pants.backend.python.lint.black.rules.setup_black
15:46:09.80 [DEBUG] Completed: Format with Black
15:46:09.80 [DEBUG] Completed: `fmt` goal
15:46:09.80 [DEBUG] computed 1 nodes in 0.422410 seconds. there are 1501 total nodes.
15:46:09.80 [ERROR] Exception caught: (pants.engine.internals.scheduler.ExecutionError)
File "/Users/sinisaderasevic/.cache/pants/setup/bootstrap-Darwin-arm64/2.7.0_py39/lib/python3.9/site-packages/pants/bin/local_pants_runner.py", line 236, in _run_inner
return self._perform_run(goals)
File "/Users/sinisaderasevic/.cache/pants/setup/bootstrap-Darwin-arm64/2.7.0_py39/lib/python3.9/site-packages/pants/bin/local_pants_runner.py", line 175, in _perform_run
return self._perform_run_body(goals, poll=False)
File "/Users/sinisaderasevic/.cache/pants/setup/bootstrap-Darwin-arm64/2.7.0_py39/lib/python3.9/site-packages/pants/bin/local_pants_runner.py", line 192, in _perform_run_body
return self.graph_session.run_goal_rules(
File "/Users/sinisaderasevic/.cache/pants/setup/bootstrap-Darwin-arm64/2.7.0_py39/lib/python3.9/site-packages/pants/init/engine_initializer.py", line 135, in run_goal_rules
exit_code = self.scheduler_session.run_goal_rule(
File "/Users/sinisaderasevic/.cache/pants/setup/bootstrap-Darwin-arm64/2.7.0_py39/lib/python3.9/site-packages/pants/engine/internals/scheduler.py", line 538, in run_goal_rule
self._raise_on_error([t for _, t in throws])
File "/Users/sinisaderasevic/.cache/pants/setup/bootstrap-Darwin-arm64/2.7.0_py39/lib/python3.9/site-packages/pants/engine/internals/scheduler.py", line 506, in _raise_on_error
raise ExecutionError(
Exception message: 1 Exception encountered:
ProcessExecutionFailure: Process 'Find interpreter for constraints: CPython==3.9.*' failed with exit code 1.
stdout:
stderr:
Traceback (most recent call last):
File "/Users/sinisaderasevic/bull/apollo/.cache/pants/named_caches/pex_root/unzipped_pexes/592827b562c4aa09c1e9af6b3ed7b797eef1a4dc/.bootstrap/pex/pex.py", line 483, in execute
exit_value = self._wrap_coverage(self._wrap_profiling, self._execute)
File "/Users/sinisaderasevic/bull/apollo/.cache/pants/named_caches/pex_root/unzipped_pexes/592827b562c4aa09c1e9af6b3ed7b797eef1a4dc/.bootstrap/pex/pex.py", line 401, in _wrap_coverage
return runner(*args)
File "/Users/sinisaderasevic/bull/apollo/.cache/pants/named_caches/pex_root/unzipped_pexes/592827b562c4aa09c1e9af6b3ed7b797eef1a4dc/.bootstrap/pex/pex.py", line 432, in _wrap_profiling
return runner(*args)
File "/Users/sinisaderasevic/bull/apollo/.cache/pants/named_caches/pex_root/unzipped_pexes/592827b562c4aa09c1e9af6b3ed7b797eef1a4dc/.bootstrap/pex/pex.py", line 539, in _execute
return self.execute_entry(self._pex_info.entry_point)
File "/Users/sinisaderasevic/bull/apollo/.cache/pants/named_caches/pex_root/unzipped_pexes/592827b562c4aa09c1e9af6b3ed7b797eef1a4dc/.bootstrap/pex/pex.py", line 655, in execute_entry
return self.execute_pkg_resources(entry_point)
File "/Users/sinisaderasevic/bull/apollo/.cache/pants/named_caches/pex_root/unzipped_pexes/592827b562c4aa09c1e9af6b3ed7b797eef1a4dc/.bootstrap/pex/pex.py", line 687, in execute_pkg_resources
return runner()
File "/Users/sinisaderasevic/bull/apollo/.cache/pants/named_caches/pex_root/unzipped_pexes/592827b562c4aa09c1e9af6b3ed7b797eef1a4dc/.deps/pex-2.1.44-py2.py3-none-any.whl/pex/bin/pex.py", line 1149, in main
pex_builder = build_pex(options.requirements, options, cache=ENV.PEX_ROOT)
File "/Users/sinisaderasevic/bull/apollo/.cache/pants/named_caches/pex_root/unzipped_pexes/592827b562c4aa09c1e9af6b3ed7b797eef1a4dc/.deps/pex-2.1.44-py2.py3-none-any.whl/pex/bin/pex.py", line 895, in build_pex
interpreters = list(
File "/Users/sinisaderasevic/bull/apollo/.cache/pants/named_caches/pex_root/unzipped_pexes/592827b562c4aa09c1e9af6b3ed7b797eef1a4dc/.deps/pex-2.1.44-py2.py3-none-any.whl/pex/pex_bootstrapper.py", line 139, in iter_compatible_interpreters
for interpreter_or_error in _iter_interpreters():
File "/Users/sinisaderasevic/bull/apollo/.cache/pants/named_caches/pex_root/unzipped_pexes/592827b562c4aa09c1e9af6b3ed7b797eef1a4dc/.deps/pex-2.1.44-py2.py3-none-any.whl/pex/pex_bootstrapper.py", line 104, in _iter_interpreters
for interp in PythonInterpreter.iter_candidates(
File "/Users/sinisaderasevic/bull/apollo/.cache/pants/named_caches/pex_root/unzipped_pexes/592827b562c4aa09c1e9af6b3ed7b797eef1a4dc/.deps/pex-2.1.44-py2.py3-none-any.whl/pex/interpreter.py", line 570, in iter_candidates
for interpreter in cls._filter(iter_interpreters()):
File "/Users/sinisaderasevic/bull/apollo/.cache/pants/named_caches/pex_root/unzipped_pexes/592827b562c4aa09c1e9af6b3ed7b797eef1a4dc/.deps/pex-2.1.44-py2.py3-none-any.whl/pex/interpreter.py", line 922, in _filter
for interp in pythons:
File "/Users/sinisaderasevic/bull/apollo/.cache/pants/named_caches/pex_root/unzipped_pexes/592827b562c4aa09c1e9af6b3ed7b797eef1a4dc/.deps/pex-2.1.44-py2.py3-none-any.whl/pex/interpreter.py", line 551, in iter_interpreters
for candidate in cls._find(
File "/Users/sinisaderasevic/bull/apollo/.cache/pants/named_caches/pex_root/unzipped_pexes/592827b562c4aa09c1e9af6b3ed7b797eef1a4dc/.deps/pex-2.1.44-py2.py3-none-any.whl/pex/jobs.py", line 431, in execute_parallel
yield spawn_result.spawned_job.await_result()
File "/Users/sinisaderasevic/bull/apollo/.cache/pants/named_caches/pex_root/unzipped_pexes/592827b562c4aa09c1e9af6b3ed7b797eef1a4dc/.deps/pex-2.1.44-py2.py3-none-any.whl/pex/jobs.py", line 220, in await_result
return result_func(stdout)
File "/Users/sinisaderasevic/bull/apollo/.cache/pants/named_caches/pex_root/unzipped_pexes/592827b562c4aa09c1e9af6b3ed7b797eef1a4dc/.deps/pex-2.1.44-py2.py3-none-any.whl/pex/interpreter.py", line 667, in create_interpreter
raise cls.IdentificationError("Could not establish identity of {}.".format(binary))
pex.interpreter.IdentificationError: Could not establish identity of /System/Library/Frameworks/Python.framework/Versions/2.7/Resources/pythonwrapper.app/Contents/MacOS/pythonwrapper.
Any help would be appreciated. Thanksambitious-actor-36781
10/31/2021, 7:49 PM//3rdparty:xyz
to my dependencies more often than not.
at the point I want to just make it explicit.hallowed-student-25079
11/01/2021, 8:11 AM./pants roots
as every root in my setup corresponds to one top level module in the python module hierarchy. I guess this process can be easily automated and I assume there is no better solution here (and it’s not that bad with this setup, actually it’s better than what we had with poetry).
• For multiple lock files, we can work around this for now and looking at the docs it seems there will be support for this soon, which is great 🎉!
• Most headaches come from my tries to debug and run code from within VSCode. The setup with editable install works great with poetry as it easily allows to launch binaries / cli scripts from within VSCode with a debugger attached. As the files executed are the ones edited, there are no problems with source mapping and breakpoints set in VSCode are respected when running. For this VSCode uses debugpy (https://github.com/microsoft/debugpy). Executables are specified in a launch.json
file (https://code.visualstudio.com/docs/python/debugging) and then it is possible to run them from the UI.
◦ I managed to debug a running pex file where I attach to a remote debugger manually started in the code. This is cool, but still a bit inconvenient as breakpoints are not working and it requires more boilerplate work.
◦ I also manage to run a pex file with the debugpy launcher, but then it ignores exceptions and does not enter the debugger (it seems some subprocess / fork is not covered by the debugger).
◦ Even with that I would need to do source mapping as the pex venv is located elsewhere and has some (possibly outdated) copies.
◦ One idea I had was a plugin that creates a venv where all source roots are installed editable. But not sure if there is an easier solution?hallowed-student-25079
11/01/2021, 8:40 AMpoetry_requirements()
and have a constraints file the ./pants repl
fails with an error message:
❯ ./pants repl components/grp_a/cmp_a
09:31:57.27 [INFO] Initializing scheduler...
09:31:57.63 [INFO] Scheduler initialized.
Traceback (most recent call last):
File "/Users/malte/src/pants-eval/.pants.d/tmpw7g1gbql/requirements.pex/.bootstrap/pex/pex.py", line 482, in execute
File "/Users/malte/src/pants-eval/.pants.d/tmpw7g1gbql/requirements.pex/.bootstrap/pex/pex.py", line 139, in activate
File "/Users/malte/src/pants-eval/.pants.d/tmpw7g1gbql/requirements.pex/.bootstrap/pex/pex.py", line 125, in _activate
File "/Users/malte/src/pants-eval/.pants.d/tmpw7g1gbql/requirements.pex/.bootstrap/pex/pex.py", line 109, in _loaded_envs
File "/Users/malte/src/pants-eval/.pants.d/tmpw7g1gbql/requirements.pex/.bootstrap/pex/pex_info.py", line 103, in from_pex
FileNotFoundError: [Errno 2] No such file or directory: '__reqs/rich<11.0.0,>=10.11.0.pex/PEX-INFO'
I searched the issue tracker, but couldn’t find an issue for it. I will test this later with 2.8beta, but maybe this is some obvious thing I missed?stale-nightfall-29801
11/01/2021, 9:15 AMcurved-television-6568
11/01/2021, 9:20 AMcurved-television-6568
11/01/2021, 9:26 AMechoing-farmer-15630
11/01/2021, 7:14 PMException message: 1 Exception encountered:
BinaryNotFoundError: Cannot find `unzip` on `['/bin', '/usr/bin', '/usr/local/bin']`. Please ensure that it is installed so that Pants can download the tools Pants needs to run.
(Use --print-stacktrace for more error details and/or --no-process-execution-local-cleanup to inspect chroots and/or -ldebug for more logs. See <https://www.pantsbuild.org/v2.6/docs/troubleshooting> for common issues. Consider reaching out for help: <https://www.pantsbuild.org/v2.6/docs/getting-help.>)
[arch@ip-172-31-76-241 forge]$ which unzip
/usr/bin/unzip
echoing-farmer-15630
11/01/2021, 7:14 PMechoing-farmer-15630
11/01/2021, 7:14 PMpants test ::
invocation)echoing-farmer-15630
11/01/2021, 7:15 PMunzip
appears to be working fine. I did search but no one else seems to have trouble with unzip existing 😞echoing-farmer-15630
11/01/2021, 7:16 PM--no-process-execution-local-cleanup
seems to be running.fresh-cat-90827
11/01/2021, 8:17 PM2.7.0
or 2.7.1
instead of 2.6.1
. It may be related to https://pantsbuild.slack.com/archives/C046T6T9U/p1634120386065100?thread_ts=1634114532.062500&cid=C046T6T9U.user
11/01/2021, 9:23 PMhttps://pbs.twimg.com/media/FC-VG1HXEA42ntg.png▾
user
11/01/2021, 9:30 PMhttps://pbs.twimg.com/media/EIPfhhlWwAYrkB0.jpg▾
loud-laptop-17949
11/01/2021, 11:40 PMloud-laptop-17949
11/02/2021, 2:59 AM./pants lint ::
I get Error launching process: Os { code: 7, kind: Other, message: "Argument list too long" }
. It seems that pants is trying to run black and isort on all the files in my repo with one invocation.user
11/02/2021, 3:22 AMuser
11/02/2021, 3:37 AMuser
11/02/2021, 3:37 AMuser
11/02/2021, 3:38 AMhallowed-student-25079
11/02/2021, 8:08 AM./pants test ::
only reruns tests needed if I change e.g. a single file. This would then also be true on CI with a cache enabled right? So if I want up to date coverage on the main branch, I would need to remove the test result cache ($HOME/.cache/pants/lmdb_store
) on the main branch so that all tests run? Right now we have some grouping of modules into clearly seperated dependency groups and to save time on the main branch we only run the tests for groups that are changed and then combine coverage to save a bit of execution time on the main branch), would this also be possible with pants?worried-salesclerk-37834
11/02/2021, 2:54 PMhappy-kitchen-89482
11/02/2021, 3:09 PMloud-laptop-17949
11/02/2021, 4:56 PMplain-sundown-25537
11/02/2021, 5:51 PMuser
11/02/2021, 6:02 PMuser
11/02/2021, 6:52 PMbusy-vase-39202
11/02/2021, 8:06 PM