Skip to content

Commit

Permalink
Print dependency JSON without prettification
Browse files Browse the repository at this point in the history
And thus remove dependency on `aeson-pretty`
[commercialhaskell#4101]
  • Loading branch information
akshaymankar committed Jun 18, 2019
1 parent 245a814 commit b3beeb2
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
1 change: 0 additions & 1 deletion package.yaml
Expand Up @@ -47,7 +47,6 @@ ghc-options:
dependencies:
- Cabal
- aeson
- aeson-pretty
- annotated-wl-pprint
- ansi-terminal
- array
Expand Down
3 changes: 1 addition & 2 deletions src/Stack/Dot.hs
Expand Up @@ -16,7 +16,6 @@ module Stack.Dot (dot
) where

import Data.Aeson
import Data.Aeson.Encode.Pretty
import qualified Data.ByteString.Lazy.Char8 as LBC8
import qualified Data.Foldable as F
import qualified Data.Sequence as Seq
Expand Down Expand Up @@ -202,7 +201,7 @@ pkgLocToJSON (PLImmutable (PLIRepo repo _)) = object [ "type" .= case repoType r
printJSON :: Set PackageName
-> Map PackageName (Set PackageName, DotPayload)
-> IO ()
printJSON pkgs dependencyMap = LBC8.putStrLn $ encodePretty $ DependencyTree pkgs dependencyMap
printJSON pkgs dependencyMap = LBC8.putStrLn $ encode $ DependencyTree pkgs dependencyMap

treeRoots :: ListDepsOpts -> Set PackageName -> Set PackageName
treeRoots opts projectPackages' =
Expand Down

0 comments on commit b3beeb2

Please sign in to comment.