File tree Expand file tree Collapse file tree 4 files changed +7
-10
lines changed
Expand file tree Collapse file tree 4 files changed +7
-10
lines changed Original file line number Diff line number Diff line change @@ -429,15 +429,16 @@ checkConfigOutput '^null$' config.value.l1.l2.foo ./types-anything/nested-attrs.
429429checkConfigOutput ' ^null$' config.value.l1.l2.l3.foo ./types-anything/nested-attrs.nix
430430# Attribute sets that are coercible to strings shouldn't be recursed into
431431checkConfigOutput ' ^"foo"$' config.value.outPath ./types-anything/attrs-coercible.nix
432- # Multiple lists aren't concatenated together
433- checkConfigError ' The option .* has conflicting definitions ' config.value ./types-anything/lists.nix
432+ # Multiple lists aren't concatenated together if their definitions are not equal
433+ checkConfigError ' The option .* has conflicting definition values ' config.value ./types-anything/lists.nix
434434# Check that all equalizable atoms can be used as long as all definitions are equal
435435checkConfigOutput ' ^0$' config.value.int ./types-anything/equal-atoms.nix
436436checkConfigOutput ' ^false$' config.value.bool ./types-anything/equal-atoms.nix
437437checkConfigOutput ' ^""$' config.value.string ./types-anything/equal-atoms.nix
438438checkConfigOutput ' ^"/[^"]+"$' config.value.path ./types-anything/equal-atoms.nix
439439checkConfigOutput ' ^null$' config.value.null ./types-anything/equal-atoms.nix
440440checkConfigOutput ' ^0.1$' config.value.float ./types-anything/equal-atoms.nix
441+ checkConfigOutput ' ^\[1,"a",{"x":null}\]$' config.value.list ./types-anything/equal-atoms.nix
441442# Functions can't be merged together
442443checkConfigError " The option .value.multiple-lambdas.<function body>. has conflicting option types" config.applied.multiple-lambdas ./types-anything/functions.nix
443444checkConfigOutput ' ^true$' config.valueIsFunction.single-lambda ./types-anything/functions.nix
Original file line number Diff line number Diff line change 1212 value . path = ./. ;
1313 value . null = null ;
1414 value . float = 0.1 ;
15+ value . list = [ 1 "a" { x = null ; } ] ;
1516 }
1617 {
1718 value . int = 0 ;
2021 value . path = ./. ;
2122 value . null = null ;
2223 value . float = 0.1 ;
24+ value . list = [ 1 "a" { x = null ; } ] ;
2325 }
2426 ] ;
2527
Original file line number Diff line number Diff line change 66
77 config = lib . mkMerge [
88 {
9- value = [ null ] ;
9+ value = [ "a value" ] ;
1010 }
1111 {
12- value = [ null ] ;
12+ value = [ "another value" ] ;
1313 }
1414 ] ;
1515
Original file line number Diff line number Diff line change @@ -253,12 +253,6 @@ rec {
253253 mergeFunction = {
254254 # Recursively merge attribute sets
255255 set = ( attrsOf anything ) . merge ;
256- # Safe and deterministic behavior for lists is to only accept one definition
257- # listOf only used to apply mkIf and co.
258- list =
259- if length defs > 1
260- then throw "The option `${ showOption loc } ' has conflicting definitions, in ${ showFiles ( getFiles defs ) } ."
261- else ( listOf anything ) . merge ;
262256 # This is the type of packages, only accept a single definition
263257 stringCoercibleSet = mergeOneOption ;
264258 lambda = loc : defs : arg : anything . merge
You can’t perform that action at this time.
0 commit comments