Turns out that Data.List.Utils.split is slow and makes a lot of
allocations. Here's a much simpler single character splitter that behaves
the same (even in wacky corner cases) while running in half the time and
75% the allocations.
As well as being an optimisation, this helps move toward eliminating use of
missingh.
(Data.List.Split.splitOn is nearly as slow as Data.List.Utils.split and
allocates even more.)
I have not benchmarked the effect on git-annex, but would not be surprised
to see some parsing of eg, large streams from git commands run twice as
fast, and possibly in less memory.
This commit was sponsored by Boyd Stephen Smith Jr. on Patreon.
It started exporting a isSymbolicLink which supports windows. But,
git-annex does no use symlinks on windows yet and this conflicts with the
function by the same name from unix-compat, so hide it.
Reverts 965e106f24
Unfortunately, this caused breakage on Windows, and possibly elsewhere,
because parentDir and takeDirectory do not behave the same when there is a
trailing directory separator.
parentDir is less safe than takeDirectory, especially when working
with relative FilePaths. It's really only useful in loops that
want to terminate at /
This commit was sponsored by Audric SCHILTKNECHT.
This fixes all instances of " \t" in the code base. Most common case
seems to be after a "where" line; probably vim copied the two space layout
of that line.
Done as a background task while listening to episode 2 of the Type Theory
podcast.
Now oberon has some binaries and libraries that use rpath, so I had to put
in this ugly hack to replace the @rapth/lib with the lib in the app.
This was particularly tricky for libraries that use @rpath because I could
not find a way to extract the rpath from the library. (Only from the
executable, by running it.. ugh!) The hack I put in place may fail if
multiple different libraries use rpath to refer to other libraries,
and the "@rpath/lib" string is the same, but actually refers to different
files.
Without the frameworks, but with this library, I get:
dyld: Symbol not found: __vproc_transactions_enable
Referenced from: /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation
Expected in: /Volumes/git-annex/git-annex.app/Contents/MacOS/./C
in /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation
Without this library, things seem to work again w/o frameworks.
Since I'm dealing with arbitrarily short fields in which to store the
library name, and would have to rebuild a bunch of stuff like git to avoid
that, and I have to prefix this obnoxiously long "@executable_path"
to it, it's easy to run out of space. This makes it use 1 and 2 letter long
filenames for libraries in the app. Fun fun fun fun fun.