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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix warnings since Scala 2.13.3 #1093

Closed
wants to merge 1 commit into from
Closed

fix warnings since Scala 2.13.3 #1093

wants to merge 1 commit into from

Conversation

xuwei-k
Copy link
Member

@xuwei-k xuwei-k commented Jun 27, 2020

1095 warnings since Scala 2.13.3! 馃槆 馃槆 馃槆

https://travis-ci.com/github/scalikejdbc/scalikejdbc/jobs/354732287

[warn] /home/travis/build/scalikejdbc/scalikejdbc/scalikejdbc-config/src/test/scala/scalikejdbc/config/DBsSpec.scala:20:59: Auto-application to `()` is deprecated. Supply the empty argument list `()` explicitly to invoke method single,
[warn] or remove the empty argument list from its definition (Java-defined methods are exempt).
[warn] In Scala 3, an unapplied method like this will be eta-expanded into a function.
[warn]           SQL("SELECT 1 as one").map(rs => rs.int("one")).single.apply()
[warn]                                                           ^

rewrite use lightbend-labs/scala-rewrites#14

Maybe some methods does not have side effects.
Should we remove () from method definition instead of this pull request? 馃 (but not source compatible 馃槩 )

@xuwei-k xuwei-k requested a review from seratch June 27, 2020 14:54
@xuwei-k xuwei-k marked this pull request as draft June 27, 2020 15:04
@seratch
Copy link
Member

seratch commented Jun 27, 2020

Thanks for taking care of this!

First of all, this decision by the Scala team is a bit surprising to me. I respect that the Scala team's huge efforts toward Scala 3 but bringing such a non-trivial deprecation warning in a patch version(!) is unexpected. That being said, the transition itself seems to be reasonable enough. I want to make this library compatible with the last lang version as early as possible.

When it comes to the migration plan, I think any source-level breaking changes should require a major version upgrade. So, I'd like to go with the following steps:

  • Ship 3.5 without any changes related to this matter in July
    • 3.5 series will be the last minor version in v3
  • Start 4.0 development - this major version can remove () from those method definitions
    • ETA: possibly in July or August but it really depends on contributions - I'm really not sure about how much time I can invest in this

Should we remove () from method definition instead of this pull request? 馃 (but not source compatible 馃槩 )

We'll be changing method definitions in v4. So, I'm sorry to say this but I don't think we should merge this PR.

@seratch seratch mentioned this pull request Jun 27, 2020
@xuwei-k
Copy link
Member Author

xuwei-k commented Jun 27, 2020

馃憤

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

Successfully merging this pull request may close these issues.

None yet

2 participants