user
10/15/2021, 3:44 PMuser
10/15/2021, 8:18 PMbusy-vase-39202
10/15/2021, 8:47 PMhundreds-father-404
10/15/2021, 9:52 PM./pants mend
vs ./pants serge
. Feedback welcomed! 🧵clean-morning-70173
10/15/2021, 10:31 PMclean-morning-70173
10/15/2021, 10:32 PMrough-minister-58256
10/16/2021, 1:55 AMflat-zoo-31952
10/16/2021, 12:34 PM/usr/bin/python3
which is definitely there... Anybody know what this means?
08:28:54.05 [WARN] Completed: Find Python interpreter to bootstrap PEX - No bootstrap Python executable could be found from the option `interpreter_search_paths` in the `[python-setup]` scope. Will attempt to run PEXes directly.
hundreds-father-404
10/16/2021, 4:24 PM./pants update-build-files
use Black by default, or you have to opt into it with an option? Beyond autoformatting, the goal automates fixing some safe deprecations like renaming target names
+ for opt-out, - for opt-in. Comments also welcomed :)fresh-cat-90827
10/18/2021, 7:59 AM./pants run project/script.py
. The user has a Python 3.7 interpreter accessible on the PATH
which Pants finds but reports it needs Python 3.8 to run this particular script in the monorepo. User makes an installation of Python 3.8 version (which replaces the Python 3.7 on /usr/bin/python3
) and re-runs ./pants run project/script.py
. Pants can’t still find the new interpreter. Note that user has been successfully able to work with the Pants monorepo when running targets that required Python 3.7 version.
What has helped:
$ rm -rf .pids && rm -rf .pants.d
in the local monorepo directory and restart computer, but the issue persists.
$ rm -rf /Users/user.name/.cache/pants
and restart. Pants is now able to find the new Python interpreter.
Could it be that Pants caches the /usr/bin/python3
version so that any subsequent changes to that shim won’t have any effect unless the /Users/user.name/.cache/pants
is removed?user
10/18/2021, 3:32 PMrapid-bird-79300
10/18/2021, 7:13 PMError: 6.38 [ERROR] 1 Exception encountered:
Engine traceback:
in select
in pants.init.plugin_resolver.resolve_plugins
in pants.backend.python.util_rules.pex.create_venv_pex (pants_plugins.pex)
in pants.backend.python.util_rules.pex.build_pex (pants_plugins.pex)
in pants.backend.python.util_rules.pex.build_pex_component (pants_plugins.pex)
in pants.backend.python.util_rules.pex_cli.setup_pex_cli_process
in pants.backend.python.util_rules.pex_cli.download_pex_pex
in pants.core.util_rules.external_tool.download_external_tool
in downloaded_file
Traceback (no traceback):
<pants native internals>
Exception: Client error (403) downloading file pex from <https://github.com/pantsbuild/pex/releases/download/v2.1.44/pex>
Traceback (most recent call last):
File "/home/runner/.cache/pants/setup/bootstrap-Linux-x86_64/2.7.0_py38/lib/python3.8/site-packages/pants/bin/daemon_pants_runner.py", line 124, in single_daemonized_run
scheduler, options_initializer = self._core.prepare(options_bootstrapper, complete_env)
File "/home/runner/.cache/pants/setup/bootstrap-Linux-x86_64/2.7.0_py38/lib/python3.8/site-packages/pants/pantsd/pants_daemon_core.py", line 129, in prepare
build_config, options = self._options_initializer.build_config_and_options(
File "/home/runner/.cache/pants/setup/bootstrap-Linux-x86_64/2.7.0_py38/lib/python3.8/site-packages/pants/init/options_initializer.py", line 107, in build_config_and_options
build_config = _initialize_build_configuration(
File "/home/runner/.cache/pants/setup/bootstrap-Linux-x86_64/2.7.0_py38/lib/python3.8/site-packages/pants/init/options_initializer.py", line 47, in _initialize_build_configuration
working_set = plugin_resolver.resolve(options_bootstrapper, env)
File "/home/runner/.cache/pants/setup/bootstrap-Linux-x86_64/2.7.0_py38/lib/python3.8/site-packages/pants/init/plugin_resolver.py", line 123, in resolve
for resolved_plugin_location in self._resolve_plugins(options_bootstrapper, env):
File "/home/runner/.cache/pants/setup/bootstrap-Linux-x86_64/2.7.0_py38/lib/python3.8/site-packages/pants/init/plugin_resolver.py", line 146, in _resolve_plugins
session.product_request(ResolvedPluginDistributions, [self._request])[0],
File "/home/runner/.cache/pants/setup/bootstrap-Linux-x86_64/2.7.0_py38/lib/python3.8/site-packages/pants/engine/internals/scheduler.py", line 562, in product_request
self._raise_on_error([t for _, t in throws])
File "/home/runner/.cache/pants/setup/bootstrap-Linux-x86_64/2.7.0_py38/lib/python3.8/site-packages/pants/engine/internals/scheduler.py", line 497, in _raise_on_error
raise ExecutionError(
pants.engine.internals.scheduler.ExecutionError: 1 Exception encountered:
Engine traceback:
in select
in pants.init.plugin_resolver.resolve_plugins
in pants.backend.python.util_rules.pex.create_venv_pex (pants_plugins.pex)
in pants.backend.python.util_rules.pex.build_pex (pants_plugins.pex)
in pants.backend.python.util_rules.pex.build_pex_component (pants_plugins.pex)
in pants.backend.python.util_rules.pex_cli.setup_pex_cli_process
in pants.backend.python.util_rules.pex_cli.download_pex_pex
in pants.core.util_rules.external_tool.download_external_tool
in downloaded_file
Traceback (no traceback):
<pants native internals>
Exception: Client error (403) downloading file pex from <https://github.com/pantsbuild/pex/releases/download/v2.1.44/pex>
(Use --no-process-execution-local-cleanup to inspect chroots and/or -ldebug for more logs. See <https://www.pantsbuild.org/v2.7/docs/troubleshooting> for common issues. Consider reaching out for help: <https://www.pantsbuild.org/v2.7/docs/getting-help.>)
Error: Process completed with exit code 1.
any way we can prevent this?creamy-airplane-38079
10/18/2021, 9:09 PMpants test
) . Is this a known issue ? Also potentially related. I tried to reproduce the issue in on my local environment . I deleted the cache and tried to boostrap pants from scratch ( similarly to our CI) and that is failing too. We are using pants 1.35rc1 and can provide the toml if needed. UPDATE : Issue seems transient. Our CI is back on track and my local environment was able to bootstrap itself again without issues.user
10/18/2021, 11:16 PMuser
10/19/2021, 4:38 PMloud-laptop-17949
10/19/2021, 8:22 PMException: Failed to read link "/Users/ryan.king/code/color/.git/hooks/post-checkout": Absolute symlink: "/Users/ryan.king/code/color/.git/hooks/post-checkout"
hundreds-father-404
10/20/2021, 12:15 AMupdate-build-files
, would you find it helpful to have automated support for renaming targets and updating all their references? Something like this maybe:
[update-build-files]
rename_targets = { path/to:original_name = path/to:new_name }
Pants will update all references to the target, e.g. in the dependencies
field.
How often do you find yourself renaming targets? (Utility probably depends on how much you use dependency inference)fast-magazine-42115
10/20/2021, 10:19 AMaverage-australia-85137
10/20/2021, 1:25 PMechoing-farmer-15630
10/20/2021, 3:37 PMuser
10/20/2021, 4:48 PMuser
10/20/2021, 6:18 PMechoing-farmer-15630
10/20/2021, 7:45 PM**/*.py
but that loses the point of the fine-grained resolution when I need it.echoing-farmer-15630
10/20/2021, 7:46 PMechoing-farmer-15630
10/20/2021, 7:47 PMworried-salesclerk-37834
10/20/2021, 10:03 PM.env
file as environment variables when running an integration test? Or do I need to add it as a file target and load via python-dotenv?user
10/20/2021, 10:44 PMuser
10/20/2021, 10:45 PMplain-carpet-73994
10/20/2021, 10:50 PMPYTHONPATH=$(echo $(pwd)/.deps/* | tr ' ' ':') python -m device.session.main
but that's a bit ugly and I don't know how to convert that back to a .pex
easily (I think I could figure out some flags to tell it to use the .deps
, not to check pypi
, etc. but is there an easier way?loud-laptop-17949
10/20/2021, 11:00 PM