Skip to content

Conversation

samspills
Copy link
Contributor

without the _root_ in the uri macro, the added test fails to compile with error: value http4s is not a member of String

This issue was originally fixed in #741, but in the intervening years + refactors the _root_ qualifier was dropped. I'm just re-adding it, and I'm adding it to all the literal macros just to be safe.

fixes #704

@samspills samspills added the bug Determined to be a bug in http4s label Oct 9, 2024
@samspills samspills self-assigned this Oct 9, 2024
@mergify mergify bot added series/0.23 PRs targeting 0.23.x module:core labels Oct 9, 2024
@samspills samspills changed the title test for uri with org variable Fix for Uri macro with org variable Oct 9, 2024
@samspills
Copy link
Contributor Author

Also realized that uri macro wasn't working if an implicit variable org was in scope

scala> import org.http4s.implicits._
import org.http4s.implicits._

scala> implicit val org: String = "the-problem"
val org: String = the-problem

scala> uri"test"
       ^
       error: value http4s is not a member of String

Added a test for this behaviour as well and confirmed that it fails without 532c401 and passes with it.

@samspills samspills added this to the 0.23.29 milestone Oct 9, 2024
Copy link
Member

@danicheg danicheg left a comment

Choose a reason for hiding this comment

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

Thanks for fixing this!

@samspills samspills merged commit 6882217 into series/0.23 Oct 15, 2024
34 checks passed
@samspills samspills deleted the sam/org-in-uri branch October 15, 2024 18:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Determined to be a bug in http4s module:core series/0.23 PRs targeting 0.23.x
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Uri.uri macro fails with symbol named org
3 participants