Commit Graph

239336 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
zimbatm
a19e16756b
Merge pull request #95659 from numtide/nixpkgs-fmt
nixpkgs-fmt: 0.9.0 -> 1.0.0
2020-08-18 15:23:55 +02:00
Andika Demas Riyandi
f85c04ab55
nixpkgs-fmt: 0.9.0 -> 1.0.0 2020-08-18 20:18:59 +07:00
Silvan Mosberger
cfd599e117
Merge pull request #95743 from Ma27/qemu-test-out
nixos/test-instrumentation: properly import `options` for `qemu`-check
2020-08-18 14:29:50 +02:00
Martin Weinelt
6622ba5b25
Merge pull request #95708 from Ma27/matrix-updates
Bump a few packages related to the Matrix ecosystem
2020-08-18 14:19:04 +02:00
Martin Weinelt
392ca2ce5a
linuxPackages.rtl8192eu: 4.4.1.20190319 -> 4.4.1.20200620
Fixes #95448

Co-Authored-By: Dmitry Geurkov <d.geurkov@gmail.com>
2020-08-18 14:15:20 +02:00
David McFarland
041f70f62f p4v: 2017.3.1601999 -> 2020.1.1966006 2020-08-18 09:10:26 -03:00
David McFarland
552c4d84ca patchelfUnstable: 2020-06-03 -> 2020-07-11 2020-08-18 09:10:26 -03:00
Tim Steinbach
bae91fb6c9
jenkins: 2.235.3 -> 2.235.5 2020-08-18 08:02:31 -04:00
Tim Steinbach
1cdddfef4b
oh-my-zsh: 2020-08-06 -> 2020-08-17 2020-08-18 08:02:25 -04:00
Gabriel Ebner
08639bcd13
Merge pull request #95701 from gebner/smaller_source_han
source-han-*: reduce closure size by 2x
2020-08-18 12:54:31 +02:00
wucke13
9ce2c3804a mattermost: 5.25.0 -> 5.25.3 2020-08-18 12:29:34 +02:00
Maximilian Bosch
2fbddb0ccb
nixos/test-instrumentation: properly import options for qemu-check
If `qemu-vm.nix` is imported, the option `virtualisation.qemu.consoles`
should be set to make sure that the machine's output isn't rendered on
the graphical window of QEMU.

This is needed when interactively running a NixOS test or in conjunction
with `nixos-build-vms(8)`.

The patch 2578557530 tries to only do this
if the option actually exists, however this condition used to be always
false since `options` wasn't imported in the module and pointed to
`lib.options` due to the `with lib;`-clause.
2020-08-18 12:26:49 +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
Mario Rodas
34310d1727
buildpack: 0.7.0 -> 0.13.0 2020-08-18 04:20:00 -05:00
Mario Rodas
b7e0beb306
nnn: 3.3 -> 3.4
https://github.com/jarun/nnn/releases/tag/v3.4
2020-08-18 04:20:00 -05:00
Mario Rodas
edb74a6b89
scheme-manpages: 2020-05-17 -> 2020-08-14 2020-08-18 04:20:00 -05: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
Jörg Thalheim
dca51dc3fd
buildFHSUserEnvChrootenv: rename to buildFHSUserEnvChroot 2020-08-18 07:42:41 +01: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
R. RyanTM
262be88e10 qt5ct: 1.0 -> 1.1 2020-08-18 05:11:14 +00: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
R. RyanTM
8336ba3888 virt-manager-qt: 0.70.91 -> 0.71.95 2020-08-18 04:12:12 +00: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