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

Add disclaimer about unsafeRunSync in docs #6689

Open
vpavkin opened this issue Sep 16, 2022 · 4 comments
Open

Add disclaimer about unsafeRunSync in docs #6689

vpavkin opened this issue Sep 16, 2022 · 4 comments
Labels
docs Relates to our website or tutorials

Comments

@vpavkin
Copy link

vpavkin commented Sep 16, 2022

Hello!
I know some beginner Scala devs who were confused when I told them they never should call unsafeRunSync in their code. They referenced http4s documentation, and indeed -- there's a ton of unsafeRunSync calls there.

I totally understand these are just small sandbox examples, but maybe for the sake of being beginner-friendly it's worth it to add a disclaimer on such pages?

thank you!

@danicheg danicheg added the docs Relates to our website or tutorials label Sep 16, 2022
@bplommer
Copy link
Member

bplommer commented Oct 1, 2022

I think even for REPL-based examples we should move towards assembling a complete program in the REPL then calling unsafeRunSync on it just once, rather than calling unsafeRunSync a bunch of times. Thoughts?

@armanbilge
Copy link
Member

@vpavkin
Copy link
Author

vpavkin commented Oct 5, 2022

Nice, I really like the mdoc-effect approach

@rossabaker
Copy link
Member

How much are we pitching the tutorials as "follow along in the REPL"? mdoc-effect breaks that model, but also avoids people copying-and-pasting bad habits. I wish there were some visual indication that magic is happening when an IO gets unwrapped.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Relates to our website or tutorials
Projects
None yet
Development

No branches or pull requests

5 participants