-
Notifications
You must be signed in to change notification settings - Fork 131
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
Update scala 2.13.0-M5 to 2.13.0-RC1 #159
Update scala 2.13.0-M5 to 2.13.0-RC1 #159
Conversation
Build fails on #157 |
@analytically can you have a look? I'd be happy to make some changes, but I'm not sure what would be the best ones. :) |
Seems like a regression in RC1? both method error in trait Logger of type (x$1: String, x$2: Object*)Unit |
I think scala/scala#7631 might be relevant here? |
Do we get to a conclusion on how to proceed here? Is it a bug in Scala that will be fixed in RC2 or does scalalogging have to be updated? |
I'd happily accept any PR that would fix scala-logging for 2.13.0-RC1, but IMO this is a regression. |
if you think (or anyone watching this ticket thinks) there is a bug in Scala, please open a ticket at https://github.com/scala/bug |
scala/scala#7680 seems also relevant |
in order to get scala-logging green in the Scala community build, @adriaanm did a series of commits at https://github.com/scalacommunitybuild/scala-logging/commits/community-build-2.13 the relevant commit appears to be scalacommunitybuild@650bed8 @Philippus does that give you what you need to update this PR for RC2...? |
Adriaan's commit shows how to force the varargs version to be chosen. @dwijnand notes that ascribing
|
@Philippus if you run into any further trouble, scala/scala#7966 and scala/scala#8049 are also potentially relevant (thx @dwijnand) |
In Java it works, and it uses the non-varargs (which is the same as type-ascribing with 19:23:28 $ JAVA_HOME=$(/usr/libexec/java_home -v 11) jshell
| Welcome to JShell -- Version 11.0.2
| For an introduction type: /help intro
jshell> class Logger { int error(String x, Object... xs) { return 1; }; int error(String x, Object x2) { return 2; } }
| created class Logger
jshell> (new Logger()).error("a", "b")
$2 ==> 2 |
Actually, I think this was fixed in 2.13.0-RC2 (see those PRs). Trying to recreate in the shell using 2.13.0-RC2 it seems all fine: Welcome to Scala 2.13.0-RC2 (OpenJDK GraalVM CE 19.0.0, Java 1.8.0_212).
Type in expressions for evaluation. Or try :help.
scala> final class Logger { def error(message: String, cause: Throwable) = "throwable"; def error(message: String, args: Any*) = "varargs" }
defined class Logger
scala> (new Logger).error("a", new Error)
res0: String = throwable
scala> (new Logger).error("a", "b")
res1: String = varargs |
Quick other correction to another issue I “fixed” in that branch: the
string interpolation interception macro needs to look at the expandee
attachment (HT retronym) to see the original string written by the
programmer, since the s interpolator is now a macro. I fixed this pretty
crudely by providing a local version of stringcontext, just to get those
tests to pass...
…On Thu, 23 May 2019 at 20:31, Dale Wijnand ***@***.***> wrote:
Actually, I think this was fixed in RC2 (see those PRs). Trying to
recreate in the shell using 2.13.0-RC2 it seems all fine:
Welcome to Scala 2.13.0-RC2 (OpenJDK GraalVM CE 19.0.0, Java 1.8.0_212).Type in expressions for evaluation. Or try :help.
scala> final class Logger { def error(message: String, cause: Throwable) = "throwable"; def error(message: String, args: Any*) = "varargs" }
defined class Logger
scala> (new Logger).error("a", new Error)
res0: String = throwable
scala> (new Logger).error("a", "b")
res1: String = varargs
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#159>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAAWHS4LJN7KWSF7NRVNECDPW3PIZANCNFSM4HEBD4TA>
.
|
Let's continue the discussion at #162, where I hope we'll have a green upgrade to RC2 (tests pass for me locally). |
No description provided.