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

Harmonize imports for http4s and circe literals #3521

Merged
merged 1 commit into from
Jan 6, 2025

Conversation

fthomas
Copy link
Member

@fthomas fthomas commented Jan 6, 2025

This is in preparation for compiling with Scala 3 and prevents errors like

 -- [E008] Not Found Error: modules/core/src/test/scala/org/scalasteward/core/coursier/DependencyMetadataTest.scala:7:28
 7 |import org.http4s.implicits.http4sLiteralsSyntax
   |                            ^^^^^^^^^^^^^^^^^^^^
   | value http4sLiteralsSyntax is not a member of object org.http4s.implicits

and


 -- [E008] Not Found Error: modules/core/src/test/scala/org/scalasteward/core/forge/github/GitHubAuthAlgTest.scala:4:24
 4 |import io.circe.literal.JsonStringContext
   |                        ^^^^^^^^^^^^^^^^^
   |               value JsonStringContext is not a member of io.circe.literal

It also prefers importing org.http4s.syntax.literals._ over org.http4s.implicits._ so that we import less and are more explicit about what the import is about.

This is in preparation for compiling with Scala 3 and prevents errors
like
```
 -- [E008] Not Found Error: modules/core/src/test/scala/org/scalasteward/core/coursier/DependencyMetadataTest.scala:7:28
 7 |import org.http4s.implicits.http4sLiteralsSyntax
   |                            ^^^^^^^^^^^^^^^^^^^^
   | value http4sLiteralsSyntax is not a member of object org.http4s.implicits
```
and
```

 -- [E008] Not Found Error: modules/core/src/test/scala/org/scalasteward/core/forge/github/GitHubAuthAlgTest.scala:4:24
 4 |import io.circe.literal.JsonStringContext
   |                        ^^^^^^^^^^^^^^^^^
   |               value JsonStringContext is not a member of io.circe.literal
```
It also prefers importing `org.http4s.syntax.literals._` over
`org.http4s.implicits._` so that we import less and are more explicit
about what the import is about.
@fthomas fthomas added this to the 0.32.2 milestone Jan 6, 2025
Copy link

codecov bot commented Jan 6, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 89.73%. Comparing base (a114407) to head (ea708c1).
Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3521   +/-   ##
=======================================
  Coverage   89.73%   89.73%           
=======================================
  Files         171      171           
  Lines        3536     3536           
  Branches      321      321           
=======================================
  Hits         3173     3173           
  Misses        363      363           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@fthomas fthomas merged commit 573924a into main Jan 6, 2025
12 checks passed
@fthomas fthomas deleted the topic/harmonize-literals-imports branch January 6, 2025 13:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants