markfinal / cruiz

Conan recipe user interface
https://cruiz.readthedocs.io/
Apache License 2.0
11 stars 1 forks source link

Incompatible Conan import in latest Conan 2 #162

Open foundry-markf opened 2 months ago

foundry-markf commented 2 months ago
Exception: No module named 'conans.client.cache'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/w/cruiz/src/cruiz/manage_local_cache/managelocalcachesdialog.py", line 431, in _save_modifications
    self._context.remotes_sync(self._ui.remotesTable.remotes_list())
  File "/w/cruiz/src/cruiz/commands/context.py", line 308, in remotes_sync
    raise Exception("Sync remotes failed") from exception
Exception: Sync remotes failed

This was seen with Conan 2.7.1

markfinal commented 1 week ago

Issues confirmed with Conan v2.9.2

In the remote browser, clicking on a recipe revision shows

Traceback (most recent call last):
  File "/Users/mark/dev/cruiz/cruiz-dev/src/cruiz/workers/api/v2/reciperevisions.py", line 35, in invoke
    app = ConanApp(api.cache_folder, api.config.global_conf)
TypeError: __init__() takes 2 positional arguments but 3 were given

Confirmed the original error, when in the Manage Local Caches dialog, on a Conan 2 cache, go to the Remotes tab, uncheck an enabled field, and then click Apply

Exception: No module named 'conans.client.cache'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/Users/mark/dev/cruiz/cruiz-dev/src/cruiz/manage_local_cache/managelocalcachesdialog.py", line 431, in _save_modifications
    self._context.remotes_sync(self._ui.remotesTable.remotes_list())
  File "/Users/mark/dev/cruiz/cruiz-dev/src/cruiz/commands/context.py", line 308, in remotes_sync
    raise Exception("Sync remotes failed") from exception
Exception: Sync remotes failed
markfinal commented 1 week ago

It may be worth regressing back to find the original change, as there may be hints on how to progress.

Versions to test: 2.0.15, 2.0.16, 2.0.17, 2.1.0, 2.2.0, 2.2.1, 2.2.2, 2.2.3, 2.3.0, 2.3.1, 2.3.2, 2.4.0, 2.4.1, 2.5.0, 2.6.0, 2.7.0, 2.7.1, 2.8.0, 2.8.1, 2.9.0, 2.9.1, 2.9.2