Skip to content

Confusion about supports field in features #17651

@dg0yt

Description

@dg0yt

Under the "features" and "default-features" headline, the manifest documentation for users states:

There's also the "supports" field, which again acts exactly like the "supports" field on the global package.

https://github.com/microsoft/vcpkg/blame/master/docs/users/manifests.md#L228-L229

However, there is no such field in the schema:

"feature": {
"description": "A package feature that can be activated by consumers.",
"type": "object",
"properties": {
"description": {
"$ref": "#/definitions/description-field"
},
"dependencies": {
"description": "Dependencies used by this feature.",
"type": "array",
"items": {
"$ref": "#/definitions/dependency"
}
}
},
"patternProperties": {
"^\\$": {}
},
"required": [
"description"
],
"additionalProperties": false
}

And the vcpkg tool complains if you try to use it (here the attempt to use it for a new feature in a port, not in manifest mode):

$ ./vcpkg format-manifest ports/libmicrohttpd/vcpkg.json 
Failed to parse manifest file: /vcpkg/ports/libmicrohttpd/vcpkg.json
Errors occurred while parsing /vcpkg/ports/libmicrohttpd/vcpkg.json
    $.features.https (a feature): unexpected field 'supports', did you mean 'description'?

So what is the state of the supports field in dependenciesfeatures?

Metadata

Metadata

Labels

category:documentationTo resolve the issue, documentation will need to be updated

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions