Commit graph

46745 commits

Author SHA1 Message Date
Joey Hess
6a5131fe0b
OsPath build fix 2025-02-17 14:56:56 -04:00
Joey Hess
f6bd8ac9ab
OsPath build fix 2025-02-17 14:46:43 -04:00
Joey Hess
550ffc98fb
OSX build fix 2025-02-17 14:06:06 -04:00
Joey Hess
03827783bc
OSX build fixes 2025-02-17 14:05:19 -04:00
Joey Hess
1fb69fe01c
OSX build fixes 2025-02-17 14:04:08 -04:00
Joey Hess
9f2ce19858
OSX build fix 2025-02-17 14:01:54 -04:00
Joey Hess
66b8ba8fb0
OSX build fixes 2025-02-17 13:59:52 -04:00
Joey Hess
5324f34092
Merge branch 'ospath' 2025-02-17 11:58:20 -04:00
datamanager
93fb1ba536 Added a comment 2025-02-15 21:46:33 +00:00
puck
f32f22bc64 2025-02-15 10:36:03 +00:00
Joey Hess
70a2661334
OsPath conversion for OSXMkLibs 2025-02-14 16:53:00 -04:00
Joey Hess
e8b00faea8
Merge branch 'master' into ospath 2025-02-14 16:28:43 -04:00
Joey Hess
56d28eebdc
Merge branch 'master' of ssh://git-annex.branchable.com 2025-02-14 15:41:23 -04:00
Joey Hess
6d5c352485
further fix OSX packaging program builds
Broken by commit e5be81f8d4
2025-02-14 15:40:48 -04:00
anarcat
438ff929f3 more details on my issues 2025-02-14 17:54:24 +00:00
anarcat
73d4997047 Added a comment: similar topic 2025-02-14 17:51:29 +00:00
anarcat
376d2b25e3 Added a comment: similar topic 2025-02-14 17:47:02 +00:00
Joey Hess
e6e69f8f93
draft 2025-02-13 16:12:07 -04:00
Joey Hess
bf6446528d
comment 2025-02-13 13:51:21 -04:00
Joey Hess
2ff0adba0b
comment 2025-02-13 13:01:15 -04:00
Joey Hess
406527570e
OsPath conversion of DistributionUpdate 2025-02-12 13:27:34 -04:00
Joey Hess
25e4f84e8f
push down OsPath into CopyFile 2025-02-12 13:11:27 -04:00
Joey Hess
0f47eceacf
stop exporting RawFilePath 2025-02-12 12:59:30 -04:00
Joey Hess
2567bc0e2c
avoid head warnings with recent ghc versions 2025-02-12 12:43:03 -04:00
Joey Hess
46d38b002d
remove the git-union-merge command
This has never been built and shipped as part of git-annex,
and including it as a pedagolical example in
the source code doesn't have much benefit. The program was not currently
buildable after recent OsPath changes.

Of course, Git/UnionMerge.hs is still available and can be used.
2025-02-12 12:37:36 -04:00
Joey Hess
17c1a1dde4
fix description of ParallelBuild 2025-02-12 12:32:22 -04:00
Joey Hess
1819cb4c94
Revert "stack.yaml: temporarily build with older ghc"
This reverts commit 2f9a384e48.
2025-02-11 17:02:13 -04:00
Joey Hess
bab26da74b
Merge branch 'master' into ospath 2025-02-11 16:56:17 -04:00
Joey Hess
2057bc1c2b
fix windows and OSX packaging program builds
Broken by commit e5be81f8d4
2025-02-11 16:53:01 -04:00
Joey Hess
fb0ecb997f
Merge branch 'ospathwin2' into ospath 2025-02-11 16:46:01 -04:00
Joey Hess
6653e000f0 fix convertToWindowsNativeNameSpace bug
This fixes a test suite failure. The OsPath conversion made that be used
in more places, including addurl, which exposed an existing bug.
2025-02-11 20:37:40 -08:00
Joey Hess
769c7b3e65
avoid build warning on windows 2025-02-11 16:31:35 -04:00
Joey Hess
a149336a59
OsPath transition Windows build fixes
This gets it building on Windows again, with 1 test suite failure
(addurl).

Sponsored-by: Kevin Mueller
2025-02-11 15:40:53 -04:00
Joey Hess
9dc43396b3
fix comment 2025-02-11 14:07:01 -04:00
Joey Hess
27a0bacc49
improved OsPath conversion 2025-02-11 14:05:56 -04:00
Joey Hess
2fa1631041
more OsPath conversion
this avoids 1 copy
2025-02-11 14:03:20 -04:00
Joey Hess
19dea33f57
more OsPath conversion 2025-02-11 14:00:01 -04:00
Joey Hess
a5eaf3d4d2
use to/fromOsPath
Just to reduce the number of from/toRawFilePath calls, which I would
like to minimize.

In this build path, the two are the same though.
2025-02-11 13:54:51 -04:00
Joey Hess
780a379ab1
remove unused functions from Utility.RawFilePath 2025-02-11 13:49:17 -04:00
Joey Hess
f8bb9a8734
replace removeLink with removeFile
same reasoning as in commit 5cc8d9d03b
2025-02-11 13:41:26 -04:00
Joey Hess
90eb1e2da6
update todo 2025-02-11 13:01:13 -04:00
Joey Hess
3bbabd6778
replace R.doesPathExist with doesPathExist
Equivilant, just avoids some ugliness.
2025-02-11 12:46:54 -04:00
Joey Hess
5dbaaae299
test suite now passes after OsPath conversion
The test suite was failing because of a bug in the Database/* modules.
I had replaced doesPathExist with doesDirectoryExist, but it was
checking the database file.

I have audited commit f1ba21d698 for
other changes to doesPathExist, and checked that doesDirectoryExist and
doesFileExist were used correctly.

The only change I found is in youtubeDl', where it used to return
directories that might have been created by youtube-dl. But it was
supposed to return media files, so changing it to use doesFileExist is
actually an improvement. Although only of theoretical benefit.

Note that it would actually be possible to keep using doesPathExist,
there is a version of that for OsPath as well. But the rest of these
changes seem safe.

Sponsored-by: Nicholas Golder-Manning
2025-02-11 12:44:09 -04:00
Joey Hess
c85d5a0dc8
OsPath conversion of linuxstandalone builder
Sponsored-by: Joshua Antonishen
2025-02-11 12:12:27 -04:00
Joey Hess
1d9251c143
Merge branch 'master' of ssh://git-annex.branchable.com 2025-02-10 17:23:31 -04:00
Joey Hess
2f9a384e48
stack.yaml: temporarily build with older ghc
And without ospath build flag as a consequence.

This is a temporary fix to build failures on the github CI for Windows
and OSX, which use too old a version of stack to support the nightly
ghc.

I have sent a patch to those workflows, and after it is applied, this
can be reverted.
2025-02-10 17:22:29 -04:00
Joey Hess
2ff716be30
OsPath build flag no longer depends on filepath-bytestring
However, filepath-bytestring is still in Setup-Depends.
That's because Utility.OsPath uses it when not built with OsPath.
It would be maybe possible to make Utility.OsPath fall back to using
filepath, and eliminate that dependency too, but it would mean either
wrapping all of System.FilePath's functions, or using `type OsPath = FilePath`

Annex.Import uses ifdefs to avoid converting back to FilePath when not
on windows. On windows it's a bit slower due to that conversion.
Utility.Path.Windows.convertToWindowsNativeNamespace got a bit
slower too, but not really worth optimising I think.

Note that importing Utility.FileSystemEncoding at the same time as
System.Posix.ByteString will result in conflicting definitions for
RawFilePath. filepath-bytestring avoids that by importing RawFilePath
from System.Posix.ByteString, but that's not possible in
Utility.FileSystemEncoding, since Setup-Depends does not include unix.
This turned out not to affect any code in git-annex though.

Sponsored-by: Leon Schuermann
2025-02-10 16:39:55 -04:00
Joey Hess
ce697aa8ae
merging the two lines of OsPath conversion commits 2025-02-10 15:41:34 -04:00
Joey Hess
f1ba21d698 OsPath conversion
While some RawFilePath and FilePath remain, this converts most of
git-annex to using OsPath.

(When built without the OsPath build flag, is falls back to using
type OsPath = RawFilePath.)

The goals are
1) improved performance by using OsPath end-to-end when possible
2) potentially avoiding memory use problems caused by pinned strict
   ByteString, since OsPath uses ShortByteString
3) eventually eliminating the filepath-bytestring dependency so I don't
   need to keep maintaining that library
   (this doesn't get all the way, but close)
4) generally improved type safety, since OsPath is a newtype, while
   FilePath and RawFilePath are just type aliaes.

This is the result of a type checker driven process. I started by
converting from System.Directory to System.Directory.OsPath, and from
System.FilePath to System.OsPath. Then I fixed all the compile errors,
which took 3 weeks of work.

Unfortunately, there are several test suite failures at this point.
Also, it only has been built on linux, on windows and OSX there are
probably ifdefs whose code still needs to be converted.

Note that there is a parallel line of commits, starting with
05bdce328d
which is the incremental progress as I worked on this. It will be merged
with this commit. In some cases, commits in that line explain in more
details the reasons for some specific changes.
2025-02-10 15:24:28 -04:00
Joey Hess
e2d74f72df
fix reversions
Oops, in 0b9e9cbf70 I lost takeDirectory
in several places.

With this fixed, the test suite no longer utterly blows up, but still
fails in 7 places due to other bugs introduced in the OsPath conversion.

Sponsored-by: Graham Spencer
2025-02-10 15:18:10 -04:00