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 configs to JSON generator #4657

Merged
merged 3 commits into from Mar 25, 2019

Conversation

Projects
None yet
2 participants
@jgsogo
Copy link
Member

commented Mar 5, 2019

Changelog: Fix: Include information about all the configurations in the JSON generator
Docs: conan-io/docs#1129

JSON generator was ignoring the configs in the output, after including them in this PR some fields are duplicated or have null values (version and description in the config subnodes), have a look at the test for more detailed information.

Full output for the included test (before there was no configs node):

{
    "deps_env_info": {
        "MY_ENV_VAR": "foo"
    },
    "deps_user_info": {
        "Hello": {
            "my_var": "my_value"
        }
    },
    "dependencies": [
        {
            "version": "0.1",
            "description": null,
            "rootpath": "/private/var/folders/yq/14hmvxm96xd7gfgl37_tnrbh0000gn/T/tmpkp9l_dovconans/path with spaces/.conan/data/Hello/0.1/lasote/testing/package/46f53f156846659bf39ad6675fa0ee8156e859fe",
            "sysroot": "",
            "include_paths": [],
            "lib_paths": [],
            "bin_paths": [],
            "build_paths": [
                "/private/var/folders/yq/14hmvxm96xd7gfgl37_tnrbh0000gn/T/tmpkp9l_dovconans/path with spaces/.conan/data/Hello/0.1/lasote/testing/package/46f53f156846659bf39ad6675fa0ee8156e859fe/"
            ],
            "res_paths": [],
            "libs": [],
            "defines": [],
            "cflags": [],
            "cppflags": [],
            "sharedlinkflags": [],
            "exelinkflags": [],
            "name": "Hello",
            "configs": {
                "debug": {
                    "version": null,
                    "description": null,
                    "rootpath": "/private/var/folders/yq/14hmvxm96xd7gfgl37_tnrbh0000gn/T/tmpkp9l_dovconans/path with spaces/.conan/data/Hello/0.1/lasote/testing/package/46f53f156846659bf39ad6675fa0ee8156e859fe",
                    "sysroot": "",
                    "include_paths": [],
                    "lib_paths": [],
                    "bin_paths": [],
                    "build_paths": [
                        "/private/var/folders/yq/14hmvxm96xd7gfgl37_tnrbh0000gn/T/tmpkp9l_dovconans/path with spaces/.conan/data/Hello/0.1/lasote/testing/package/46f53f156846659bf39ad6675fa0ee8156e859fe/"
                    ],
                    "res_paths": [],
                    "libs": [
                        "Hello_d"
                    ],
                    "defines": [
                        "LIB_DEBUG"
                    ],
                    "cflags": [],
                    "cppflags": [],
                    "sharedlinkflags": [],
                    "exelinkflags": []
                },
                "release": {
                    "version": null,
                    "description": null,
                    "rootpath": "/private/var/folders/yq/14hmvxm96xd7gfgl37_tnrbh0000gn/T/tmpkp9l_dovconans/path with spaces/.conan/data/Hello/0.1/lasote/testing/package/46f53f156846659bf39ad6675fa0ee8156e859fe",
                    "sysroot": "",
                    "include_paths": [],
                    "lib_paths": [],
                    "bin_paths": [],
                    "build_paths": [
                        "/private/var/folders/yq/14hmvxm96xd7gfgl37_tnrbh0000gn/T/tmpkp9l_dovconans/path with spaces/.conan/data/Hello/0.1/lasote/testing/package/46f53f156846659bf39ad6675fa0ee8156e859fe/"
                    ],
                    "res_paths": [],
                    "libs": [
                        "Hello"
                    ],
                    "defines": [
                        "LIB_RELEASE"
                    ],
                    "cflags": [],
                    "cppflags": [],
                    "sharedlinkflags": [],
                    "exelinkflags": []
                }
            }
        }
    ],
    "settings": {
        "arch": "x86_64",
        "arch_build": "x86_64",
        "build_type": "Release",
        "compiler": "apple-clang",
        "compiler.libcxx": "libc++",
        "compiler.version": "10.0",
        "os": "Macos",
        "os_build": "Macos"
    },
    "options": {
        "Hello": {}
    }
}

@ghost ghost assigned jgsogo Mar 5, 2019

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

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

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

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

@lasote

This comment has been minimized.

Copy link
Contributor

commented Mar 5, 2019

after including them in this PR some fields are duplicated or have null values

So what are you proposing? Should it be fixed as the test say? when?

@lasote lasote modified the milestones: 1.13, 1.14 Mar 5, 2019

@jgsogo

This comment has been minimized.

Copy link
Member Author

commented Mar 5, 2019

It would require a refactor of the CppInfo and we didn't want to do it now as we talked about for #4656. I don't know what to do, that's the reason I'm pointing it out in the comment: to grab your opinion about it.

@jgsogo

This comment has been minimized.

Copy link
Member Author

commented Mar 5, 2019

...a refactor of the CppInfo object or more work in the JSON generator to detect and avoid these duplicated fields (although I think that the former one should be preferred).

@lasote

This comment has been minimized.

Copy link
Contributor

commented Mar 5, 2019

Convert this to a draft please. We will talk this for the next release.

@jgsogo

This comment has been minimized.

Copy link
Member Author

commented Mar 5, 2019

I think it cannot be downgraded to draft once it is ready for review 😞

@lasote

lasote approved these changes Mar 20, 2019

Copy link
Contributor

left a comment

@jgsogo

This comment has been minimized.

Copy link
Member Author

commented Mar 20, 2019

Done!

@lasote lasote merged commit 0bce0fb into conan-io:develop Mar 25, 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 25, 2019

@jgsogo jgsogo deleted the jgsogo:fix/json-generator branch Mar 25, 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.