Http4s: String contexts for literals: where should they live?

Created on 2 Jun 2019  路  4Comments  路  Source: http4s/http4s

Regarding our string context macros (e.g., uri), @yoohaemin brings up on #2608:

I was a bit surprised that the required import was not org.http4s.syntax.all._ nor org.http4s.implicits._ (which is the same thing), but org.http4s._

They're a syntactic extension, so putting them in implicits fits my intiution. And I like our imports to fit in well with the Typelevel ecosystem, but there isn't a lot of precedent.

This issue is to discuss, before we write more: did we put them in the right place?

RFC

Most helpful comment

They should be in implicits.

All 4 comments

They should be in implicits.

Definitely implicits. I had a hard time importing the uri interpolator because it's in org.http4s.

I agree. Does anybody have a clean migration strategy through deprecation, or can we only achieve this through scalafix?

I think scalafix due to implicit conflicts.

Was this page helpful?
0 / 5 - 0 ratings