Skip to content
This repository has been archived by the owner on Apr 12, 2021. It is now read-only.
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/nixpkgs-channels
base: cfd599e1177f
Choose a base ref
...
head repository: NixOS/nixpkgs-channels
compare: f8962fd92ed4
Choose a head ref
  • 7 commits
  • 5 files changed
  • 6 contributors

Commits on Aug 17, 2020

  1. nixpkgs-fmt: 0.9.0 -> 1.0.0

    Rizary committed Aug 17, 2020
    Copy the full SHA
    ee803f3 View commit details
    Browse the repository at this point in the history

Commits on Aug 18, 2020

  1. nixpkgs-fmt: 0.9.0 -> 1.0.0

    Rizary committed Aug 18, 2020
    Copy the full SHA
    f85c04a View commit details
    Browse the repository at this point in the history
  2. Merge pull request #95659 from numtide/nixpkgs-fmt

    nixpkgs-fmt: 0.9.0 -> 1.0.0
    zimbatm committed Aug 18, 2020
    Copy the full SHA
    a19e167 View commit details
    Browse the repository at this point in the history
  3. lib/modules: improve error-message for undeclared options if prefix c…

    …ontains no options
    
    An easy-to-make mistake when declaring e.g. a submodule is the accidental
    confusion of `options` and `config`:
    
        types.submodule {
          config = {
            foo = mkOption { /* ... */ };
          };
        }
    
    However the error-message
    
      The option `[definition 1-entry 1].foo' defined in `<expr.nix>' does not exist.
    
    is fairly unhelpful because it seems as the options are declared at the
    first sight. In fact, it took a colleague and me a while to track down such
    a mistake a few days ago and we both agreed that this should be somehow caught
    to save the time we spent debugging the module in question.
    
    At first I decided to catch this error in the `submodules`-type directly
    by checking whether `options` is undeclared, however this becomes fairly
    complicated as soon as a submodule-declaration e.g. depends on existing
    `config`-values which would've lead to some ugly `builtins.tryExec`-heuristic.
    
    This patch now simply checks if the option's prefix has any options
    defined if a point in evaluation is reached where it's clear that the
    option in question doesn't exist. This means that this patch doesn't
    change the logic of the module system, it only provides a more detailed
    error in certain cases:
    
      The option `[definition 1-entry 1].foo' defined in `<expr.nix>' does not exist.
    
      However it seems as there are no options defined in [definition 1-entry 1]. Are you sure you've
      declared your options properly? This happens if you e.g. declared your options in `types.submodule'
      under `config' rather than `options'.
    Ma27 committed Aug 18, 2020
    Copy the full SHA
    fa30c9a View commit details
    Browse the repository at this point in the history
  4. Copy the full SHA
    f9b57fd View commit details
    Browse the repository at this point in the history
  5. linux: 5.8-rc7 -> 5.9-rc1

    NeQuissimus committed Aug 18, 2020
    Copy the full SHA
    0a84375 View commit details
    Browse the repository at this point in the history
  6. Merge pull request #95446 from Ma27/improve-opt-not-defined-error

    lib/modules: improve error-message for undeclared options if prefix contains no options
    infinisil committed Aug 18, 2020
    Copy the full SHA
    f8962fd View commit details
    Browse the repository at this point in the history