Panic when failing to build metadata for `snowflake-connector-python==2.9.0`
notatallshaw opened this issue · comments
This came up when I was testing a difficult resolution requirement for rip. During the resolution process rip visited snowflake-connector-python==2.9.0
which is not buildable on my Linux Python 3.11 environment.
However instead of presenting an error and terminimating gracefully, rip presents an error and then panics:
$ cargo r -- snowflake-connector-python==2.9.0
2024-01-20T16:28:56.755815Z INFO get_sdist_metadata{name=snowflake-connector-python version=2.9.0}:build_wheel{name=pyarrow version=8.0.0}: rattler_installs_packages::resolve::dependency_provider: obtaining dependency information from typing-extensions=4.9.0
2024-01-20T16:28:57.069426Z WARN rattler_installs_packages::index::package_database: Error reading metadata from artifact 'snowflake-connector-python-2.9.0.tar.gz' skipping (could not get artifact: could not build wheel: <string>:36: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
WARNING setuptools_scm.pyproject_reading toml section missing 'pyproject.toml does not contain a tool.setuptools_scm section'
ERROR setuptools_scm._file_finders.git listing git files failed - pretending there aren't any
warning: no files found matching '../LICENSE.txt'
warning: no files found matching '../NOTICE.txt'
warning: no previously-included files matching '*.so' found anywhere in distribution
warning: no previously-included files matching '*.pyc' found anywhere in distribution
warning: no previously-included files matching '*~' found anywhere in distribution
warning: no previously-included files matching '#*' found anywhere in distribution
warning: no previously-included files matching '.git*' found anywhere in distribution
warning: no previously-included files matching '.DS_Store' found anywhere in distribution
no previously-included directories found matching '.asv'
/tmp/.tmpf7wfnm/venv/lib/python3.11/site-packages/setuptools/command/build_py.py:207: _Warning: Package 'pyarrow.includes' is absent from the `packages` configuration.
!!
<< HUGE EXPECTED BUILD ERROR HERE >>
!!
check.warn(importable)
error: command 'cmake' failed: No such file or directory
)
thread 'main' panicked at 'could not find metadata for any sdist or wheel for snowflake-connector-python 2.9.0. The following artifacts are available:
- snowflake-connector-python-2.9.0.tar.gz', crates/rattler_installs_packages/src/resolve/dependency_provider.rs:540:13
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Yes, I am able to reproduce and have actually seen this a lot before. Seeing as the only viable option cannot be built, there is an expect
that fails.
I agree we should exit gracefully, with a cannot resolve...
or something along those lines :)
We would need to think of something for this: mamba-org/resolvo#14. As currently the API is a bit too limited for us to fix this nicely.
This is fixed in main.