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

Server.install reporting "unused local definition" in 3.1.0. #3415

Open
m-kalai opened this issue Mar 18, 2025 · 1 comment
Open

Server.install reporting "unused local definition" in 3.1.0. #3415

m-kalai opened this issue Mar 18, 2025 · 1 comment
Labels
bug Something isn't working

Comments

@m-kalai
Copy link

m-kalai commented Mar 18, 2025

Describe the bug
When trying to upgrade to 3.1.0, build started to fail due to Server.install reporting "unused local definition". It's just a warning but imo it shouldn't be there and with "fatal warnings" it breaks builds.

To Reproduce
Steps to reproduce the behaviour:
Example:
https://github.com/m-kalai/zio-http-unused-local/blob/master/src/main/scala/cz/kalai/issue/ZioHttpApp.scala

fails with

/zio-http-unused-local/src/main/scala/cz/kalai/issue/ZioHttpApp.scala:17:23
unused local definition
      .install(routes)

Reproduced with Scala 3.3.5 and 3.6.4.
Note: Removing line 14 with ZIO.logInfo makes it work.

Expected behaviour
No warnings are generated and code compiles.

Desktop (please complete the following information):

  • OS: macOS

Additional context
Add any other context about the problem here.

@m-kalai m-kalai added the bug Something isn't working label Mar 18, 2025
@987Nabil
Copy link
Contributor

This is a Scala 3 bug, which is fixed but not released yet. It might be back ported to 3.3.x with 3.3.7

scala/scala3#20894

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants