nixpkgs-suyu/lib
Silvan Mosberger 998a9c1707 lib/options: Better mergeEqualOption error for uncomparable types
For an option definition that uses `lib.options.mergeEqualOption`
underneath, like `types.anything`, an error is thrown when multiple
functions are assigned, indicating that functions can't be compared for
equivalence:

  error: The option `test' has conflicting definition values:
  - In `xxx': <function>
  - In `xxx': <function>
  (use '--show-trace' to show detailed location information)

However, the error message didn't use the correct files. While above
error indicates that both definitions are in the xxx file, that's in
fact not true. Above error was generated with

  options.test = lib.mkOption {
    type = lib.types.anything;
  };

  imports = [
    {
      _file = "yyy";
      test = y: y;
    }
    {
      _file = "xxx";
      test = x: x;
    }
  ];

With this change, the error uses the correct file locations:

  error: The option `test' has conflicting definition values:
  - In `xxx': <function>
  - In `yyy': <function>
  (use '--show-trace' to show detailed location information)
2021-08-10 19:54:32 +02:00
..
systems lib.systems: add m68k-netbsd support 2021-08-01 15:27:12 +00:00
tests Merge pull request #131267 from blaggacao/fix-functionArgs 2021-08-04 00:02:57 +02:00
asserts.nix
attrsets.nix Merge pull request #110742 from siraben/deprecate-fold 2021-07-27 15:13:31 +07:00
cli.nix
customisation.nix treewide: Do a number of no-op cleanups for cross and darwin 2021-05-06 11:17:26 -04:00
debug.nix
default.nix lib.mkFixStrictness: Deprecate 2021-07-12 07:31:29 +02:00
deprecated.nix
fetchers.nix
filesystem.nix
fixed-points.nix
flake.nix init: lib/flake 2021-04-28 14:21:27 -05:00
generators.nix lib/generators: add toDhall 2021-04-01 14:29:57 +02:00
kernel.nix
licenses.nix treewide: use quotes for url 2021-06-20 16:26:23 +02:00
lists.nix
meta.nix lib.meta: introduce availableOn 2021-04-02 19:20:23 +08:00
minver.nix
modules.nix lib.mkFixStrictness: Deprecate 2021-07-12 07:31:29 +02:00
options.nix lib/options: Better mergeEqualOption error for uncomparable types 2021-08-10 19:54:32 +02:00
sources.nix lib.sources.trace: init 2021-05-29 16:03:55 +02:00
strings-with-deps.nix
strings.nix strings.nix: Fix overly monomorphic type signature comments 2021-07-04 20:52:48 +02:00
trivial.nix lib: fix functionArgs for functors 2021-08-03 16:40:58 -05:00
types.nix Merge pull request #128032 from Artturin/add-swap-options 2021-07-23 10:45:53 +02:00
versions.nix
zip-int-bits.nix