Closed lehins closed 3 years ago
@hvr FYI, current uuid version is compatible with random-1.2 as well, it is just not as fast. So you can relax the upper bound to random < 1.3
for current releases
I too had a problem while building uuid-types from my dependency tree. This fork seams to fix it. I've added this to my cabal.project
file until this get merged:
source-repository-package
type: git
location: git@github.com:lehins/uuid.git
tag: a744cd0a72f984793fd48b93ca4b6aee54fa8358
subdir: uuid-types
Just wanted to chime in and express support for this PR to be merged and released. It's causing issues in downstream tools. Thanks! @hvr
I made a revision: https://hackage.haskell.org/package/uuid-types-1.0.3/revisions/ so this PR is not urgent.
@phadej thank you for the revision. FYI, this PR speeds up uuid generation by a factor of x10. If anyone really wants fast uuid generation with better quality of randomness they can use my fork of the repo.
One should not use Uniform
for UUID generation if the goal is to adhere to the RFC (version 4), which is the "random UUID". I suggest reading through https://www.ietf.org/rfc/rfc4122.txt
In my private discussion with @hvr we thought of dropping random
dependency and instance completely, as these are "wrong" (and uuid
uses entropy
)
Would it be possible to revise the uuid
upper bound too to allow random 1.2.0.0?
Yes, at least an update to upper bound upgrade would be nice. It of course will not have as much of a performance improvement, but at least it will not prevent people from using uuid
with newer random
.
I added Uniform
instance and modified Random
instance in https://github.com/haskell-hvr/uuid/pull/61
However, gauge
is still not an option, so if you want to improve the benchmarks, check the new setup.
@phadej This is great, thank you for doing this! I don't particularly care about gauge
vs any other approach, most important for me was the random support.
Support for new version of random-1.2.0
Also newer version of criterion depends on uuid. Circular dependency like that is a bit problematic, so I switched benchmarks to use gauge. If that is a problem, I can submit a PR just with support for new random.