packages feed

cabal-bounds 1.5.0 → 1.6.0

raw patch · 55 files changed

+266/−186 lines, 55 filesdep ~Cabaldep ~Globdep ~aeson

Dependency ranges changed: Cabal, Glob, aeson, either, lens, tasty

Files

CHANGELOG view
@@ -1,3 +1,9 @@+1.6.0+-----+* Support Cabal 2.2+* Tested with GHC 8.4.2+* Added cabal-bounds command 'format', for just reformating the cabal file+ 1.5.0 ----- * Support Cabal 2.1
README.md view
@@ -180,7 +180,4 @@ Perhaps the currently most annoying thing is, that you have to live with the reformating of your `cabal` file done by the pretty printer of the `Cabal` library. -To reformat your `cabal` file without changing any bounds you can call `cabal-bounds` with the name of-a section that isn't present in the `cabal` file:--    $> cabal-bounds drop --executable=blub+To only reformat your `cabal` file you can call `cabal-bounds format`.
cabal-bounds.cabal view
@@ -1,10 +1,12 @@-name: cabal-bounds-version: 1.5.0 cabal-version: >=1.9.2-build-type: Simple+name: cabal-bounds+version: 1.6.0 license: BSD3 license-file: LICENSE maintainer: daniel.trstenjak@gmail.com+author: Daniel Trstenjak+tested-with: ghc ==7.6.2 ghc ==7.6.3 ghc ==7.8.3 ghc ==7.10.1+             ghc ==8.0.1 ghc ==8.2.1 ghc ==8.4.2 synopsis: A command line program for managing the bounds/versions of the dependencies in a cabal file. description:     A command line program for managing the bounds/versions of the dependencies in a cabal file.@@ -45,9 +47,7 @@     .     > $ cabal-bounds drop --executable=blub category: Utils, Development-author: Daniel Trstenjak-tested-with: GHC ==7.6.2 GHC ==7.6.3 GHC ==7.8.3 GHC ==7.10.1-             GHC ==8.0.1 GHC ==8.2.1+build-type: Simple extra-source-files:     README.md     CHANGELOG@@ -70,6 +70,7 @@     tests/inputFiles/setup-config-build-env/libs/D/D.hs     tests/goldenFiles/*.cabal     tests/goldenFiles/*.hs+    tests/goldenFiles/PlanFile/*.hs     tests/outputFiles/SetupConfig/.gitignore     tests/outputFiles/PlanFile/.gitignore @@ -82,22 +83,6 @@         CabalBounds.Args         CabalBounds.Main         CabalBounds.VersionComp-    build-depends:-        base >=4.6.0.0 && <5,-        cmdargs >=0.10.5 && <0.11,-        lens >=4.0.1 && <4.16,-        strict >=0.3.2 && <0.4,-        unordered-containers >=0.2.3.3 && <0.3,-        transformers >=0.3.0.0 && <0.6,-        either >=4.1.1 && <4.5,-        cabal-lenses >=0.7.0 && <0.8,-        Cabal >=2.1.0.0 && <2.2,-        filepath >=1.3 && <1.5,-        directory >=1.2 && <1.4,-        aeson >=1.2.3.0 && <1.3,-        lens-aeson >=1.0.2 && <1.1,-        bytestring >=0.10.8.2 && <1.0,-        text >=1.1.0.1 && <1.3     cpp-options: -DCABAL     hs-source-dirs: lib     other-modules:@@ -111,26 +96,42 @@         CabalBounds.HaskellPlatform         CabalBounds.Types     ghc-options: -W+    build-depends:+        base >=4.6.0.0 && <5,+        cmdargs >=0.10.5 && <0.11,+        lens >=4.0.1 && <4.17,+        strict >=0.3.2 && <0.4,+        unordered-containers >=0.2.3.3 && <0.3,+        transformers >=0.3.0.0 && <0.6,+        either >=4.1.1 && <4.6,+        cabal-lenses >=0.7.0 && <0.8,+        Cabal >=2.2.0.0 && <2.3,+        filepath >=1.3 && <1.5,+        directory >=1.2 && <1.4,+        aeson >=1.2.3.0 && <1.4,+        lens-aeson >=1.0.2 && <1.1,+        bytestring >=0.10.8.2 && <1.0,+        text >=1.1.0.1 && <1.3 -executable  cabal-bounds+executable cabal-bounds     main-is: Main.hs+    hs-source-dirs: exe+    ghc-options: -W     build-depends:         base >=3 && <5,         cabal-bounds -any-    hs-source-dirs: exe-    ghc-options: -W -test-suite  cabal-bounds-tests+test-suite cabal-bounds-tests     type: exitcode-stdio-1.0     main-is: Main.hs+    hs-source-dirs: tests+    ghc-options: -W     build-depends:         base >=3 && <5,-        tasty >=0.9.0.1 && <0.12,+        tasty >=0.9.0.1 && <1.2,         tasty-golden >=2.2.0.2 && <2.4,         process >=1.1.0.2 && <1.7,         filepath >=1.3 && <1.5,         directory >=1.2 && <1.4,-        Glob >=0.7 && <0.9,+        Glob >=0.7 && <0.10,         cabal-bounds -any-    hs-source-dirs: tests-    ghc-options: -W
lib/CabalBounds/Args.hs view
@@ -8,6 +8,7 @@    , defaultUpdate    , defaultDump    , defaultLibs+   , defaultFormat    ) where  import System.Console.CmdArgs hiding (ignore)@@ -49,23 +50,26 @@                    }           | Dump { only       :: [String]                  , ignore     :: [String]-                 , output     :: Maybe String+                 , output     :: Maybe FilePath                  , cabalFiles :: [FilePath]                  }           | Libs { only            :: [String]                  , ignore          :: [String]-                 , output          :: Maybe String+                 , output          :: Maybe FilePath                  , fromFile        :: FilePath                  , haskellPlatform :: String                  , cabalFile       :: Maybe FilePath                  , setupConfigFile :: Maybe FilePath                  , planFile        :: Maybe FilePath                  }+          | Format { output    :: Maybe FilePath+                   , cabalFile :: Maybe FilePath+                   }           deriving (Data, Typeable, Show, Eq)   get :: IO Args-get = cmdArgsRun . cmdArgsMode $ modes [dropArgs, updateArgs, dumpArgs, libsArgs]+get = cmdArgsRun . cmdArgsMode $ modes [dropArgs, updateArgs, dumpArgs, libsArgs, formatArgs]    &= program "cabal-bounds"    &= summary summaryInfo    &= help "A command line program for managing the bounds/versions of the dependencies in a cabal file."@@ -133,6 +137,13 @@    }  +defaultFormat :: Args+defaultFormat = Format+   { output    = def+   , cabalFile = def+   }++ dropArgs :: Args dropArgs = Drop    { upper      = def &= explicit &= name "upper" &= name "U"@@ -180,11 +191,19 @@  libsArgs :: Args libsArgs = Libs-   { output     = def &= explicit &= typ "FILE" &= name "output" &= name "o"-                      &= help "Save the libraries cabal-bounds would use for its update run to file, if empty, then they're written to stdout."+   { output          = def &= explicit &= typ "FILE" &= name "output" &= name "o"+                           &= help "Save the libraries cabal-bounds would use for its update run to file, if empty, then they're written to stdout."    , fromFile        = def &= typ "FILE" &= help "Use the library versions specified in the given file."    , haskellPlatform = def &= explicit &= typ "VERSION" &= name "haskell-platform"                            &= help "Use the library versions of the specified haskell platform version"+   }+++formatArgs :: Args+formatArgs = Format+   { output    = def &= explicit &= typ "FILE" &= name "output" &= name "o"+                     &= help "Save the formated cabal file to file, if empty, the cabal file is modified inplace."+   , cabalFile = def &= CmdArgs.ignore    }  
lib/CabalBounds/Main.hs view
@@ -5,7 +5,8 @@    ) where  import Distribution.PackageDescription (GenericPackageDescription)-import Distribution.PackageDescription.Parse (parseGenericPackageDescription, ParseResult(..))+import Distribution.PackageDescription.Parsec (parseGenericPackageDescription, runParseResult, ParseResult(..))+import Distribution.Parsec.Common (PWarning) import qualified Distribution.PackageDescription.PrettyPrint as PP import Distribution.Simple.Configure (tryGetConfigStateFile) import Distribution.Simple.LocalBuildInfo (LocalBuildInfo)@@ -37,9 +38,11 @@ import Data.Maybe (fromMaybe, catMaybes) import qualified Data.Aeson as Aeson import Data.Aeson.Lens-import qualified Data.ByteString.Lazy as BS+import qualified Data.ByteString as BS+import qualified Data.ByteString.Lazy as LBS import qualified Data.Text as T import Data.Text (Text)+import qualified Data.List as L import Text.Read (readMaybe)  @@ -111,6 +114,14 @@            Nothing   -> liftIO $ putStrLn (prettyPrint libs'))  +cabalBounds args@A.Format {} =+   leftToJust <$> runEitherT (do+      cabalFile <- findCabalFile $ A.cabalFile args+      pkgDescrp <- packageDescription cabalFile+      let outputFile = fromMaybe cabalFile (A.output args)+      liftIO $ writeFile outputFile (showGenericPackageDescription pkgDescrp))++ sortLibraries :: Libraries -> Libraries sortLibraries = sortBy (compare `on` (map toLower . fst)) @@ -131,12 +142,19 @@  packageDescription :: FilePath -> EitherT Error IO GenericPackageDescription packageDescription file = do-   contents <- liftIO $ SIO.readFile file-   case parseGenericPackageDescription contents of-        ParseFailed error   -> left $ show error-        ParseOk _ pkgDescrp -> right pkgDescrp+   contents <- liftIO $ BS.readFile file+   let (warnings, result) = runParseResult $ parseGenericPackageDescription contents+   liftIO $ showWarnings warnings+   case result of+        Left (_, errors) -> left $ show errors+        Right pkgDescrp  -> right pkgDescrp +   where+      showWarnings :: [PWarning] -> IO ()+      showWarnings [] = return ()+      showWarnings ws = putStrLn $ "cabal-bounds: " ++ (L.intercalate ", " $ map show ws) + packageDescriptions :: [FilePath] -> EitherT Error IO [GenericPackageDescription] packageDescriptions []    = left "Missing cabal file" packageDescriptions files = mapM packageDescription files@@ -207,7 +225,7 @@  librariesFromPlanFile :: PlanFile -> EitherT Error IO LibraryMap librariesFromPlanFile planFile = do-   contents <- liftIO $ BS.readFile planFile+   contents <- liftIO $ LBS.readFile planFile    let json = Aeson.decode contents :: Maybe Aeson.Value    case json of         Just json -> do
tests/Main.hs view
@@ -1,3 +1,4 @@+{-# Language PatternGuards #-}  module Main where @@ -60,7 +61,7 @@   tests :: T.TestTree-tests = T.testGroup "Tests" [ T.testGroup "Sourceless Tests" [dropTests, dumpTests]+tests = T.testGroup "Tests" [ T.testGroup "Sourceless Tests" [dropTests, dumpTests, formatTests]                             , T.testGroup "SetupConfig Tests" [updateTests SetupConfig, libsTests SetupConfig]                             , T.testGroup "PlanFile Tests" [updateTests PlanFile, libsTests PlanFile]                             ]@@ -129,6 +130,12 @@    ]  +formatTests :: T.TestTree+formatTests = T.testGroup "Format Tests"+   [ test Nothing "Format" defaultFormat+   ]++ libsTests :: LibsSource -> T.TestTree libsTests source = T.testGroup "Libs Tests"    [ test (Just source) "Libs" defaultLibs@@ -170,9 +177,20 @@                                 , ignore          = ["base", "ghc-prim", "integer-gmp", "rts"] ++ ignore args                                 } +              Format {} -> args { cabalFile = Just inputFile+                                , output    = Just outputFile+                                }+       diff ref new    = ["diff", "-u", ref, new] -      goldenFile      = "tests" </> "goldenFiles" </> testName <.> (if hasHsOutput then "hs" else "cabal")+      goldenFile+         | Just src <- source+         , src == PlanFile+         , testName == "Libs"+         = "tests" </> "goldenFiles" </> (show src) </> "Libs.hs"++         | otherwise+         = "tests" </> "goldenFiles" </> testName <.> (if hasHsOutput then "hs" else "cabal")        outputFile      =          case source of
tests/goldenFiles/DropBothIgnoreA.cabal view
@@ -1,9 +1,9 @@+cabal-version: >=1.9.2 name: setup-config version: 0.1 license: UnspecifiedLicense maintainer: daniel.trstenjak@gmail.com author: Daniel Trstenjak-cabal-version: >=1.9.2 build-type: Simple  library@@ -24,7 +24,6 @@  executable cabal-bounds     main-is: ExeMain1.hs-    scope: unknown     cpp-options: -DCABAL     hs-source-dirs: src     other-modules:@@ -43,7 +42,6 @@  executable other-exe     main-is: ExeMain2.hs-    scope: unknown     cpp-options: -DCABAL     hs-source-dirs: src     other-modules:
tests/goldenFiles/DropBothOfAll.cabal view
@@ -1,9 +1,9 @@+cabal-version: >=1.9.2 name: setup-config version: 0.1 license: UnspecifiedLicense maintainer: daniel.trstenjak@gmail.com author: Daniel Trstenjak-cabal-version: >=1.9.2 build-type: Simple  library@@ -24,7 +24,6 @@  executable cabal-bounds     main-is: ExeMain1.hs-    scope: unknown     cpp-options: -DCABAL     hs-source-dirs: src     other-modules:@@ -43,7 +42,6 @@  executable other-exe     main-is: ExeMain2.hs-    scope: unknown     cpp-options: -DCABAL     hs-source-dirs: src     other-modules:
tests/goldenFiles/DropBothOfAllExes.cabal view
@@ -1,9 +1,9 @@+cabal-version: >=1.9.2 name: setup-config version: 0.1 license: UnspecifiedLicense maintainer: daniel.trstenjak@gmail.com author: Daniel Trstenjak-cabal-version: >=1.9.2 build-type: Simple  library@@ -24,7 +24,6 @@  executable cabal-bounds     main-is: ExeMain1.hs-    scope: unknown     cpp-options: -DCABAL     hs-source-dirs: src     other-modules:@@ -43,7 +42,6 @@  executable other-exe     main-is: ExeMain2.hs-    scope: unknown     cpp-options: -DCABAL     hs-source-dirs: src     other-modules:
tests/goldenFiles/DropBothOfExe.cabal view
@@ -1,9 +1,9 @@+cabal-version: >=1.9.2 name: setup-config version: 0.1 license: UnspecifiedLicense maintainer: daniel.trstenjak@gmail.com author: Daniel Trstenjak-cabal-version: >=1.9.2 build-type: Simple  library@@ -24,7 +24,6 @@  executable cabal-bounds     main-is: ExeMain1.hs-    scope: unknown     cpp-options: -DCABAL     hs-source-dirs: src     other-modules:@@ -43,7 +42,6 @@  executable other-exe     main-is: ExeMain2.hs-    scope: unknown     cpp-options: -DCABAL     hs-source-dirs: src     other-modules:
tests/goldenFiles/DropBothOfLib.cabal view
@@ -1,9 +1,9 @@+cabal-version: >=1.9.2 name: setup-config version: 0.1 license: UnspecifiedLicense maintainer: daniel.trstenjak@gmail.com author: Daniel Trstenjak-cabal-version: >=1.9.2 build-type: Simple  library@@ -24,7 +24,6 @@  executable cabal-bounds     main-is: ExeMain1.hs-    scope: unknown     cpp-options: -DCABAL     hs-source-dirs: src     other-modules:@@ -43,7 +42,6 @@  executable other-exe     main-is: ExeMain2.hs-    scope: unknown     cpp-options: -DCABAL     hs-source-dirs: src     other-modules:
tests/goldenFiles/DropBothOfOtherExe.cabal view
@@ -1,9 +1,9 @@+cabal-version: >=1.9.2 name: setup-config version: 0.1 license: UnspecifiedLicense maintainer: daniel.trstenjak@gmail.com author: Daniel Trstenjak-cabal-version: >=1.9.2 build-type: Simple  library@@ -24,7 +24,6 @@  executable cabal-bounds     main-is: ExeMain1.hs-    scope: unknown     cpp-options: -DCABAL     hs-source-dirs: src     other-modules:@@ -43,7 +42,6 @@  executable other-exe     main-is: ExeMain2.hs-    scope: unknown     cpp-options: -DCABAL     hs-source-dirs: src     other-modules:
tests/goldenFiles/DropBothOfTest.cabal view
@@ -1,9 +1,9 @@+cabal-version: >=1.9.2 name: setup-config version: 0.1 license: UnspecifiedLicense maintainer: daniel.trstenjak@gmail.com author: Daniel Trstenjak-cabal-version: >=1.9.2 build-type: Simple  library@@ -24,7 +24,6 @@  executable cabal-bounds     main-is: ExeMain1.hs-    scope: unknown     cpp-options: -DCABAL     hs-source-dirs: src     other-modules:@@ -43,7 +42,6 @@  executable other-exe     main-is: ExeMain2.hs-    scope: unknown     cpp-options: -DCABAL     hs-source-dirs: src     other-modules:
tests/goldenFiles/DropBothOnlyBase.cabal view
@@ -1,9 +1,9 @@+cabal-version: >=1.9.2 name: setup-config version: 0.1 license: UnspecifiedLicense maintainer: daniel.trstenjak@gmail.com author: Daniel Trstenjak-cabal-version: >=1.9.2 build-type: Simple  library@@ -24,7 +24,6 @@  executable cabal-bounds     main-is: ExeMain1.hs-    scope: unknown     cpp-options: -DCABAL     hs-source-dirs: src     other-modules:@@ -43,7 +42,6 @@  executable other-exe     main-is: ExeMain2.hs-    scope: unknown     cpp-options: -DCABAL     hs-source-dirs: src     other-modules:
tests/goldenFiles/DropUpperIgnoreA.cabal view
@@ -1,9 +1,9 @@+cabal-version: >=1.9.2 name: setup-config version: 0.1 license: UnspecifiedLicense maintainer: daniel.trstenjak@gmail.com author: Daniel Trstenjak-cabal-version: >=1.9.2 build-type: Simple  library@@ -24,7 +24,6 @@  executable cabal-bounds     main-is: ExeMain1.hs-    scope: unknown     cpp-options: -DCABAL     hs-source-dirs: src     other-modules:@@ -43,7 +42,6 @@  executable other-exe     main-is: ExeMain2.hs-    scope: unknown     cpp-options: -DCABAL     hs-source-dirs: src     other-modules:
tests/goldenFiles/DropUpperOfAll.cabal view
@@ -1,9 +1,9 @@+cabal-version: >=1.9.2 name: setup-config version: 0.1 license: UnspecifiedLicense maintainer: daniel.trstenjak@gmail.com author: Daniel Trstenjak-cabal-version: >=1.9.2 build-type: Simple  library@@ -24,7 +24,6 @@  executable cabal-bounds     main-is: ExeMain1.hs-    scope: unknown     cpp-options: -DCABAL     hs-source-dirs: src     other-modules:@@ -43,7 +42,6 @@  executable other-exe     main-is: ExeMain2.hs-    scope: unknown     cpp-options: -DCABAL     hs-source-dirs: src     other-modules:
tests/goldenFiles/DropUpperOfAllExes.cabal view
@@ -1,9 +1,9 @@+cabal-version: >=1.9.2 name: setup-config version: 0.1 license: UnspecifiedLicense maintainer: daniel.trstenjak@gmail.com author: Daniel Trstenjak-cabal-version: >=1.9.2 build-type: Simple  library@@ -24,7 +24,6 @@  executable cabal-bounds     main-is: ExeMain1.hs-    scope: unknown     cpp-options: -DCABAL     hs-source-dirs: src     other-modules:@@ -43,7 +42,6 @@  executable other-exe     main-is: ExeMain2.hs-    scope: unknown     cpp-options: -DCABAL     hs-source-dirs: src     other-modules:
tests/goldenFiles/DropUpperOfExe.cabal view
@@ -1,9 +1,9 @@+cabal-version: >=1.9.2 name: setup-config version: 0.1 license: UnspecifiedLicense maintainer: daniel.trstenjak@gmail.com author: Daniel Trstenjak-cabal-version: >=1.9.2 build-type: Simple  library@@ -24,7 +24,6 @@  executable cabal-bounds     main-is: ExeMain1.hs-    scope: unknown     cpp-options: -DCABAL     hs-source-dirs: src     other-modules:@@ -43,7 +42,6 @@  executable other-exe     main-is: ExeMain2.hs-    scope: unknown     cpp-options: -DCABAL     hs-source-dirs: src     other-modules:
tests/goldenFiles/DropUpperOfLib.cabal view
@@ -1,9 +1,9 @@+cabal-version: >=1.9.2 name: setup-config version: 0.1 license: UnspecifiedLicense maintainer: daniel.trstenjak@gmail.com author: Daniel Trstenjak-cabal-version: >=1.9.2 build-type: Simple  library@@ -24,7 +24,6 @@  executable cabal-bounds     main-is: ExeMain1.hs-    scope: unknown     cpp-options: -DCABAL     hs-source-dirs: src     other-modules:@@ -43,7 +42,6 @@  executable other-exe     main-is: ExeMain2.hs-    scope: unknown     cpp-options: -DCABAL     hs-source-dirs: src     other-modules:
tests/goldenFiles/DropUpperOfOtherExe.cabal view
@@ -1,9 +1,9 @@+cabal-version: >=1.9.2 name: setup-config version: 0.1 license: UnspecifiedLicense maintainer: daniel.trstenjak@gmail.com author: Daniel Trstenjak-cabal-version: >=1.9.2 build-type: Simple  library@@ -24,7 +24,6 @@  executable cabal-bounds     main-is: ExeMain1.hs-    scope: unknown     cpp-options: -DCABAL     hs-source-dirs: src     other-modules:@@ -43,7 +42,6 @@  executable other-exe     main-is: ExeMain2.hs-    scope: unknown     cpp-options: -DCABAL     hs-source-dirs: src     other-modules:
tests/goldenFiles/DropUpperOfTest.cabal view
@@ -1,9 +1,9 @@+cabal-version: >=1.9.2 name: setup-config version: 0.1 license: UnspecifiedLicense maintainer: daniel.trstenjak@gmail.com author: Daniel Trstenjak-cabal-version: >=1.9.2 build-type: Simple  library@@ -24,7 +24,6 @@  executable cabal-bounds     main-is: ExeMain1.hs-    scope: unknown     cpp-options: -DCABAL     hs-source-dirs: src     other-modules:@@ -43,7 +42,6 @@  executable other-exe     main-is: ExeMain2.hs-    scope: unknown     cpp-options: -DCABAL     hs-source-dirs: src     other-modules:
tests/goldenFiles/DropUpperOnlyBase.cabal view
@@ -1,9 +1,9 @@+cabal-version: >=1.9.2 name: setup-config version: 0.1 license: UnspecifiedLicense maintainer: daniel.trstenjak@gmail.com author: Daniel Trstenjak-cabal-version: >=1.9.2 build-type: Simple  library@@ -24,7 +24,6 @@  executable cabal-bounds     main-is: ExeMain1.hs-    scope: unknown     cpp-options: -DCABAL     hs-source-dirs: src     other-modules:@@ -43,7 +42,6 @@  executable other-exe     main-is: ExeMain2.hs-    scope: unknown     cpp-options: -DCABAL     hs-source-dirs: src     other-modules:
+ tests/goldenFiles/Format.cabal view
@@ -0,0 +1,95 @@+cabal-version: >=1.9.2+name: setup-config+version: 0.1+license: UnspecifiedLicense+maintainer: daniel.trstenjak@gmail.com+author: Daniel Trstenjak+build-type: Simple++library+    exposed-modules:+        CabalBounds.Args+        CabalBounds.Command+        CabalBounds.Execute+        CabalBounds.Lenses+    hs-source-dirs: src+    other-modules:+        Paths_setup_config+    build-depends:+        base >=3,+        A >=0.1 && <0.2,+        B >=0.2 && <0.3,+        C >=0.3 && <0.4,+        D >=0.7++executable cabal-bounds+    main-is: ExeMain1.hs+    cpp-options: -DCABAL+    hs-source-dirs: src+    other-modules:+        Paths_setup_config+        CabalBounds.Args+        CabalBounds.Command+        CabalBounds.Execute+        CabalBounds.Lenses+    ghc-options: -W+    build-depends:+        base >=3,+        A >=0.1 && <0.2,+        B >=0.2 && <0.3,+        C >=0.3 && <0.4,+        D <0.9++executable other-exe+    main-is: ExeMain2.hs+    cpp-options: -DCABAL+    hs-source-dirs: src+    other-modules:+        Paths_setup_config+        CabalBounds.Args+        CabalBounds.Command+        CabalBounds.Execute+        CabalBounds.Lenses+    ghc-options: -W+    build-depends:+        base >=3,+        A >=0.1 && <0.2,+        B >=0.2 && <0.3,+        C >=0.3 && <0.4,+        D -any++test-suite some-test+    type: exitcode-stdio-1.0+    main-is: TestMain1.hs+    hs-source-dirs: src+    other-modules:+        Paths_setup_config+        CabalBounds.Args+        CabalBounds.Command+        CabalBounds.Execute+        CabalBounds.Lenses+    ghc-options: -W+    build-depends:+        base >=3,+        A >=0.1 && <0.2,+        B >=0.2 && <0.3,+        C >=0.3 && <0.4,+        D -any++test-suite other-test+    type: exitcode-stdio-1.0+    main-is: TestMain2.hs+    hs-source-dirs: src+    other-modules:+        Paths_setup_config+        CabalBounds.Args+        CabalBounds.Command+        CabalBounds.Execute+        CabalBounds.Lenses+    ghc-options: -W+    build-depends:+        base >=3,+        A >=0.1 && <0.2,+        B >=0.2 && <0.3,+        C >=0.3 && <0.4,+        D <1.0
+ tests/goldenFiles/PlanFile/Libs.hs view
@@ -0,0 +1,8 @@+[ ("A",[0,3])+, ("AAA-BBB-CCC",[0,3,2])+, ("AAA-BBB-DDD",[0,3,5])+, ("B",[0,3,0,1])+, ("C",[0,2,5])+, ("D",[0,8,2])+, ("G",[0,9,9])+]
tests/goldenFiles/UpdateBothIgnoreA.cabal view
@@ -1,9 +1,9 @@+cabal-version: >=1.9.2 name: setup-config version: 0.1 license: UnspecifiedLicense maintainer: daniel.trstenjak@gmail.com author: Daniel Trstenjak-cabal-version: >=1.9.2 build-type: Simple  library@@ -24,7 +24,6 @@  executable cabal-bounds     main-is: ExeMain1.hs-    scope: unknown     cpp-options: -DCABAL     hs-source-dirs: src     other-modules:@@ -43,7 +42,6 @@  executable other-exe     main-is: ExeMain2.hs-    scope: unknown     cpp-options: -DCABAL     hs-source-dirs: src     other-modules:
tests/goldenFiles/UpdateBothOfAll.cabal view
@@ -1,9 +1,9 @@+cabal-version: >=1.9.2 name: setup-config version: 0.1 license: UnspecifiedLicense maintainer: daniel.trstenjak@gmail.com author: Daniel Trstenjak-cabal-version: >=1.9.2 build-type: Simple  library@@ -24,7 +24,6 @@  executable cabal-bounds     main-is: ExeMain1.hs-    scope: unknown     cpp-options: -DCABAL     hs-source-dirs: src     other-modules:@@ -43,7 +42,6 @@  executable other-exe     main-is: ExeMain2.hs-    scope: unknown     cpp-options: -DCABAL     hs-source-dirs: src     other-modules:
tests/goldenFiles/UpdateBothOfAllExes.cabal view
@@ -1,9 +1,9 @@+cabal-version: >=1.9.2 name: setup-config version: 0.1 license: UnspecifiedLicense maintainer: daniel.trstenjak@gmail.com author: Daniel Trstenjak-cabal-version: >=1.9.2 build-type: Simple  library@@ -24,7 +24,6 @@  executable cabal-bounds     main-is: ExeMain1.hs-    scope: unknown     cpp-options: -DCABAL     hs-source-dirs: src     other-modules:@@ -43,7 +42,6 @@  executable other-exe     main-is: ExeMain2.hs-    scope: unknown     cpp-options: -DCABAL     hs-source-dirs: src     other-modules:
tests/goldenFiles/UpdateBothOfExe.cabal view
@@ -1,9 +1,9 @@+cabal-version: >=1.9.2 name: setup-config version: 0.1 license: UnspecifiedLicense maintainer: daniel.trstenjak@gmail.com author: Daniel Trstenjak-cabal-version: >=1.9.2 build-type: Simple  library@@ -24,7 +24,6 @@  executable cabal-bounds     main-is: ExeMain1.hs-    scope: unknown     cpp-options: -DCABAL     hs-source-dirs: src     other-modules:@@ -43,7 +42,6 @@  executable other-exe     main-is: ExeMain2.hs-    scope: unknown     cpp-options: -DCABAL     hs-source-dirs: src     other-modules:
tests/goldenFiles/UpdateBothOfLibrary.cabal view
@@ -1,9 +1,9 @@+cabal-version: >=1.9.2 name: setup-config version: 0.1 license: UnspecifiedLicense maintainer: daniel.trstenjak@gmail.com author: Daniel Trstenjak-cabal-version: >=1.9.2 build-type: Simple  library@@ -24,7 +24,6 @@  executable cabal-bounds     main-is: ExeMain1.hs-    scope: unknown     cpp-options: -DCABAL     hs-source-dirs: src     other-modules:@@ -43,7 +42,6 @@  executable other-exe     main-is: ExeMain2.hs-    scope: unknown     cpp-options: -DCABAL     hs-source-dirs: src     other-modules:
tests/goldenFiles/UpdateBothOfOtherExe.cabal view
@@ -1,9 +1,9 @@+cabal-version: >=1.9.2 name: setup-config version: 0.1 license: UnspecifiedLicense maintainer: daniel.trstenjak@gmail.com author: Daniel Trstenjak-cabal-version: >=1.9.2 build-type: Simple  library@@ -24,7 +24,6 @@  executable cabal-bounds     main-is: ExeMain1.hs-    scope: unknown     cpp-options: -DCABAL     hs-source-dirs: src     other-modules:@@ -43,7 +42,6 @@  executable other-exe     main-is: ExeMain2.hs-    scope: unknown     cpp-options: -DCABAL     hs-source-dirs: src     other-modules:
tests/goldenFiles/UpdateBothOfTest.cabal view
@@ -1,9 +1,9 @@+cabal-version: >=1.9.2 name: setup-config version: 0.1 license: UnspecifiedLicense maintainer: daniel.trstenjak@gmail.com author: Daniel Trstenjak-cabal-version: >=1.9.2 build-type: Simple  library@@ -24,7 +24,6 @@  executable cabal-bounds     main-is: ExeMain1.hs-    scope: unknown     cpp-options: -DCABAL     hs-source-dirs: src     other-modules:@@ -43,7 +42,6 @@  executable other-exe     main-is: ExeMain2.hs-    scope: unknown     cpp-options: -DCABAL     hs-source-dirs: src     other-modules:
tests/goldenFiles/UpdateByHaskellPlatform.cabal view
@@ -1,9 +1,9 @@+cabal-version: >=1.9.2 name: setup-config version: 0.1 license: UnspecifiedLicense maintainer: daniel.trstenjak@gmail.com author: Daniel Trstenjak-cabal-version: >=1.9.2 build-type: Simple  library@@ -24,7 +24,6 @@  executable cabal-bounds     main-is: ExeMain1.hs-    scope: unknown     cpp-options: -DCABAL     hs-source-dirs: src     other-modules:@@ -42,7 +41,6 @@  executable other-exe     main-is: ExeMain2.hs-    scope: unknown     cpp-options: -DCABAL     hs-source-dirs: src     other-modules:
tests/goldenFiles/UpdateLowerOfAll.cabal view
@@ -1,9 +1,9 @@+cabal-version: >=1.9.2 name: setup-config version: 0.1 license: UnspecifiedLicense maintainer: daniel.trstenjak@gmail.com author: Daniel Trstenjak-cabal-version: >=1.9.2 build-type: Simple  library@@ -24,7 +24,6 @@  executable cabal-bounds     main-is: ExeMain1.hs-    scope: unknown     cpp-options: -DCABAL     hs-source-dirs: src     other-modules:@@ -43,7 +42,6 @@  executable other-exe     main-is: ExeMain2.hs-    scope: unknown     cpp-options: -DCABAL     hs-source-dirs: src     other-modules:
tests/goldenFiles/UpdateLowerOfAllExes.cabal view
@@ -1,9 +1,9 @@+cabal-version: >=1.9.2 name: setup-config version: 0.1 license: UnspecifiedLicense maintainer: daniel.trstenjak@gmail.com author: Daniel Trstenjak-cabal-version: >=1.9.2 build-type: Simple  library@@ -24,7 +24,6 @@  executable cabal-bounds     main-is: ExeMain1.hs-    scope: unknown     cpp-options: -DCABAL     hs-source-dirs: src     other-modules:@@ -43,7 +42,6 @@  executable other-exe     main-is: ExeMain2.hs-    scope: unknown     cpp-options: -DCABAL     hs-source-dirs: src     other-modules:
tests/goldenFiles/UpdateLowerOfExe.cabal view
@@ -1,9 +1,9 @@+cabal-version: >=1.9.2 name: setup-config version: 0.1 license: UnspecifiedLicense maintainer: daniel.trstenjak@gmail.com author: Daniel Trstenjak-cabal-version: >=1.9.2 build-type: Simple  library@@ -24,7 +24,6 @@  executable cabal-bounds     main-is: ExeMain1.hs-    scope: unknown     cpp-options: -DCABAL     hs-source-dirs: src     other-modules:@@ -43,7 +42,6 @@  executable other-exe     main-is: ExeMain2.hs-    scope: unknown     cpp-options: -DCABAL     hs-source-dirs: src     other-modules:
tests/goldenFiles/UpdateLowerOfLibrary.cabal view
@@ -1,9 +1,9 @@+cabal-version: >=1.9.2 name: setup-config version: 0.1 license: UnspecifiedLicense maintainer: daniel.trstenjak@gmail.com author: Daniel Trstenjak-cabal-version: >=1.9.2 build-type: Simple  library@@ -24,7 +24,6 @@  executable cabal-bounds     main-is: ExeMain1.hs-    scope: unknown     cpp-options: -DCABAL     hs-source-dirs: src     other-modules:@@ -43,7 +42,6 @@  executable other-exe     main-is: ExeMain2.hs-    scope: unknown     cpp-options: -DCABAL     hs-source-dirs: src     other-modules:
tests/goldenFiles/UpdateLowerOfOtherExe.cabal view
@@ -1,9 +1,9 @@+cabal-version: >=1.9.2 name: setup-config version: 0.1 license: UnspecifiedLicense maintainer: daniel.trstenjak@gmail.com author: Daniel Trstenjak-cabal-version: >=1.9.2 build-type: Simple  library@@ -24,7 +24,6 @@  executable cabal-bounds     main-is: ExeMain1.hs-    scope: unknown     cpp-options: -DCABAL     hs-source-dirs: src     other-modules:@@ -43,7 +42,6 @@  executable other-exe     main-is: ExeMain2.hs-    scope: unknown     cpp-options: -DCABAL     hs-source-dirs: src     other-modules:
tests/goldenFiles/UpdateLowerOfTest.cabal view
@@ -1,9 +1,9 @@+cabal-version: >=1.9.2 name: setup-config version: 0.1 license: UnspecifiedLicense maintainer: daniel.trstenjak@gmail.com author: Daniel Trstenjak-cabal-version: >=1.9.2 build-type: Simple  library@@ -24,7 +24,6 @@  executable cabal-bounds     main-is: ExeMain1.hs-    scope: unknown     cpp-options: -DCABAL     hs-source-dirs: src     other-modules:@@ -43,7 +42,6 @@  executable other-exe     main-is: ExeMain2.hs-    scope: unknown     cpp-options: -DCABAL     hs-source-dirs: src     other-modules:
tests/goldenFiles/UpdateMajor1Lower.cabal view
@@ -1,9 +1,9 @@+cabal-version: >=1.9.2 name: setup-config version: 0.1 license: UnspecifiedLicense maintainer: daniel.trstenjak@gmail.com author: Daniel Trstenjak-cabal-version: >=1.9.2 build-type: Simple  library@@ -24,7 +24,6 @@  executable cabal-bounds     main-is: ExeMain1.hs-    scope: unknown     cpp-options: -DCABAL     hs-source-dirs: src     other-modules:@@ -43,7 +42,6 @@  executable other-exe     main-is: ExeMain2.hs-    scope: unknown     cpp-options: -DCABAL     hs-source-dirs: src     other-modules:
tests/goldenFiles/UpdateMajor1LowerAndUpper.cabal view
@@ -1,9 +1,9 @@+cabal-version: >=1.9.2 name: setup-config version: 0.1 license: UnspecifiedLicense maintainer: daniel.trstenjak@gmail.com author: Daniel Trstenjak-cabal-version: >=1.9.2 build-type: Simple  library@@ -24,7 +24,6 @@  executable cabal-bounds     main-is: ExeMain1.hs-    scope: unknown     cpp-options: -DCABAL     hs-source-dirs: src     other-modules:@@ -43,7 +42,6 @@  executable other-exe     main-is: ExeMain2.hs-    scope: unknown     cpp-options: -DCABAL     hs-source-dirs: src     other-modules:
tests/goldenFiles/UpdateMajor1Upper.cabal view
@@ -1,9 +1,9 @@+cabal-version: >=1.9.2 name: setup-config version: 0.1 license: UnspecifiedLicense maintainer: daniel.trstenjak@gmail.com author: Daniel Trstenjak-cabal-version: >=1.9.2 build-type: Simple  library@@ -24,7 +24,6 @@  executable cabal-bounds     main-is: ExeMain1.hs-    scope: unknown     cpp-options: -DCABAL     hs-source-dirs: src     other-modules:@@ -43,7 +42,6 @@  executable other-exe     main-is: ExeMain2.hs-    scope: unknown     cpp-options: -DCABAL     hs-source-dirs: src     other-modules:
tests/goldenFiles/UpdateMajor2Lower.cabal view
@@ -1,9 +1,9 @@+cabal-version: >=1.9.2 name: setup-config version: 0.1 license: UnspecifiedLicense maintainer: daniel.trstenjak@gmail.com author: Daniel Trstenjak-cabal-version: >=1.9.2 build-type: Simple  library@@ -24,7 +24,6 @@  executable cabal-bounds     main-is: ExeMain1.hs-    scope: unknown     cpp-options: -DCABAL     hs-source-dirs: src     other-modules:@@ -43,7 +42,6 @@  executable other-exe     main-is: ExeMain2.hs-    scope: unknown     cpp-options: -DCABAL     hs-source-dirs: src     other-modules:
tests/goldenFiles/UpdateMajor2Upper.cabal view
@@ -1,9 +1,9 @@+cabal-version: >=1.9.2 name: setup-config version: 0.1 license: UnspecifiedLicense maintainer: daniel.trstenjak@gmail.com author: Daniel Trstenjak-cabal-version: >=1.9.2 build-type: Simple  library@@ -24,7 +24,6 @@  executable cabal-bounds     main-is: ExeMain1.hs-    scope: unknown     cpp-options: -DCABAL     hs-source-dirs: src     other-modules:@@ -43,7 +42,6 @@  executable other-exe     main-is: ExeMain2.hs-    scope: unknown     cpp-options: -DCABAL     hs-source-dirs: src     other-modules:
tests/goldenFiles/UpdateMinorLower.cabal view
@@ -1,9 +1,9 @@+cabal-version: >=1.9.2 name: setup-config version: 0.1 license: UnspecifiedLicense maintainer: daniel.trstenjak@gmail.com author: Daniel Trstenjak-cabal-version: >=1.9.2 build-type: Simple  library@@ -24,7 +24,6 @@  executable cabal-bounds     main-is: ExeMain1.hs-    scope: unknown     cpp-options: -DCABAL     hs-source-dirs: src     other-modules:@@ -43,7 +42,6 @@  executable other-exe     main-is: ExeMain2.hs-    scope: unknown     cpp-options: -DCABAL     hs-source-dirs: src     other-modules:
tests/goldenFiles/UpdateMinorLowerAndUpper.cabal view
@@ -1,9 +1,9 @@+cabal-version: >=1.9.2 name: setup-config version: 0.1 license: UnspecifiedLicense maintainer: daniel.trstenjak@gmail.com author: Daniel Trstenjak-cabal-version: >=1.9.2 build-type: Simple  library@@ -24,7 +24,6 @@  executable cabal-bounds     main-is: ExeMain1.hs-    scope: unknown     cpp-options: -DCABAL     hs-source-dirs: src     other-modules:@@ -43,7 +42,6 @@  executable other-exe     main-is: ExeMain2.hs-    scope: unknown     cpp-options: -DCABAL     hs-source-dirs: src     other-modules:
tests/goldenFiles/UpdateMinorUpper.cabal view
@@ -1,9 +1,9 @@+cabal-version: >=1.9.2 name: setup-config version: 0.1 license: UnspecifiedLicense maintainer: daniel.trstenjak@gmail.com author: Daniel Trstenjak-cabal-version: >=1.9.2 build-type: Simple  library@@ -24,7 +24,6 @@  executable cabal-bounds     main-is: ExeMain1.hs-    scope: unknown     cpp-options: -DCABAL     hs-source-dirs: src     other-modules:@@ -43,7 +42,6 @@  executable other-exe     main-is: ExeMain2.hs-    scope: unknown     cpp-options: -DCABAL     hs-source-dirs: src     other-modules:
tests/goldenFiles/UpdateOnlyMissing.cabal view
@@ -1,9 +1,9 @@+cabal-version: >=1.9.2 name: setup-config version: 0.1 license: UnspecifiedLicense maintainer: daniel.trstenjak@gmail.com author: Daniel Trstenjak-cabal-version: >=1.9.2 build-type: Simple  library@@ -23,7 +23,6 @@  executable cabal-bounds     main-is: ExeMain1.hs-    scope: unknown     cpp-options: -DCABAL     hs-source-dirs: src     other-modules:@@ -41,7 +40,6 @@  executable other-exe     main-is: ExeMain2.hs-    scope: unknown     cpp-options: -DCABAL     hs-source-dirs: src     other-modules:
tests/goldenFiles/UpdateUpperFromFile.cabal view
@@ -1,9 +1,9 @@+cabal-version: >=1.9.2 name: setup-config version: 0.1 license: UnspecifiedLicense maintainer: daniel.trstenjak@gmail.com author: Daniel Trstenjak-cabal-version: >=1.9.2 build-type: Simple  library@@ -24,7 +24,6 @@  executable cabal-bounds     main-is: ExeMain1.hs-    scope: unknown     cpp-options: -DCABAL     hs-source-dirs: src     other-modules:@@ -43,7 +42,6 @@  executable other-exe     main-is: ExeMain2.hs-    scope: unknown     cpp-options: -DCABAL     hs-source-dirs: src     other-modules:
tests/goldenFiles/UpdateUpperOfAll.cabal view
@@ -1,9 +1,9 @@+cabal-version: >=1.9.2 name: setup-config version: 0.1 license: UnspecifiedLicense maintainer: daniel.trstenjak@gmail.com author: Daniel Trstenjak-cabal-version: >=1.9.2 build-type: Simple  library@@ -24,7 +24,6 @@  executable cabal-bounds     main-is: ExeMain1.hs-    scope: unknown     cpp-options: -DCABAL     hs-source-dirs: src     other-modules:@@ -43,7 +42,6 @@  executable other-exe     main-is: ExeMain2.hs-    scope: unknown     cpp-options: -DCABAL     hs-source-dirs: src     other-modules:
tests/goldenFiles/UpdateUpperOfAllExes.cabal view
@@ -1,9 +1,9 @@+cabal-version: >=1.9.2 name: setup-config version: 0.1 license: UnspecifiedLicense maintainer: daniel.trstenjak@gmail.com author: Daniel Trstenjak-cabal-version: >=1.9.2 build-type: Simple  library@@ -24,7 +24,6 @@  executable cabal-bounds     main-is: ExeMain1.hs-    scope: unknown     cpp-options: -DCABAL     hs-source-dirs: src     other-modules:@@ -43,7 +42,6 @@  executable other-exe     main-is: ExeMain2.hs-    scope: unknown     cpp-options: -DCABAL     hs-source-dirs: src     other-modules:
tests/goldenFiles/UpdateUpperOfExe.cabal view
@@ -1,9 +1,9 @@+cabal-version: >=1.9.2 name: setup-config version: 0.1 license: UnspecifiedLicense maintainer: daniel.trstenjak@gmail.com author: Daniel Trstenjak-cabal-version: >=1.9.2 build-type: Simple  library@@ -24,7 +24,6 @@  executable cabal-bounds     main-is: ExeMain1.hs-    scope: unknown     cpp-options: -DCABAL     hs-source-dirs: src     other-modules:@@ -43,7 +42,6 @@  executable other-exe     main-is: ExeMain2.hs-    scope: unknown     cpp-options: -DCABAL     hs-source-dirs: src     other-modules:
tests/goldenFiles/UpdateUpperOfLibrary.cabal view
@@ -1,9 +1,9 @@+cabal-version: >=1.9.2 name: setup-config version: 0.1 license: UnspecifiedLicense maintainer: daniel.trstenjak@gmail.com author: Daniel Trstenjak-cabal-version: >=1.9.2 build-type: Simple  library@@ -24,7 +24,6 @@  executable cabal-bounds     main-is: ExeMain1.hs-    scope: unknown     cpp-options: -DCABAL     hs-source-dirs: src     other-modules:@@ -43,7 +42,6 @@  executable other-exe     main-is: ExeMain2.hs-    scope: unknown     cpp-options: -DCABAL     hs-source-dirs: src     other-modules:
tests/goldenFiles/UpdateUpperOfOtherExe.cabal view
@@ -1,9 +1,9 @@+cabal-version: >=1.9.2 name: setup-config version: 0.1 license: UnspecifiedLicense maintainer: daniel.trstenjak@gmail.com author: Daniel Trstenjak-cabal-version: >=1.9.2 build-type: Simple  library@@ -24,7 +24,6 @@  executable cabal-bounds     main-is: ExeMain1.hs-    scope: unknown     cpp-options: -DCABAL     hs-source-dirs: src     other-modules:@@ -43,7 +42,6 @@  executable other-exe     main-is: ExeMain2.hs-    scope: unknown     cpp-options: -DCABAL     hs-source-dirs: src     other-modules:
tests/goldenFiles/UpdateUpperOfTest.cabal view
@@ -1,9 +1,9 @@+cabal-version: >=1.9.2 name: setup-config version: 0.1 license: UnspecifiedLicense maintainer: daniel.trstenjak@gmail.com author: Daniel Trstenjak-cabal-version: >=1.9.2 build-type: Simple  library@@ -24,7 +24,6 @@  executable cabal-bounds     main-is: ExeMain1.hs-    scope: unknown     cpp-options: -DCABAL     hs-source-dirs: src     other-modules:@@ -43,7 +42,6 @@  executable other-exe     main-is: ExeMain2.hs-    scope: unknown     cpp-options: -DCABAL     hs-source-dirs: src     other-modules:
tests/inputFiles/plan.json view
@@ -14,6 +14,16 @@     },     {       "id": "E-1.8.2-inplace"+    },+    { "id": "F"+    },+    { "id": "G-0.9.9"+    },+    { "id": "AAA-BBB-CCC-0.3.2-FFFGGHHDSS"+    },+    { "id": "AAA-BBB-DDD-0.3.5"+    },+    { "id": "AAA-BBB-EEE"     }   ] }