Commit graph

7 commits

Author SHA1 Message Date
Joey Hess
27305042f3
more OsPath conversion
Sponsored-by: Nicholas Golder-Manning
2025-01-29 11:53:20 -04:00
Joey Hess
f9d42c37c0
more OsPath conversion
Finally reached Annex code in this conversion.

Sponsored-by: Graham Spencer
2025-01-25 10:54:51 -04:00
Joey Hess
8021d22955
Merge branch 'master' into ospath 2025-01-24 12:02:35 -04:00
Joey Hess
21731b7d3a
remove a few unused imports on windows 2025-01-24 11:32:26 -04:00
Joey Hess
05bdce328d
start converting from System.Directory to System.OsPath
This is the start of a long road, got the first few files to compile
after this large change.

Sponsored-by: mycroft
2025-01-23 10:25:20 -04:00
Joey Hess
793ddecd4b
use openTempFile from file-io
And follow-on changes.

Note that relatedTemplate was changed to operate on a RawFilePath, and
so when it counts the length, it is now the number of bytes, not the
number of code points. This will just make it truncate shorter strings
in some cases, the truncation is still unicode aware.

When not building with the OsPath flag, toOsPath . fromRawFilePath and
fromRawFilePath . fromOsPath do extra conversions back and forth between
String and ByteString. That overhead could be avoided, but that's the
non-optimised build mode, so didn't bother.

Sponsored-by: unqueued
2025-01-22 11:41:43 -04:00
Joey Hess
1faa3af9cd
add file-io to build-depends when building with OsPath flag
Partly converted code to use functions from it, though more remain
unconverted. Most of withFile and openFile now use it.
2025-01-21 14:26:04 -04:00