Skip to content

nix describe-stores --json format is not extensible #7824

@roberth

Description

@roberth

Describe the bug

This json output makes the fatal mistake of putting a dictionary inside a dictionary. This is not extensible; we'll have to break the format.

Definitions

  • dictionary: a map from names to things that all have the same type (C++ std::map)
  • record: a fixed set of attributes each with their own type (C++ struct)

Steps To Reproduce

Try to add a non-setting field to the store description object, e.g. the URI scheme. You can't, because it will be interpreted as an option.

Expected behavior

A clear and concise description of what you expected to happen.

nix-env --version output

Additional context

We need JSON guidelines.

Priorities

Add 👍 to issues you find important.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugidea approvedThe given proposal has been discussed and approved by the Nix team. An implementation is welcome.new-cliRelating to the "nix" command

    Projects

    Status

    Done

    Status

    Done

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions