cabal-gild 1.3.1.0 → 1.3.1.1
raw patch · 3 files changed
+14/−2 lines, 3 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- cabal-gild.cabal +1/−1
- source/library/CabalGild/Unstable/Action/EvaluatePragmas.hs +2/−1
- source/test-suite/Main.hs +11/−0
cabal-gild.cabal view
@@ -11,7 +11,7 @@ maintainer: Taylor Fausak name: cabal-gild synopsis: Formats package descriptions.-version: 1.3.1.0+version: 1.3.1.1 source-repository head type: git
source/library/CabalGild/Unstable/Action/EvaluatePragmas.hs view
@@ -78,7 +78,8 @@ position = maybe (fst $ Name.annotation n) (fst . FieldLine.annotation) $ Maybe.listToMaybe fls- excludedFiles = Set.fromList $ fmap normalize strs+ -- Exclusion must be computed relative to the directory containing the cabal file (see #71)+ excludedFiles = Set.fromList $ fmap (normalize . FilePath.combine root) strs fieldLines = zipWith ModuleName.toFieldLine ((,) position <$> comments : repeat []) . Maybe.mapMaybe (toModuleName directories)
source/test-suite/Main.hs view
@@ -1114,6 +1114,17 @@ "library\n -- cabal-gild: discover --exclude N.hs\n exposed-modules:" "library\n -- cabal-gild: discover --exclude N.hs\n exposed-modules: M\n" + Hspec.it "treats excluded paths relative to cabal file" $ do+ let d = "input"+ (a, s, w) =+ runGild+ ["--input", FilePath.combine d "io.cabal"]+ [(Input.File $ FilePath.combine d "io.cabal", String.toUtf8 "library\n -- cabal-gild: discover src --exclude src/N.hs\n exposed-modules:")]+ [(FilePath.combine d "src", ["M.hs", "N.hs"])]+ a `Hspec.shouldSatisfy` Either.isRight+ w `Hspec.shouldBe` []+ s `Hspec.shouldBe` Map.singleton Output.Stdout (String.toUtf8 "library\n -- cabal-gild: discover src --exclude src/N.hs\n exposed-modules: M\n")+ Hspec.it "fails when discovering with an unknown option" $ do let (a, s, w) = runGild