ocheron / cryptostore

Serialization of cryptographic data types
Other
10 stars 9 forks source link

make `use_crypton` default true (or automatic?) #13

Open bmillwood opened 2 months ago

bmillwood commented 2 months ago

@ocheron in https://github.com/ocheron/cryptostore/issues/12#issuecomment-2155854615 says:

The library has support for crypton through optional flag use_crypton. I don't plan to make it default at this point.

In the current state with use_crypton manual and default false, I can't write a library that depends on crypton and cryptostore, because I can't specify in my build-depends that I need the flag to be true. (Clients can fix this by specifying constraint: cryptostore +use_crypton in their project file, but I can't make this happen from my cabal file.)

I think removing manual: True to allow the solver to try enabling the flag seems like a harmless improvement, but I'm not sure it would fix the problem. The issue I witness is a type mismatch in my library between cryptonite types coming from cryptostore, and crypton types coming from elsewhere. Since this issue comes up in the build phase and not dependency resolution, I don't think the solver will be able to notice that it should try changing the flag.

For my part, given that the cryptonite package is deprecated on Hackage and seems unlikely to see new versions, I don't see why you'd want to default the flag false or even to continue to support cryptonite at all, but I haven't followed the situation and given your above comment presumably you have a good reason for doing things that way. (I'm not at all opinionated on the difference between cryptonite and crypton, except that I'm trying to use other dependencies that have already switched to crypton.)

marinelli commented 2 weeks ago

Given that cryptonite is not maintained anymore, wouldn't it be more simple to just remove the flag and use crypton only?