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

scalafix can't parse new scala 3.6.2 new given synstax #2138

Open
lenguyenthanh opened this issue Dec 11, 2024 · 4 comments
Open

scalafix can't parse new scala 3.6.2 new given synstax #2138

lenguyenthanh opened this issue Dec 11, 2024 · 4 comments
Labels

Comments

@lenguyenthanh
Copy link

The changes is here: lichess-org/lila-fishnet@1163f62

And the error is below:

info] Running scalafix on 18 Scala sources
[error] xxx/lichess/lila-fishnet/app/src/main/scala/http/MkHttpServer.scala:19:9: error: abstract givens cannot be anonymous
[error]   given Logger[IO] => MkHttpServer = new:
[error]         ^
[error] (app / scalafixAll) scalafix.sbt.ScalafixFailed: ParseError
[error] Total time: 0 s, completed 11 Dec 2024, 7:15:23 pm

this pr in scalameta may fix this issue: scalameta/scalameta#4068

@bjaglin
Copy link
Collaborator

bjaglin commented Dec 18, 2024

Thanks for the report. I'll double-check and tag a release tomorrow, but this should be fixed by #2140 in the latest SNAPSHOT, which will be referenced in https://scalacenter.github.io/scalafix/docs/users/installation.html#snapshot shortly.

@lenguyenthanh
Copy link
Author

lenguyenthanh commented Dec 18, 2024

thanks! I tried it fixed some but still at least some issue:

[error] {redacted}/lila-search/modules/app/src/main/scala/http.server.scala:20:9: error: abstract givens cannot be anonymous
[error]   given Logger[IO] => MkHttpServer = new:
[error]         ^

I think this is still scalameta issue, you can check the code here: https://github.com/lichess-org/lila-search/pull/392/files#diff-665a50336c22a54ed11c39141cc1649c40ec1cd141de9adc3754b95e000f7891R20

@ivan-klass
Copy link

similarly, new context bound syntax gives an error:

[error] MyFile.scala:34:21: error: illegal start of declaration
[error]   def apply[F[_]: { Async, Tracer, Parallel }](
[error]                     ^^^^^

@tgodzik
Copy link
Contributor

tgodzik commented Dec 20, 2024

I will take a look at those, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants