-
Notifications
You must be signed in to change notification settings - Fork 994
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[bug] Workspaces AssertionError #6117
Comments
I've managed to make a reproduction whose error is slightly different, but I believe is caused by the same issue. Given the files:
bb/conanfile.py:
layout_vs:
test.yml:
Then after the following commands:
Outputs the following:
|
Hi, @spoofedex As you have said, the problem is related with the package_id_mode you are using. With So, Conan cannot compute the package_ID of the consumer until all the binaries of all the requirements are available. This is somehow impossible with an editable package (workspace), as the binaries will be changing continuously. We know that workspaces have several open issues, we know we need to invest a lot of time on them (maybe rewrite lots of code), but possible yours is an edge case an Conan won't be prepared to handle it: the only way would be to ignore the package_ID of the consumers (it cannot be computed) but it is against one of the fundamental rules of Conan (package_IDs are key for Conan to work properly). I'm sorry, but it looks like this issue will have to wait after other important ones also related to workspaces. Anyway, I wonder why do you need to use Thanks! |
I also got this error: |
Workspaces were removed in 2.0, but the plan is to resume work on them in the 2.X roadmap. |
Environment Details (include every applicable attribute)
Description
I've been receiving an issue when trying to install a workspace. The error is as follows:
My yml file looks as follows:
Where "b" has a dependency on "a" and "abc" (from the stack trace), and both "abc" has a dependency on "a".
I have configured default_package_id_mode=full_package_mode.
Within all packages' package_id I call:
self.info.requires.package_revision_mode()
If I remove this call, it does work.
Unfortunately, I don't have sufficient time to make a smaller reproduction. But I did do some analysis, so I hope that is sufficient to figure out what's going on. I will try to make a reproduction if I have time later.
Analysis
The reason that the node's package_id is PACKAGE_ID_UNKNOWN, is that the RequirementInfo's sha property returns None for package a, because
self.package_revision == PREV_UNKNOWN
is true. This is caused by the Node's prev never being set.For all dependencies except for "a" and "b", the node's prev is set at _evaluate_cache_pkg (
node.prev = metadata.packages[pref.id].revision
).This method is called from
_process_node
, which is called for all dependencies, including a and b. However, the call to _evaluate_cache_pkg is never reached, because it returns sooner. It hits the following return:So indeed, it seems like I'm running into the "TODO" case.
The text was updated successfully, but these errors were encountered: