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

[graph] Changed graph info json output #13934

Merged

Conversation

franramirez688
Copy link
Contributor

@franramirez688 franramirez688 commented May 22, 2023

Changelog: Bugfix: Fixed and completed the graph info xxxx --format json output, to publicly document it.
Docs: conan-io/docs#3236

Closes: #13911
Closes: #13862

For instance:

{
    "nodes": {
         "0": {
            "ref": "pkga/0.1",
            "id": 0,
            "recipe": "Consumer",
            "package_id": "041db7e16de982fbd01f61f3809fc1c206fa9931",
            "prev": null,
            "build_id": null,
            "binary": null,
            "invalid_build": false,
            "info_invalid": null,
            "name": "pkga",
            "user": null,
            "channel": null,
            "url": null,
            "license": null,
            "author": null,
            "description": null,
            "homepage": null,
            "build_policy": null,
            "upload_policy": null,
            "revision_mode": "hash",
            "provides": null,
            "deprecated": null,
            "win_bash": null,
            "win_bash_run": null,
            "default_options": null,
            "options_description": null,
            "version": "0.1",
            "topics": null,
            "package_type": "unknown",
            "settings": {},
            "options": {},
            "options_definitions": {},
            "generators": [],
            "system_requires": {},
            "recipe_folder": "/private/var/folders/s8/zgn806y90xq7bdh64hhfw9th0000gr/T/tmpze4f_1t9conans/path with spaces",
            "source_folder": null,
            "build_folder": null,
            "generators_folder": null,
            "package_folder": null,
            "cpp_info": {
                "root": {
                    "includedirs": [
                        "include"
                    ],
                    "srcdirs": null,
                    "libdirs": [
                        "lib"
                    ],
                    "resdirs": null,
                    "bindirs": [
                        "bin"
                    ],
                    "builddirs": null,
                    "frameworkdirs": null,
                    "system_libs": null,
                    "frameworks": null,
                    "libs": null,
                    "defines": null,
                    "cflags": null,
                    "cxxflags": null,
                    "sharedlinkflags": null,
                    "exelinkflags": null,
                    "objects": null,
                    "sysroot": null,
                    "requires": null,
                    "properties": null
                }
            },
            "label": "conanfile.py (pkga/0.1)",
            "dependencies": {
                "1": {
                    "ref": "pkgb/0.1@common/unstable",
                    "run": "False",
                    "libs": "True",
                    "skip": "False",
                    "test": "False",
                    "force": "False",
                    "direct": "True",
                    "build": "False",
                    "transitive_headers": "None",
                    "transitive_libs": "None",
                    "headers": "True",
                    "package_id_mode": "semver_mode",
                    "visible": "True"
                },
                "3": {
                    "ref": "ros_perception/1.1.4@3rdparty/unstable",
                    "run": "False",
                    "libs": "True",
                    "skip": "False",
                    "test": "False",
                    "force": "False",
                    "direct": "True",
                    "build": "False",
                    "transitive_headers": "None",
                    "transitive_libs": "None",
                    "headers": "True",
                    "package_id_mode": "semver_mode",
                    "visible": "True"
                },
                "2": {
                    "ref": "ros_core/pr-53@3rdparty/snapshot",
                    "run": "False",
                    "libs": "True",
                    "skip": "False",
                    "test": "False",
                    "force": "True",
                    "direct": "True",
                    "build": "False",
                    "transitive_headers": "None",
                    "transitive_libs": "None",
                    "headers": "True",
                    "package_id_mode": "semver_mode",
                    "visible": "True"
                }
            },
            "context": "host",
            "test": false
    },

    [....],

     "root": {
        "0": "pkga/0.1"
    },
    "overrides": {
        "ros_core/[~1.1]@3rdparty/unstable": [
            "ros_core/pr-53@3rdparty/snapshot"
        ],
        "ros_core/1.1.4@3rdparty/unstable": [
            "ros_core/pr-53@3rdparty/snapshot#4d670581ccb765839f2239cc8dff8fbd"
        ]
    },
    "resolved-ranges": {
        "pkgb/[~0]@common/unstable": "pkgb/0.1@common/unstable",
        "ros_perception/[~1.1]@3rdparty/unstable": "ros_perception/1.1.4@3rdparty/unstable"
    }
}

@franramirez688 franramirez688 added this to the 2.0.6 milestone May 22, 2023
@franramirez688 franramirez688 requested a review from memsharded May 22, 2023 14:14
@franramirez688 franramirez688 marked this pull request as ready for review May 23, 2023 10:20
Copy link
Member

@memsharded memsharded left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, just a minor comment

conans/test/integration/command/create_test.py Outdated Show resolved Hide resolved
conan/cli/formatters/graph/graph_info_text.py Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Discuss graph info json output [question] Conan2: Reading / dumping version ranges for dependencies ?
4 participants