Skip to content

Follow the deprecation message of "Mirage_crypto_rng_lwt.initialize" - #383

Merged
aantron merged 3 commits into
camlworks:masterfrom
boechat107:mirage-crypto-rng-deprecation
Aug 14, 2025
Merged

Follow the deprecation message of "Mirage_crypto_rng_lwt.initialize"#383
aantron merged 3 commits into
camlworks:masterfrom
boechat107:mirage-crypto-rng-deprecation

Conversation

@boechat107

@boechat107 boechat107 commented Feb 8, 2025

Copy link
Copy Markdown
Contributor

I came across the following deprecation error when trying to build dream today:

▶ make build                                                                                                                                           
File "src/dream.ml", line 59, characters 4-36:                                                                                         
59 |     Mirage_crypto_rng_lwt.initialize (module Mirage_crypto_rng.Fortuna))
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^       
Error (alert deprecated): Mirage_crypto_rng_lwt.initialize                                                                             
Use 'Mirage_crypto_rng_unix.use_default ()' instead.                                                                                   
make: *** [Makefile:5: build] Error 1

And these are my installed packages:

▶ opam list | grep crypto                                          
mirage-crypto            1.2.0        Simple symmetric cryptography for the modern age
mirage-crypto-ec         1.2.0        Elliptic Curve Cryptography with primitives taken from Fiat
mirage-crypto-pk         1.2.0        Simple public-key cryptography for the modern age
mirage-crypto-rng        1.2.0        A cryptographically secure PRNG
mirage-crypto-rng-lwt    1.2.0        A cryptographically secure PRNG
mirage-crypto-rng-mirage 1.2.0        Entropy collection for a cryptographically secure PRNG

I confirmed the deprecation from mirage-crypto release notes for 1.2.0.

Comment thread dream.opam Outdated
"mirage-crypto-rng" {>= "1.0.0"}
"mirage-crypto" {>= "1.2.0"}
"mirage-crypto-rng" {>= "1.2.0"}
"mirage-crypto-rng-lwt"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"mirage-crypto-rng-lwt"

@hannesm

hannesm commented Feb 10, 2025

Copy link
Copy Markdown
Contributor

looks fine, but in src/dune, you should replace the mirage-crypto-rng-lwt with mirage-crypto-rng.unix.

@hannesm

hannesm commented Feb 10, 2025

Copy link
Copy Markdown
Contributor

and the example/z-playground/opam-switch needs to be updated/regenerated.

@boechat107

Copy link
Copy Markdown
Contributor Author

and the example/z-playground/opam-switch needs to be updated/regenerated.

Is it enough to simply remove mirage-crypto-rng-lwt from opam-switch? Or is there another process to follow?

@aantron

aantron commented Aug 14, 2025

Copy link
Copy Markdown
Collaborator

Thank you!

I took the playground down for now as I had no time to maintain it, so we will deal with its opam-switch file later.

@aantron

aantron commented Aug 14, 2025

Copy link
Copy Markdown
Collaborator

This was also done as part of #393 by @Willenbrink and #395 by @hannesm, but those PRs have other contributions so I'll merge them as contributing those.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants