summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2016-01-26 08:52:34 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2016-01-26 08:52:34 -0400
commite4cd36ba9b3af5fd877f75d04aaf428163cd8acd (patch)
tree0803232897be00ebc40b0e99b675f69ec37f45c6
parent24590d731eba893cf11ce5651af6c47cb6f8d93f (diff)
remove TDFA build flag
-rw-r--r--BuildFlags.hs3
-rw-r--r--Utility/Glob.hs18
-rw-r--r--debian/changelog6
-rw-r--r--git-annex.cabal12
4 files changed, 4 insertions, 35 deletions
diff --git a/BuildFlags.hs b/BuildFlags.hs
index 906e26270..52e489e9a 100644
--- a/BuildFlags.hs
+++ b/BuildFlags.hs
@@ -73,9 +73,6 @@ buildFlags = filter (not . null)
#else
#warning Building without ConcurrentOutput
#endif
-#ifdef WITH_TDFA
- , "TDFA"
-#endif
#ifdef WITH_TORRENTPARSER
, "TorrentParser"
#endif
diff --git a/Utility/Glob.hs b/Utility/Glob.hs
index 91b577f53..98ffe751b 100644
--- a/Utility/Glob.hs
+++ b/Utility/Glob.hs
@@ -1,15 +1,10 @@
{- file globbing
-
- - This uses TDFA when available, with a fallback to regex-compat.
- - TDFA is less buggy in its support for non-unicode characters.
- -
- Copyright 2014 Joey Hess <id@joeyh.name>
-
- License: BSD-2-clause
-}
-{-# LANGUAGE CPP #-}
-
module Utility.Glob (
Glob,
GlobCase(..),
@@ -19,13 +14,8 @@ module Utility.Glob (
import System.Path.WildMatch
-#ifdef WITH_TDFA
import "regex-tdfa" Text.Regex.TDFA
import "regex-tdfa" Text.Regex.TDFA.String
-#else
-import Text.Regex
-import Data.Maybe
-#endif
newtype Glob = Glob Regex
@@ -34,13 +24,9 @@ data GlobCase = CaseSensative | CaseInsensative
{- Compiles a glob to a regex, that can be repeatedly used. -}
compileGlob :: String -> GlobCase -> Glob
compileGlob glob globcase = Glob $
-#ifdef WITH_TDFA
case compile (defaultCompOpt {caseSensitive = casesentitive}) defaultExecOpt regex of
Right r -> r
Left _ -> error $ "failed to compile regex: " ++ regex
-#else
- mkRegexWithOpts regex casesentitive True
-#endif
where
regex = '^':wildToRegex glob
casesentitive = case globcase of
@@ -49,10 +35,6 @@ compileGlob glob globcase = Glob $
matchGlob :: Glob -> String -> Bool
matchGlob (Glob regex) val =
-#ifdef WITH_TDFA
case execute regex val of
Right (Just _) -> True
_ -> False
-#else
- isJust $ matchRegex regex val
-#endif
diff --git a/debian/changelog b/debian/changelog
index 43a8863e9..4c52b5ae3 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -20,10 +20,8 @@ git-annex (6.20160115) UNRELEASED; urgency=medium
expression matches some data.
* Removed the webapp-secure build flag, rolling it into the webapp build
flag.
- * Removed the quvi and tahoe build flags, which only adds aeson to
- the core dependencies.
- * Removed the feed build flag, which only adds feed to the core
- dependencies.
+ * Removed the quvi, tahoe, feed, and tfds build flags, adding
+ aeson feed and regex-tdfa to the core dependencies.
* Roll the dns build flag into the assistant build flag.
-- Joey Hess <id@joeyh.name> Fri, 15 Jan 2016 14:05:01 -0400
diff --git a/git-annex.cabal b/git-annex.cabal
index 91dc21ee8..3309d10bd 100644
--- a/git-annex.cabal
+++ b/git-annex.cabal
@@ -60,9 +60,6 @@ Flag AndroidSplice
Flag TestSuite
Description: Embed the test suite into git-annex
-Flag TDFA
- Description: Use regex-tdfa for wildcards
-
Flag TorrentParser
Description: Use haskell torrent library to parse torrent files
@@ -104,7 +101,8 @@ Executable git-annex
time, old-locale,
esqueleto, persistent-sqlite, persistent, persistent-template,
aeson,
- feed
+ feed,
+ regex-tdfa
CC-Options: -Wall
GHC-Options: -Wall -fno-warn-tabs
Extensions: PackageImports
@@ -147,12 +145,6 @@ Executable git-annex
crypto-api
CPP-Options: -DWITH_TESTSUITE
- if flag(TDFA)
- Build-Depends: regex-tdfa
- CPP-Options: -DWITH_TDFA
- else
- Build-Depends: regex-compat
-
if flag(S3)
Build-Depends: conduit, conduit-extra, aws (>= 0.9.2)
CPP-Options: -DWITH_S3