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
add unknown package-ID in build-order #6251
add unknown package-ID in build-order #6251
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel like it is easier to see the JSON itself
Fixed the test following to your suggestion. Please feedback that it makes sense to include ID-Unknown packages in the build-order output. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wouldn't add the :Package_ID_unknown
to the reference in the JSON output, because:
>>> from conans.model.ref import ConanFileReference
>>> r = ConanFileReference.loads("liba/0.1#7086607aa6efbad8e2527748e3ee8237:Package_ID_unknown")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/jgsogo/dev/conan/conan/conans/model/ref.py", line 198, in loads
ref = ConanFileReference(name, version, user, channel, revision, validate=validate)
File "/Users/jgsogo/dev/conan/conan/conans/model/ref.py", line 172, in __new__
obj._validate()
File "/Users/jgsogo/dev/conan/conan/conans/model/ref.py", line 185, in _validate
ConanName.validate_revision(self.revision)
File "/Users/jgsogo/dev/conan/conan/conans/model/ref.py", line 147, in validate_revision
"%s" % ConanName._max_chars)
conans.errors.InvalidNameException: The revision field, must contain only letters and numbers with a length between 1 and 51
Leaving it without the <package_id>
part (liba/0.1#7086607aa6efbad8e2527748e3ee8237
) means also unknown and it is parseable by the ConanFileReference
.
I have done the changes, but actually, the output references are |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤦♂ Yes, PackageReference
is able to parse them... and without it, it fails.
Changelog: Bugfix: Include "Package ID Unknown" nodes in
conan graph build-order
, as they need to be processed in that order.Docs: Omit
Close #6232