Skip to content
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



Copy link

@memsharded memsharded commented Dec 18, 2019

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

czoido approved these changes Jan 15, 2020
Copy link

@jgsogo jgsogo left a comment

I feel like it is easier to see the JSON itself

conans/test/functional/graph_lock/ Outdated Show resolved Hide resolved
@memsharded memsharded requested a review from jgsogo Jan 24, 2020
Copy link
Member Author

@memsharded memsharded commented Jan 24, 2020

Fixed the test following to your suggestion.

Please feedback that it makes sense to include ID-Unknown packages in the build-order output.

Copy link

@jgsogo jgsogo left a comment

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/", line 198, in loads
    ref = ConanFileReference(name, version, user, channel, revision, validate=validate)
  File "/Users/jgsogo/dev/conan/conan/conans/model/", line 172, in __new__
  File "/Users/jgsogo/dev/conan/conan/conans/model/", line 185, in _validate
  File "/Users/jgsogo/dev/conan/conan/conans/model/", 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.

Copy link
Member Author

@memsharded memsharded commented Jan 27, 2020

I have done the changes, but actually, the output references are PackageReference not ConanFileReference. It is parseable by PackageReference. Actually it will fail if it has an empty ID

jgsogo approved these changes Jan 27, 2020
Copy link

@jgsogo jgsogo left a comment

🤦‍♂ Yes, PackageReference is able to parse them... and without it, it fails.

@memsharded memsharded merged commit 0f180b9 into conan-io:develop Jan 27, 2020
2 checks passed
@memsharded memsharded deleted the feature/unknown_in_build_order branch Jan 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet

Successfully merging this pull request may close these issues.

5 participants