cabal-cargs 1.0.0 → 1.1.0
raw patch · 15 files changed
+26/−9 lines, 15 filesdep ~filepathPVP ok
version bump matches the API change (PVP)
Dependency ranges changed: filepath
API changes (from Hackage documentation)
+ CabalCargs.CompilerArgs: [rootDir] :: CompilerArgs -> Maybe FilePath
+ CabalCargs.Fields: Root_Dir :: Field
- CabalCargs.CompilerArgs: CompilerArgs :: [FilePath] -> [String] -> [String] -> [String] -> [String] -> [FilePath] -> [String] -> [FilePath] -> [String] -> [String] -> [FilePath] -> [String] -> [String] -> Maybe FilePath -> [FilePath] -> [FilePath] -> [String] -> Maybe FilePath -> CompilerArgs
+ CabalCargs.CompilerArgs: CompilerArgs :: [FilePath] -> [String] -> [String] -> [String] -> [String] -> [FilePath] -> [String] -> [FilePath] -> [String] -> [String] -> [FilePath] -> [String] -> [String] -> Maybe FilePath -> Maybe FilePath -> [FilePath] -> [FilePath] -> [String] -> Maybe FilePath -> CompilerArgs
Files
- CHANGELOG +4/−0
- README.md +1/−0
- cabal-cargs.cabal +2/−1
- lib/CabalCargs/BuildInfo.hs +1/−0
- lib/CabalCargs/CompilerArgs.hs +8/−0
- lib/CabalCargs/Fields.hs +1/−0
- lib/CabalCargs/Format.hs +1/−0
- tests/goldenFiles/withSandbox/FindCabalFilePure.txt +1/−1
- tests/goldenFiles/withSandbox/FromCabalFilePure.txt +1/−1
- tests/goldenFiles/withSandbox/FromExeSrcFilePure.txt +1/−1
- tests/goldenFiles/withSandbox/FromLibSrcPure.txt +1/−1
- tests/goldenFiles/withoutSandbox/FindCabalFilePure.txt +1/−1
- tests/goldenFiles/withoutSandbox/FromCabalFilePure.txt +1/−1
- tests/goldenFiles/withoutSandbox/FromExeSrcFilePure.txt +1/−1
- tests/goldenFiles/withoutSandbox/FromLibSrcPure.txt +1/−1
CHANGELOG view
@@ -1,3 +1,7 @@+1.1.0+-----+* New field 'root_dir' to output the root directory of the cabal project+ 1.0.0 ----- * Migrate from EitherT to ExceptT
README.md view
@@ -114,6 +114,7 @@ There are further some special fields: * `package_db`+* `root_dir` * `autogen_hs_source_dirs` * `autogen_include_dirs` * `autogen_includes`
cabal-cargs.cabal view
@@ -1,6 +1,6 @@ cabal-version: >=1.9.2 name: cabal-cargs-version: 1.0.0+version: 1.1.0 license: BSD3 license-file: LICENSE maintainer: daniel.trstenjak@gmail.com@@ -55,6 +55,7 @@ cmdargs >=0.10.5 && <0.11, lens >=4.0.1 && <4.17, directory >=1.0 && <1.4,+ filepath >=1.0 && <1.5, transformers >=0.3.0.0 && <0.6, text >=1.1.0.1 && <1.3, system-filepath >=0.4.9 && <0.5,
lib/CabalCargs/BuildInfo.hs view
@@ -28,6 +28,7 @@ field F.Includes = CL.includesL field F.Build_Depends = nopLens field F.Package_Db = nopLens+field F.Root_Dir = nopLens field F.Autogen_Hs_Source_Dirs = nopLens field F.Autogen_Include_Dirs = nopLens field F.Autogen_Includes = nopLens
lib/CabalCargs/CompilerArgs.hs view
@@ -15,6 +15,7 @@ import Data.List (nub, foldl') import Data.Maybe (maybeToList, listToMaybe) import Control.Lens+import System.FilePath (takeDirectory) import qualified Filesystem.Path.CurrentOS as FP #if __GLASGOW_HASKELL__ < 710@@ -40,6 +41,7 @@ , includes :: [String] , buildDepends :: [String] , packageDB :: Maybe FilePath -- ^ the path to the package database of the cabal sandbox+ , rootDir :: Maybe FilePath -- ^ the root directory of the cabal package , autogenHsSourceDirs :: [FilePath] -- ^ dirs of automatically generated haskell source files by cabal (e.g. Paths_*) , autogenIncludeDirs :: [FilePath] -- ^ dirs of automatically generated include files by cabal , autogenIncludes :: [String] -- ^ automatically generated include files by cabal (e.g. cabal_macros.h)@@ -66,6 +68,7 @@ , ("autogenIncludeDirs" , "autogenIncludeDirsL") , ("autogenIncludes" , "autogenIncludesL") , ("hdevtoolsSocket" , "hdevtoolsSocketL")+ , ("rootDir" , "rootDirL") ] ''CompilerArgs type Error = String@@ -104,6 +107,9 @@ addCarg cargs F.Package_Db = cargs & packageDBL .~ Spec.packageDB spec + addCarg cargs F.Root_Dir =+ cargs & rootDirL .~ Just (takeDirectory $ Spec.cabalFile spec)+ addCarg cargs F.Autogen_Hs_Source_Dirs | Just distDir <- Spec.distDir spec = cargs & autogenHsSourceDirsL .~ [distDir ++ "/build/autogen"]@@ -157,6 +163,7 @@ fieldL F.Includes = includesL fieldL F.Build_Depends = buildDependsL fieldL F.Package_Db = packageDBL . maybeToListL+fieldL F.Root_Dir = rootDirL . maybeToListL fieldL F.Autogen_Hs_Source_Dirs = autogenHsSourceDirsL fieldL F.Autogen_Include_Dirs = autogenIncludeDirsL fieldL F.Autogen_Includes = autogenIncludesL@@ -187,4 +194,5 @@ , autogenIncludeDirs = [] , autogenIncludes = [] , hdevtoolsSocket = Nothing+ , rootDir = Nothing }
lib/CabalCargs/Fields.hs view
@@ -29,6 +29,7 @@ | Build_Depends | Package_Db -- ^ the package database of a cabal sandbox+ | Root_Dir -- ^ the root directory of the cabal package | Autogen_Hs_Source_Dirs -- ^ dirs of automatically generated haskell source files by cabal (e.g. Paths_*) | Autogen_Include_Dirs -- ^ dirs of automatically generated include files by cabal | Autogen_Includes -- ^ automatically generated include files by cabal (e.g. cabal_macros.h)
lib/CabalCargs/Format.hs view
@@ -60,6 +60,7 @@ , includes cargs , buildDepends cargs , maybeToList $ packageDB cargs+ , maybeToList $ rootDir cargs , autogenHsSourceDirs cargs , autogenIncludeDirs cargs , autogenIncludes cargs
tests/goldenFiles/withSandbox/FindCabalFilePure.txt view
@@ -1,1 +1,1 @@-lib exe tests -W -DLIB -DEXE base cmdargs lens directory strict transformers either text system-filepath system-fileio Cabal cabal-cargs tasty tasty-golden filepath .cabal-sandbox/x86_64-linux-ghc-7.6.2-packages.conf.d dist/dist-sandbox-6d1acfa0/build/autogen dist/dist-sandbox-6d1acfa0/build/autogen cabal_macros.h .hdevtools.sock+lib exe tests -W -DLIB -DEXE base cmdargs lens directory strict transformers either text system-filepath system-fileio Cabal cabal-cargs tasty tasty-golden filepath .cabal-sandbox/x86_64-linux-ghc-7.6.2-packages.conf.d /home/dan/projekte/cabal-cargs/tests/inputFiles/withSandbox dist/dist-sandbox-6d1acfa0/build/autogen dist/dist-sandbox-6d1acfa0/build/autogen cabal_macros.h .hdevtools.sock
tests/goldenFiles/withSandbox/FromCabalFilePure.txt view
@@ -1,1 +1,1 @@-lib exe tests -W -DLIB -DEXE base cmdargs lens directory strict transformers either text system-filepath system-fileio Cabal cabal-cargs tasty tasty-golden filepath .cabal-sandbox/x86_64-linux-ghc-7.6.2-packages.conf.d dist/dist-sandbox-6d1acfa0/build/autogen dist/dist-sandbox-6d1acfa0/build/autogen cabal_macros.h .hdevtools.sock+lib exe tests -W -DLIB -DEXE base cmdargs lens directory strict transformers either text system-filepath system-fileio Cabal cabal-cargs tasty tasty-golden filepath .cabal-sandbox/x86_64-linux-ghc-7.6.2-packages.conf.d /home/dan/projekte/cabal-cargs/tests/inputFiles/withSandbox dist/dist-sandbox-6d1acfa0/build/autogen dist/dist-sandbox-6d1acfa0/build/autogen cabal_macros.h .hdevtools.sock
tests/goldenFiles/withSandbox/FromExeSrcFilePure.txt view
@@ -1,1 +1,1 @@-exe -W -DEXE base cabal-cargs .cabal-sandbox/x86_64-linux-ghc-7.6.2-packages.conf.d dist/dist-sandbox-6d1acfa0/build/autogen dist/dist-sandbox-6d1acfa0/build/autogen cabal_macros.h .hdevtools.sock+exe -W -DEXE base cabal-cargs .cabal-sandbox/x86_64-linux-ghc-7.6.2-packages.conf.d /home/dan/projekte/cabal-cargs/tests/inputFiles/withSandbox dist/dist-sandbox-6d1acfa0/build/autogen dist/dist-sandbox-6d1acfa0/build/autogen cabal_macros.h .hdevtools.sock
tests/goldenFiles/withSandbox/FromLibSrcPure.txt view
@@ -1,1 +1,1 @@-lib -W -DLIB base cmdargs lens directory strict transformers either text system-filepath system-fileio Cabal .cabal-sandbox/x86_64-linux-ghc-7.6.2-packages.conf.d dist/dist-sandbox-6d1acfa0/build/autogen dist/dist-sandbox-6d1acfa0/build/autogen cabal_macros.h .hdevtools.sock+lib -W -DLIB base cmdargs lens directory strict transformers either text system-filepath system-fileio Cabal .cabal-sandbox/x86_64-linux-ghc-7.6.2-packages.conf.d /home/dan/projekte/cabal-cargs/tests/inputFiles/withSandbox dist/dist-sandbox-6d1acfa0/build/autogen dist/dist-sandbox-6d1acfa0/build/autogen cabal_macros.h .hdevtools.sock
tests/goldenFiles/withoutSandbox/FindCabalFilePure.txt view
@@ -1,1 +1,1 @@-lib exe tests -W -DLIB -DEXE base cmdargs lens directory strict transformers either text system-filepath system-fileio Cabal cabal-cargs tasty tasty-golden filepath dist/build/autogen dist/build/autogen cabal_macros.h .hdevtools.sock+lib exe tests -W -DLIB -DEXE base cmdargs lens directory strict transformers either text system-filepath system-fileio Cabal cabal-cargs tasty tasty-golden filepath /home/dan/projekte/cabal-cargs/tests/inputFiles/withoutSandbox dist/build/autogen dist/build/autogen cabal_macros.h .hdevtools.sock
tests/goldenFiles/withoutSandbox/FromCabalFilePure.txt view
@@ -1,1 +1,1 @@-lib exe tests -W -DLIB -DEXE base cmdargs lens directory strict transformers either text system-filepath system-fileio Cabal cabal-cargs tasty tasty-golden filepath dist/build/autogen dist/build/autogen cabal_macros.h .hdevtools.sock+lib exe tests -W -DLIB -DEXE base cmdargs lens directory strict transformers either text system-filepath system-fileio Cabal cabal-cargs tasty tasty-golden filepath /home/dan/projekte/cabal-cargs/tests/inputFiles/withoutSandbox dist/build/autogen dist/build/autogen cabal_macros.h .hdevtools.sock
tests/goldenFiles/withoutSandbox/FromExeSrcFilePure.txt view
@@ -1,1 +1,1 @@-exe -W -DEXE base cabal-cargs dist/build/autogen dist/build/autogen cabal_macros.h .hdevtools.sock+exe -W -DEXE base cabal-cargs /home/dan/projekte/cabal-cargs/tests/inputFiles/withoutSandbox dist/build/autogen dist/build/autogen cabal_macros.h .hdevtools.sock
tests/goldenFiles/withoutSandbox/FromLibSrcPure.txt view
@@ -1,1 +1,1 @@-lib -W -DLIB base cmdargs lens directory strict transformers either text system-filepath system-fileio Cabal dist/build/autogen dist/build/autogen cabal_macros.h .hdevtools.sock+lib -W -DLIB base cmdargs lens directory strict transformers either text system-filepath system-fileio Cabal /home/dan/projekte/cabal-cargs/tests/inputFiles/withoutSandbox dist/build/autogen dist/build/autogen cabal_macros.h .hdevtools.sock