Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nix
base: 16c485602738
Choose a base ref
...
head repository: NixOS/nix
compare: 872ba75d8b62
Choose a head ref
  • 10 commits
  • 34 files changed
  • 2 contributors

Commits on Feb 23, 2017

  1. Explicitly model all settings and fail on unrecognized ones

    Previously, the Settings class allowed other code to query for string
    properties, which led to a proliferation of code all over the place making
    up new options without any sort of central registry of valid options. This
    commit pulls all those options back into the central Settings class and
    removes the public get() methods, to discourage future abuses like that.
    
    Furthermore, because we know the full set of options ahead of time, we
    now fail loudly if someone enters an unrecognized option, thus preventing
    subtle typos. With some template fun, we could probably also dump the full
    set of options (with documentation, defaults, etc.) to the command line,
    but I'm not doing that yet here.
    copumpkin committed Feb 23, 2017
    Configuration menu
    Copy the full SHA
    e7cb284 View commit details
    Browse the repository at this point in the history

Commits on Apr 13, 2017

  1. Initialise logger

    edolstra committed Apr 13, 2017
    Configuration menu
    Copy the full SHA
    31cc936 View commit details
    Browse the repository at this point in the history
  2. Add warn function

    edolstra committed Apr 13, 2017
    Configuration menu
    Copy the full SHA
    6d97d81 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    568a099 View commit details
    Browse the repository at this point in the history
  4. Add a Config class to simplify adding configuration settings

    The typical use is to inherit Config and add Setting<T> members:
    
      class MyClass : private Config
      {
        Setting<int> foo{this, 123, "foo", "the number of foos to use"};
        Setting<std::string> bar{this, "blabla", "bar", "the name of the bar"};
    
        MyClass() : Config(readConfigFile("/etc/my-app.conf"))
        {
          std::cout << foo << "\n"; // will print 123 unless overriden
        }
      };
    
    Currently, this is used by Store and its subclasses for store
    parameters. You now get a warning if you specify a non-existant store
    parameter in a store URI.
    edolstra committed Apr 13, 2017
    Configuration menu
    Copy the full SHA
    2040240 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    1860070 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    0bf34de View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    6bd9576 View commit details
    Browse the repository at this point in the history
  8. Convert Settings to the new config system

    This makes all config options self-documenting.
    
    Unknown or unparseable config settings and --option flags now cause a
    warning.
    edolstra committed Apr 13, 2017
    1 Configuration menu
    Copy the full SHA
    ba9ad29 View commit details
    Browse the repository at this point in the history
  9. Add "nix show-config" command

    This dumps the entire Nix configuration, including all options that
    have default values.
    edolstra committed Apr 13, 2017
    3 Configuration menu
    Copy the full SHA
    872ba75 View commit details
    Browse the repository at this point in the history