Commit Graph

239126 Commits

Author SHA1 Message Date
Maximilian Bosch fa30c9abed
lib/modules: improve error-message for undeclared options if prefix contains 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'.
2020-08-18 15:25:26 +02:00
Frederik Rietdijk fe7bab33d7
Merge pull request #95553 from zowoq/rename-maintainers
maintainers: prefix number with underscore
2020-08-18 11:30:24 +02:00
Daniël de Kok e0c07bc2e2 gocode-gomod: add vendorSha256 2020-08-18 19:16:53 +10:00
Maximilian Bosch 30842d0263
Merge pull request #95718 from Infinisil/fixup-nonexistant-option-error
lib/modules: Fix nonexistant option error
2020-08-18 11:12:39 +02:00
Jan Tojnar ef5246f027
Merge pull request #95671 from dasj19/aisleriot-update
aisleriot: 3.22.9 -> 3.22.11
2020-08-18 11:10:24 +02:00
markuskowa 0657fe4bf4
Merge pull request #93379 from lasandell/direwolf-1.5
direwolf 1.4 -> 1.5
2020-08-18 10:40:45 +02:00
Jonathan Ringer 8a9f58a375 python3Packages.dask: ignore flaky test 2020-08-18 00:41:41 -07:00
Jaka Hudoklin 0f976477e9
Merge pull request #89724 from xtruder/pkgs/gocode-gomod/1.0.0
gocode-gomod: 2019-03-27 -> 1.0.0
2020-08-18 08:46:04 +02:00
Jaka Hudoklin 5e6bc32cbb
Merge pull request #93276 from xtruder/pkgs/protonvpn-linux-gui/init
protonvpn-gui: init at 2.1.1
2020-08-18 08:42:14 +02:00
Jonathan Ringer 7550aab312 azure-cli: lessen number of overrides 2020-08-17 23:33:38 -07:00
Frederik Rietdijk 6770ab0771
Merge pull request #95700 from jonringer/doc-pytestcheckhook
doc/python: add pytestCheckHook section
2020-08-18 08:21:42 +02:00
zowoq 83a1f0ac0a maintainers: remove unneeded quotes from handles 2020-08-18 15:13:23 +10:00
Sarah Brofeldt c5815280e9
Merge pull request #94134 from dtzWill/update/steamrt-0.20200720.0
steam-runtime: 0.20200604.0 -> 0.20200720.0
2020-08-18 07:03:37 +02:00
Roger Qiu 670c094af1 pythonPackages.aiojobs: init at 0.2.2 2020-08-17 20:18:51 -07:00
Silvan Mosberger 7db9fd1dbc
Merge pull request #81467 from dawidsowa/rss-bridge
rss-bridge: init at 2020-02-26
2020-08-18 05:00:41 +02:00
Philipp Riegger 162864341d factorio: update all x86_64 versions to 1.0.0 2020-08-17 18:48:57 -07:00
RonanMacF eddeae2328 vimPlugins.vim-matchup: init at 2020-08-16 2020-08-17 17:46:59 -07:00
RonanMacF 770acba6de vimPlugins.vim-carbon-now-sh: init at 2019-02-14 2020-08-17 17:46:59 -07:00
RonanMacF 2d101df18c vimPlugins.vim-smoothie: init at 2019-12-02 2020-08-17 17:46:59 -07:00
Mario Rodas 8bdebd463b
Merge pull request #95670 from marsam/update-tflint
tflint: 0.18.0 -> 0.19.0
2020-08-17 19:31:57 -05:00
zowoq 0dc28e4475 smimesign: 0.0.13 -> 0.1.0 2020-08-18 10:25:43 +10:00
markuskowa 1551f30187
Merge pull request #81606 from markuskowa/upd-slurm
slurm: 19.05.5.1 -> 20.02.4.1
2020-08-18 01:33:31 +02:00
Bart Brouns 14ecb0336c
uhhyou.lv2: init at unstable-2020-07-31 (#89171) 2020-08-17 22:56:53 +00:00
Bart Brouns 9e3b2a9a59
freqtweak: init at unstable-2019-08-03 (#82825) 2020-08-17 22:26:17 +00:00
Bart Brouns b2ad9bffec
kapitonov-plugins-pack: init at 1.2.1 (#85496) 2020-08-17 22:25:45 +00:00
Silvan Mosberger d5700d626c
lib/modules: Fix nonexistant option error
The refactoring in fd75dc8765
introduced a mistake in the error message that doesn't show the full
context anymore. E.g. with this module:

  options.foo.bar = lib.mkOption {
    type = lib.types.submodule {
      baz = 10;
    };
    default = {};
  };

You'd get the error

  The option `baz' defined in `/home/infinisil/src/nixpkgs/config.nix' does not exist.

instead of the previous

  The option `foo.bar.baz' defined in `/home/infinisil/src/nixpkgs/config.nix' does not exist.

This commit undoes this regression
2020-08-18 00:12:36 +02:00
zowoq 17f765b67b maintainers: add note about underscore prefix for handles 2020-08-18 07:59:48 +10:00
zowoq 0052523a18 maintainers: 1000101 -> _1000101 2020-08-18 07:59:48 +10:00
zowoq 7d9c49f8e6 maintainers: 0x4A6F -> _0x4A6F 2020-08-18 07:59:44 +10:00
Silvan Mosberger c6aa9e4af6
Merge pull request #95681 from flokli/fontconfig-penultimate-remove
nixos/fonts: remove fontconfig-penultimate
2020-08-17 23:47:52 +02:00
Alyssa Ross 6f4a508a38 squashfs-tools-ng: 1.0.0 -> 1.0.1 2020-08-17 21:39:52 +00:00
Matthew Bauer d2fce26c40
Merge pull request #95363 from lopsided98/crda-cross
crda: fix cross compilation
2020-08-17 16:24:35 -05:00
Florian Klink 8c065b27e3
Merge pull request #95716 from flokli/fontconfig-fix-50-user.conf
nixos/fontconfig: fix 50-user.conf handling
2020-08-17 23:24:20 +02:00
Matthew Bauer 21d0eb3b32
Merge pull request #95680 from helsinki-systems/feat/john/perl
john: ship internal perl modules
2020-08-17 16:22:08 -05:00
Matthew Bauer a4fd659299
Merge pull request #95702 from Thra11/fix-llvm-10-aarch32
llvm_10: disable failing test on 32-bit ARM
2020-08-17 16:21:37 -05:00
Florian Klink 8425726f86 nixos/fontconfig: fix 50-user.conf handling
Apparently, edf2541f02 was missed while
rebasing https://github.com/NixOS/nixpkgs/pull/93562.

Provide 50-user.conf in fontconfig if includeUserConf is true (the
default), and don't try removing the non-existent one if it's disabled

Fixes https://github.com/NixOS/nixpkgs/issues/95685
Fixes https://github.com/NixOS/nixpkgs/issues/95712
2020-08-17 23:12:57 +02:00
Jonathan Ringer 233dc9c7d1
doc/python: Add pythonImportsCheck mention 2020-08-17 13:41:39 -07:00
Jonathan Ringer 93e7292976
doc/python: add pytestCheckHook section 2020-08-17 13:41:39 -07:00
Florian Klink d45c287d9a
Merge pull request #95580 from flokli/binwalk-visual-entropy-graphing
binwalk-full: enable visual entropy graphing (needs matplotlib)
2020-08-17 22:18:52 +02:00
Vladyslav M 644ecea529
Merge pull request #95651 from danieldk/broot-0.20.0
broot: 0.19.4 -> 0.20.0
2020-08-17 22:35:24 +03:00
Daniël de Kok a470a23a77 python3Packages.finalfusion: init at 0.7.1 2020-08-17 12:29:16 -07:00
Daniël de Kok 5454cf2053 licenses: add BlueOak-1.0.0 2020-08-17 12:29:16 -07:00
Florian Klink 4391dcb742
Merge pull request #95635 from Profpatsch/bgnet-fix
bgnet: 3.0.21 -> 3.1.2
2020-08-17 21:18:45 +02:00
Daniël de Kok fd2c6cd7ea
Merge pull request #95667 from JohnTitor/cargo-crev-0.17.0
cargo-crev: 0.16.1 -> 0.17.0
2020-08-17 20:56:33 +02:00
Jörg Thalheim 8b18e07c40
Merge pull request #95522 from doronbehar/fix/transmission
nixos/transmission: handle watch-dir
2020-08-17 19:54:48 +01:00
Jörg Thalheim 914d37cbc9
Merge pull request #95686 from ju1m/transmission-fix
transmission: fix BindReadOnlyPaths=
2020-08-17 19:52:27 +01:00
Gabriel Ebner a0a80cc8f8
Merge pull request #95703 from gebner/vampire451
vampire: 4.4 -> 4.5.1
2020-08-17 20:47:18 +02:00
Yuki Okushi 2efb6ad0f0 cargo-crev: 0.16.1 -> 0.17.0 2020-08-17 20:46:02 +02:00
Daniël de Kok 02446aa671
Merge pull request #95698 from oxalica/rust-analyzer
rust-analyzer: 2020-08-10 -> 2020-08-17
2020-08-17 20:36:18 +02:00
Gabriel Ebner 7f31fe9ea6 vampire: 4.4 -> 4.5.1 2020-08-17 19:39:32 +02:00