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

JSON output for create and install commands with multi_config cpp_info #4656

Merged
merged 4 commits into from Mar 6, 2019

Conversation

Projects
None yet
3 participants
@jgsogo
Copy link
Member

commented Mar 5, 2019

Changelog: Fix: JSON output for multi_config now works in install and create commands
Docs: omit

closes #4606

This PR fixes an error when trying to build the JSON output with a multi_config cpp_info, the custom json-handler written with dates in mind wasn't working properly when a CppInfo was to be dumped into json format.

It doesn't modify the output, it just dumps the information contained in the CppInfo object. The test emphasizes the duplicated information (default directories and rootpath) and the empty directory that is present in the output (builddirs). (Note.- This output is different from the one in the json generator, in that generator non-existing paths are being discarded and the output nodes are different: *_paths).

Full JSON in the test implemented is as follows:

{
    "error": false,
    "installed": [
        {
            "recipe": {
                "id": "name/version@user/channel",
                "downloaded": false,
                "exported": true,
                "error": null,
                "remote": null,
                "time": "2019-03-05T09:50:27.598141",
                "dependency": false,
                "name": "name",
                "version": "version",
                "user": "user",
                "channel": "channel"
            },
            "packages": [
                {
                    "id": "5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9",
                    "downloaded": false,
                    "exported": false,
                    "error": null,
                    "remote": null,
                    "time": "2019-03-05T09:50:28.138290",
                    "built": true,
                    "cpp_info": {
                        "includedirs": [
                            "include"
                        ],
                        "libdirs": [
                            "lib"
                        ],
                        "resdirs": [
                            "res"
                        ],
                        "bindirs": [
                            "bin"
                        ],
                        "builddirs": [
                            ""
                        ],
                        "rootpath": "/private/var/folders/yq/14hmvxm96xd7gfgl37_tnrbh0000gn/T/tmpqh89_yjyconans/path with spaces/.conan/data/name/version/user/channel/package/5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9",
                        "version": "version",
                        "filter_empty": true,
                        "configs": {
                            "release": {
                                "includedirs": [
                                    "include"
                                ],
                                "libdirs": [
                                    "lib"
                                ],
                                "resdirs": [
                                    "res"
                                ],
                                "bindirs": [
                                    "bin"
                                ],
                                "builddirs": [
                                    ""
                                ],
                                "libs": [
                                    "hello"
                                ],
                                "rootpath": "/private/var/folders/yq/14hmvxm96xd7gfgl37_tnrbh0000gn/T/tmpqh89_yjyconans/path with spaces/.conan/data/name/version/user/channel/package/5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9",
                                "filter_empty": true
                            },
                            "debug": {
                                "includedirs": [
                                    "include"
                                ],
                                "libdirs": [
                                    "lib-debug"
                                ],
                                "resdirs": [
                                    "res"
                                ],
                                "bindirs": [
                                    "bin"
                                ],
                                "builddirs": [
                                    ""
                                ],
                                "libs": [
                                    "hello_d"
                                ],
                                "rootpath": "/private/var/folders/yq/14hmvxm96xd7gfgl37_tnrbh0000gn/T/tmpqh89_yjyconans/path with spaces/.conan/data/name/version/user/channel/package/5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9",
                                "filter_empty": true
                            }
                        }
                    }
                }
            ]
        }
    ]
}

@ghost ghost assigned jgsogo Mar 5, 2019

@ghost ghost added the stage: review label Mar 5, 2019

@jgsogo jgsogo added this to the 1.13 milestone Mar 5, 2019

@jgsogo jgsogo marked this pull request as ready for review Mar 5, 2019

@jgsogo jgsogo requested a review from lasote Mar 5, 2019

@lasote

This comment has been minimized.

Copy link
Contributor

commented Mar 6, 2019

The duplicated information has to be discussed:

  • To confirm that the information is also duplicated in the CMake generator.
  • Take a decision of how it should be (consistent everywhere)

@lasote lasote merged commit 4609d08 into conan-io:develop Mar 6, 2019

2 checks passed

continuous-integration/jenkins/pr-head This commit looks good
Details
license/cla Contributor License Agreement is signed.
Details

@ghost ghost removed the stage: review label Mar 6, 2019

@jgsogo jgsogo deleted the jgsogo:issue/4606-multi-json branch Mar 6, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.