Skip to content

A package's features in a JSON query (mcpp search or a query of one package) #992

Closed

Description

@Sunrisepeak

What is asked

A machine-readable statement of the features a package declares, by package and version:

Field Meaning
name the feature
default whether it is on without being named
implies the features it turns on
description one line for a reader; optional, from the package's descriptor

Either in each package of mcpp search --format json, or as a query of one package. A name in
features of mcpp --protocol-version (for example package-features) lets a client tell that the
answer is there.

Why

mcpp-ide shows only what mcpp states and does not read an index's descriptors (mcpp-ide AGENTS.md,
"Only mcpp's contract"). Two requests there ask for a package's features in the editors:
mcpp-community/mcpp-ide#16 and mcpp-community/mcpp-ide#17 (completion inside features = [...], a
hover, a diagnostic for an unknown name, checkboxes in a package's detail).

Until mcpp states them, mcpp-ide answers the features of path and workspace dependencies only,
which it reads from the dependency's own mcpp.toml.

What mcpp states now

mcpp 2026.11.9.1, on compat.harfbuzz of the mcpplibs index, whose descriptor declares
features = { ["no-freetype"] = {} }:

  • mcpp search harfbuzz --format json: the package has description, id, index, licenses,
    name, namespace, repo, versions. No features.
  • mcpp xpkg parse <descriptor> --format json: data has generated_contents, generated_files,
    import_std, include_dirs, name, namespace, sources, standard, targets,
    unknown_keys, versions. No features.

Not asked

No change to how features resolve, and no editor concept. A descriptor's description of a feature is
optional; without it the query still answers the names.

Activity

  1. speak-agent commented on Nov 22, 2026

    @speak-agent
    Member

    Released in mcpp 2026.11.21.1 (#984): mcpp search --format json states the features of each package's newest version (features: version, state, from, list), read from the index or the installed payload, and installs nothing; mcpp why features [--format json] lists each package of the resolved graph with the features it declares and those the build activates. --protocol-version lists package-features (SPEC-004 §16, docs/06).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions