mamba-org / boa

The fast conda package builder, based on mamba
https://boa-build.readthedocs.io/en/latest/
BSD 3-Clause "New" or "Revised" License
255 stars 56 forks source link

Conda-Build Dependency Compatibility Issue with API Changes in Version 24.1.0 #392

Closed itamarg365 closed 9 months ago

itamarg365 commented 9 months ago

After upgrading to conda-build version 24.1.0, we have encountered compatibility issues with certain APIs, specifically related to mambabuild.

Steps to Reproduce:

  1. Upgrade conda-build to version 24.1.0.
  2. Execute conda mambabuild . --no-tests
  3. Observe
    ImportError: cannot import name 'update_index' from 'conda_build.index' (/home/itay/.conda/envs/myvenv/lib/python3.10/site-packages/conda_build/index.py)

Links to API Changes in conda-build 24.1.0:

Release Notes Specific PR

Additional Information:

Workaround:

Downgrade conda-build to 3.28.4

Related Issues:

Environment Information:

Operating System: macOS Sonoma Conda Version: 4.10.3 Python Version: 3.10.13

Suggested solution:

Use update_index directly from conda-index at https://github.com/mamba-org/boa/blob/main/boa/cli/mambabuild.py#L16

Note:

I not a contributor in this repo, that why I didn't create a PR. I guess that the version change created many more API breaks in this package, and this is just one indication. Feel free to contribute to this discussion, and let me know if there are any specific steps, code snippets, or logs that can help in resolving this issue. Thank you!

APJansen commented 9 months ago

We ran into the same issue, I created a minimal example repo where it shows up in the CI.

dholth commented 9 months ago

It should be updated to use https://github.com/conda/conda-index/blob/main/conda_index/index/__init__.py#L111 or the ChannelIndex class directly as shown in https://github.com/conda/conda-index/blob/main/conda_index/cli/__init__.py , as a side effect this version of conda-index is much faster.

jaimergp commented 9 months ago

Added https://github.com/mamba-org/boa/pull/393 and https://github.com/conda-forge/conda-forge-repodata-patches-feedstock/pull/657 to mitigate the issue.