Please describe the problem in your own words.
crypton 1.1.0 switched from memory to ram, the latter providing the same interface with its own definitions. Thus, using memory is incompatible with crypton 1.1.0.
What steps will reproduce the problem?
Build the latest release 10.20260901 against crypton 1.1.0. The build fails with an error message regarding mismatching types.
What version of git-annex are you using? On what operating system?
- OS: Arch Linux
- Kernel: Linux 7.2.6-arch2-1
- GHC: 9.6.6
- git-annex: 10.20260901
- crypton: 1.1.0
- memory: 0.18.0
ram: 0.22.1
Please provide any additional information below.
The relevant imports explicitly mention the memory module: import "memory" ... and import qualified "memory" .... Without the explicit module mention, it would work as-is, as ram provides the same interface.
I suspect but have not verified that the problem is the use of memory in Utility/Hash/Crypton.hs, which is the only place it should touch crypton types. And it will probably need to be ifdefed in order to support old and new versions of crypton.
For the 10.20260901 release, the two errors are
and ``` [187 of 757] Compiling Annex.Balanced ( Annex/Balanced.hs, dist/build/git-annex/git-annex-tmp/Annex/Balanced.dyn_o )
Annex/Balanced.hs:39:19: error: [GHC-39999] • No instance for ‘BA.ByteArrayAccess (Digest a)’ arising from a use of ‘BA.unpack’ • In the second argument of ‘(.)’, namely ‘BA.unpack’ In the expression: L.foldl' (\ i b -> (i
shiftL8) + fromIntegral b) 0 . BA.unpack In an equation for ‘tointeger’: tointeger = L.foldl' (\ i b -> (ishiftL8) + fromIntegral b) 0 . BA.unpack | 39 | . BA.unpack | ^^^^^^^^^ ```Going off
master, the latter issue in Annex/Balanced.hs has been resolved while Utility/Hash/Crypton.hs is still affected.On a different note, I've tried building with botan-low, which failed to build due to the same issue above, i.e. Utility/Hash/Crypton.hs gets compiled even when using botan. I would expect that using botan would remove any use of crypton.
I like your work regarding the use of LLMs even in dependencies. I wasn't previously aware that there were already so many (and so widely used!) projects that included LLM generated code.
I had success compiling with crypton 1.1.0 with the patch below. We need to specify
ramto use it in Utility/Hash/Crypton.hscrypton is still used for blake2 and skein hashes, since botan does not implement those.
Thanks for the patch. I've gone with a patch that avoids depending on crypton 1.1.0. I've not been able to fully test it because I don't have a build plan yet that includes crypton 1.1.0. So please let me know if my patch somehow doesn't work.