packages feed

nix-diff 1.0.2 → 1.0.3

raw patch · 3 files changed

+7/−7 lines, 3 files

Files

README.md view
@@ -1,4 +1,4 @@-# `nix-diff 1.0.2`+# `nix-diff 1.0.3`  This package provides a `nix-diff` executable which explains why two Nix derivations differ.  The most common use cases for this are:
nix-diff.cabal view
@@ -1,5 +1,5 @@ name:                nix-diff-version:             1.0.2+version:             1.0.3 synopsis:            Explain why two Nix derivations differ description:         This package provides a @nix-diff@ executable which                      explains why two Nix derivations (i.e. @*.drv@ files)
src/Main.hs view
@@ -366,8 +366,8 @@                 echo ("    " <> explain arg)         mapM_ renderDiff diffs -diff :: FilePath -> Set Text -> FilePath -> Set Text -> Diff ()-diff leftPath leftOutputs rightPath rightOutputs = do+diff :: Bool -> FilePath -> Set Text -> FilePath -> Set Text -> Diff ()+diff topLevel leftPath leftOutputs rightPath rightOutputs = do     Status { visited } <- get     let diffed = Diffed leftPath leftOutputs rightPath rightOutputs     if leftPath == rightPath@@ -380,7 +380,7 @@         diffWith (leftPath, leftOutputs) (rightPath, rightOutputs) $ \(sign, (path, outputs)) -> do             echo (sign (pathToText path <> renderOutputs outputs)) -        if derivationName leftPath /= derivationName rightPath+        if derivationName leftPath /= derivationName rightPath && not topLevel         then do             echo (explain "The derivation names do not match")         else if leftOutputs /= rightOutputs@@ -432,7 +432,7 @@                     ([(leftPath', leftOutputs')], [(rightPath', rightOutputs')])                         | leftOutputs' == rightOutputs' -> do                         echo (explain ("The input named `" <> inputName <> "` differs"))-                        indented 2 (diff leftPath' leftOutputs' rightPath' rightOutputs')+                        indented 2 (diff False leftPath' leftOutputs' rightPath' rightOutputs')                         return True                     _ -> do                         echo (explain ("The set of inputs named `" <> inputName <> "` do not match"))@@ -464,5 +464,5 @@     let indent = 0     let context = Context { tty, indent }     let status = Status Data.Set.empty-    let action = diff left (Data.Set.singleton "out") right (Data.Set.singleton "out")+    let action = diff True left (Data.Set.singleton "out") right (Data.Set.singleton "out")     Control.Monad.State.evalStateT (Control.Monad.Reader.runReaderT (unDiff action) context) status