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

Ember docs on 023 #4

Closed
wants to merge 11 commits into from
Closed

Ember docs on 023 #4

wants to merge 11 commits into from

Conversation

valencik
Copy link
Owner

@valencik valencik commented Jan 29, 2022

This PR updates all the mdoc checked docs to use ember instead of blaze.

This is a continuation of http4s#4932 and http4s#4279.
Everything is rebased on latest series/0.23, but I can change the target branch if desired.

I have introduced three changes that are worth calling out as they may be controversial.

Sleeping after ember server start

Starting the ember server in mdoc now looks like:

val startAndSleep = server.use(_ => IO.never).start <* IO.sleep(2.seconds)
val fiber = startAndSleep.unsafeRunSync()

Without an IO.sleep, any attempt to connect to the ember server would fail with a java.net.ConnectException: Connection refused as the request would be attempted before the ember server was actually bound to the address.

Adding logback to docs/mdoc

This was absolutely crucial for me to figure out what was going on with the connect refusal error above.
With logging enable I could see the ConnectException and then a second later the ember server log:

[info] [io-compute-15] INFO  o.h.e.s.EmberServerBuilderCompanionPlatform - Ember-Server service bound to address: [::]:8080

I think having the logs is worthwhile if someone is running mdoc, it gives us slightly more visibility into what is going on.
I stole the logback.xml from the gitter8 template.

Forking mdoc

This is really just the workaround described in scalameta/mdoc#613 to avoid terminating sbt when mdoc fails.

Ditching nest mdoc modifier

I've removed nest mdoc modifiers in client.md because I found they only added confusion.
I've held off removing nest from the other docs as it turned out to not be necessary, but I feel like it's still worthwhile.
I don't think it buys us much.

@valencik valencik self-assigned this Jan 29, 2022
@valencik valencik closed this Jan 29, 2022
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

Successfully merging this pull request may close these issues.

1 participant