Unverified Commit cb2a59dd authored by github-actions[bot]'s avatar github-actions[bot] Committed by GitHub
Browse files

Merge master into staging-next

parents a4c1084d 267148d1
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -311,6 +311,9 @@ checkConfigOutput '^"hello"$' config.theOption.str ./optionTypeMerging.nix
# Test that types.optionType correctly annotates option locations
checkConfigError 'The option .theOption.nested. in .other.nix. is already declared in .optionTypeFile.nix.' config.theOption.nested ./optionTypeFile.nix

# Test that types.optionType leaves types untouched as long as they don't need to be merged
checkConfigOutput 'ok' config.freeformItems.foo.bar ./adhoc-freeformType-survives-type-merge.nix

cat <<EOF
====== module tests ======
$pass Pass
+14 −0
Original line number Diff line number Diff line
{ lib, ... }: {
  options.dummy = lib.mkOption { type = lib.types.anything; default = {}; };
  freeformType =
    let
      a = lib.types.attrsOf (lib.types.submodule { options.bar = lib.mkOption { }; });
    in
    # modifying types like this breaks type merging.
    # This test makes sure that type merging is not performed when only a single declaration exists.
    # Don't modify types in practice!
    a // {
      merge = loc: defs: { freeformItems = a.merge loc defs; };
    };
  config.foo.bar = "ok";
}
+3 −1
Original line number Diff line number Diff line
@@ -535,7 +535,9 @@ rec {
      description = "optionType";
      check = value: value._type or null == "option-type";
      merge = loc: defs:
        let
        if length defs == 1
        then (head defs).value
        else let
          # Prepares the type definitions for mergeOptionDecls, which
          # annotates submodules types with file locations
          optionModules = map ({ value, file }:
+6 −0
Original line number Diff line number Diff line
@@ -9260,6 +9260,12 @@
    githubId = 23431373;
    name = "Christoph Neidahl";
  };
  opeik = {
    email = "sandro@stikic.com";
    github = "opeik";
    githubId = 11566773;
    name = "Sandro Stikić";
  };
  orbekk = {
    email = "kjetil.orbekk@gmail.com";
    github = "orbekk";
+7 −0
Original line number Diff line number Diff line
@@ -256,6 +256,13 @@
          <link xlink:href="options.html#opt-services.ethercalc.enable">services.ethercalc</link>.
        </para>
      </listitem>
      <listitem>
        <para>
          <link xlink:href="https://nbd.sourceforge.io/">nbd</link>, a
          Network Block Device server. Available as
          <link xlink:href="options.html#opt-services.nbd.server.enable">services.nbd</link>.
        </para>
      </listitem>
      <listitem>
        <para>
          <link xlink:href="https://timetagger.app">timetagger</link>,
Loading