diff --git a/BuildFlags.hs b/BuildFlags.hs index d273c216e4..8724b94e45 100644 --- a/BuildFlags.hs +++ b/BuildFlags.hs @@ -69,6 +69,11 @@ buildFlags = filter (not . null) , "Testsuite" , "S3" , "WebDAV" +#ifdef WITH_OSPATH + , "OsPath" +#else +#warning Building without the OsPath build flag set results in slower filename manipulation and is not recommended. +#endif ] -- Not a complete list, let alone a listing transitive deps, but only diff --git a/CHANGELOG b/CHANGELOG index 379d28a732..2297edecee 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -3,6 +3,10 @@ git-annex (10.20250829) UNRELEASED; urgency=medium * drop: --fast support when dropping from a remote. * Fix crash operating on filenames that are exactly 21 bytes long and begin with a utf-8 character. + * git-annex.cabal: Turn on the OsPath build flag by default. + * Add build warnings when git-annex is built without the OsPath + build flag. + * version: Report on whether it was built with the OsPath build flag. -- Joey Hess Fri, 29 Aug 2025 12:34:06 -0400 diff --git a/doc/todo/RawFilePath_conversion.mdwn b/doc/todo/RawFilePath_conversion.mdwn index c10b62cf2e..b488353a60 100644 --- a/doc/todo/RawFilePath_conversion.mdwn +++ b/doc/todo/RawFilePath_conversion.mdwn @@ -12,10 +12,11 @@ But this conversion is not yet complete. This is a todo to keep track of the status. * The OsPath build flag makes git-annex build with OsPath. Otherwise, - it builds with RawFilePath. The plan is to make that build flag the - default where it is not already as time goes on. And then eventually - remove the build flag and simplify code in git-annex to not need to - support two different build methods. + it builds with RawFilePath. That build flag is now on by default, + and there is a build warning when it is not set. + +* The plan is to eventually remove the build flag and simplify code in + git-annex to not need to support two different build methods. * unix has modules that operate on RawFilePath but no OSPath versions yet. See https://github.com/haskell/unix/issues/240 diff --git a/git-annex.cabal b/git-annex.cabal index dda13f7071..484e94abfd 100644 --- a/git-annex.cabal +++ b/git-annex.cabal @@ -177,6 +177,7 @@ Flag Servant Flag OsPath Description: Use the os-string library and related libraries, for faster filename manipulation + Default: True Flag Benchmark Description: Enable benchmarking