Conan: [workspaces] multiple roots and additional entries lead to errors

Created on 2 Jul 2018  路  3Comments  路  Source: conan-io/conan

Conan Version: 1.5.0
OS: Linux (Python 2.7)

The documentation of the feature currently states the following:

There can be more than one root, in a comma separated list, but all of them will share the same dependency graph, so if they require different versions of the same dependencies, they will conflict.

I therefore expect that workspaces support projects that have different roots with shared dependencies. However, as soon as I add a new root package to the conanws.yml file, that is not part of the dependency tree of the old/first root package, and call conan install I get the following exception:
~
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/conans/client/command.py", line 1219, in run
method(args[0][1:])
File "/usr/local/lib/python2.7/dist-packages/conans/client/command.py", line 325, in install
install_folder=args.install_folder)
File "/usr/local/lib/python2.7/dist-packages/conans/client/conan_api.py", line 79, in wrapper
return f(args, *kwargs)
File "/usr/local/lib/python2.7/dist-packages/conans/client/conan_api.py", line 466, in install
manager.install_workspace(profile, workspace, remote, build, update)
File "/usr/local/lib/python2.7/dist-packages/conans/client/manager.py", line 218, in install_workspace
workspace.generate()
File "/usr/local/lib/python2.7/dist-packages/conans/model/workspace.py", line 114, in generate
build_folder = workspace_package.build_folder
File "/usr/local/lib/python2.7/dist-packages/conans/model/workspace.py", line 38, in build_folder
folder = self._evaluate(self._build_folder)
File "/usr/local/lib/python2.7/dist-packages/conans/model/workspace.py", line 70, in _evaluate
settings = self.conanfile.settings
AttributeError: 'NoneType' object has no attribute 'settings'
~

Adding this new package as a second root then leads to the following error:
~
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/conans/client/command.py", line 1219, in run
method(args[0][1:])
File "/usr/local/lib/python2.7/dist-packages/conans/client/command.py", line 325, in install
install_folder=args.install_folder)
File "/usr/local/lib/python2.7/dist-packages/conans/client/conan_api.py", line 79, in wrapper
return f(args, *kwargs)
File "/usr/local/lib/python2.7/dist-packages/conans/client/conan_api.py", line 466, in install
manager.install_workspace(profile, workspace, remote, build, update)
File "/usr/local/lib/python2.7/dist-packages/conans/client/manager.py", line 200, in install_workspace
conanfile = loader.load_virtual(references)
File "/usr/local/lib/python2.7/dist-packages/conans/client/loader.py", line 125, in load_virtual
assert len(references) == 1
AssertionError
~

bug

Most helpful comment

I have also experienced this (in particular the issue with the references assert). I have created a fork of the conan-workspaces-example repo with 'D' added which demonstrates this issue: https://github.com/Carbon-12/conan-workspace-example

All 3 comments

I have also experienced this (in particular the issue with the references assert). I have created a fork of the conan-workspaces-example repo with 'D' added which demonstrates this issue: https://github.com/Carbon-12/conan-workspace-example

I have the same problem. I am using conan 1.6.1 & Win10.

This issue should be resolved now since workspaces have been re-implemented from scratch with Conan 1.13.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

uilianries picture uilianries  路  3Comments

theodelrieu picture theodelrieu  路  3Comments

rconde01 picture rconde01  路  3Comments

dkgs picture dkgs  路  3Comments

mpdelbuono picture mpdelbuono  路  3Comments