denis-shienkov / vscode-qbs

Qbs Tools extension for VSCode
MIT License
24 stars 12 forks source link

Unify the `configurarion-name` and `overriden-properties` into one `configurations.json` file. #52

Closed denis-shienkov closed 3 years ago

denis-shienkov commented 3 years ago

Right now we use the separate overriden-properties.json file to store the overriden properties, and the separate build configurations button on the status bar.

In this case it is impossible to assign the overriden-properties for the specific build configuration.

The solution is to get rid of the overriden-properties.json file in vafor to the configurations.json file. In this case this configurations.json file may contains all build configurations and its overriden properties e.g. in a such format:

{
    "release": {
     // "key": "value" 
     },
    "debug": {
     },
    "profiling": {
     }
}

where the release, debug, profiling (or something custom) - are the build configurations maps, and the underlying dict is the map containing overriden-properties for each configuration (it is key -> value pairs).

Also we need to do the additional changes:

denis-shienkov commented 3 years ago

Right now it is implemented with the following configurations.json format:

[
    {
        "name": "release",
        "display-name": "Release",
        "description": "Enable optimizations.",
        "overridden-properties": {}
    },
    {
        "name": "debug",
        "display-name": "Debug",
        "description": "Disable optimizations.",
        "overridden-properties": {
            "projects.foo.hasSpecialFeature": false
        }
    },
    {
        "name": "profiling",
        "display-name": "Profiling",
        "description": "Enable profiling.",
        "overridden-properties": {}
    }
]

where the :

denis-shienkov commented 3 years ago

UPD: File configurations.json renamed with qbs-configurations.json.