Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lipsum_from_seed missing in 0.9.0 #98

Open
tgross35 opened this issue Mar 29, 2023 · 7 comments
Open

lipsum_from_seed missing in 0.9.0 #98

tgross35 opened this issue Mar 29, 2023 · 7 comments

Comments

@tgross35
Copy link

It looks like lipsum_from_seed disappeared in 0.9. Is there a way to get this same functionality?

@tgross35
Copy link
Author

It looks like this was replaced by lipsum_with_rng. This is nice but personally, I'd prefer to still also have lipsum_with_seed as a convenience method so a user doesn't need to juggle RNGs (not to mention keeping backward compatibility)

@kalkin
Copy link

kalkin commented Apr 3, 2023

Also needless API breakage, without even deprecating the function first. I understand that this crate doesn't promise any stable API, but it's not like this would have been a huge effort.

EDIT: I hope I don't sound to harsh, I'm very thankful to the maintainer spending his time working on this crate ♥.

@mgeisler
Copy link
Owner

Hey folks! Sorry about causing trouble!

@kalkin or @tgross35 would you be up for bringing back a lipsum_from_seed function which instantiates a simple RNG for the user?

The function was removed as part of #91, which had the goal of removing the dependency on the system randomness and thus allow lipsum to be used in WASM. There was some discussion there with @reknih about different approaches.

@tgross35
Copy link
Author

That makes sense about the RNG. Honestly I wouldn't mind just gating the feature behind a system-rand flag or something like that. Is that what you're suggesting?

@reknih
Copy link
Contributor

reknih commented Apr 11, 2023

A feature like that would work for us! It's good as long as there is a way to build lipsum without depending on the system RNG.

@mgeisler
Copy link
Owner

Honestly I wouldn't mind just gating the feature behind a system-rand flag or something like that. Is that what you're suggesting?

Yeah, exactly! We can make the flag a default flag so that people can use the old API from 0.8.0.

I will probably not get around to this anytime soon — @tgross35, could you create a PR for this?

kalkin pushed a commit to kalkin/lipsum that referenced this issue Apr 14, 2023
…er#98)

I introduced the default feature `std` which enables the `rand`
package features `std` & `std_rng` for the `thread_rng()` function.
This allows user to use the rand package without adding it with the
right features to own `Cargo.toml`.
@kalkin
Copy link

kalkin commented Apr 14, 2023

Done. See #99. Feedback welcome.

kalkin added a commit to kalkin/lipsum that referenced this issue Apr 14, 2023
…er#98)

I introduced the default feature `std` which enables the `rand`
package features `std` & `std_rng` for the `thread_rng()` function.
This allows user to use the rand package without adding it with the
right features to own `Cargo.toml`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants