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

Update Scala to 2.12.9 #2655

Merged
merged 1 commit into from
Aug 27, 2019
Merged

Update Scala to 2.12.9 #2655

merged 1 commit into from
Aug 27, 2019

Conversation

raboof
Copy link
Contributor

@raboof raboof commented Aug 21, 2019

No description provided.

@akka-ci akka-ci added validating PR that is currently being validated by Jenkins needs-attention Indicates a PR validation failure (set by CI infrastructure) and removed validating PR that is currently being validated by Jenkins labels Aug 21, 2019
@akka-ci
Copy link

akka-ci commented Aug 21, 2019

Test FAILed.

@raboof
Copy link
Contributor Author

raboof commented Aug 21, 2019

Fails on mima. Some of these need a MiMa update (#2656), but some others remain to be investigated.

@raboof
Copy link
Contributor Author

raboof commented Aug 21, 2019

For example, it seems with 2.12.8, the first, synthetic parameter of GracefulTerminatorStage.ConnectionTerminator is part of the descriptor and of the Signature.

With 2.12.9, it is still part of the descriptor but now dropped from the Signature.

2.12.8:

  public akka.http.impl.engine.server.GracefulTerminatorStage$ConnectionTerminator(akka.http.impl.engine.server.GracefulTerminatorStage, scala.concurrent.Promise<scala.Function1<scala.concurrent.duration.FiniteDuration, scala.concurrent.Future<akka.http.scaladsl.Http$HttpTerminated>>>);
    descriptor: (Lakka/http/impl/engine/server/GracefulTerminatorStage;Lscala/concurrent/Promise;)V
    flags: ACC_PUBLIC
    Code:
      stack=2, locals=3, args_size=3
         0: aload_0
         1: aload_2
         2: putfield      #28                 // Field triggerTermination:Lscala/concurrent/Promise;
         5: aload_0
         6: invokespecial #82                 // Method akka/http/impl/engine/server/ServerTerminator."<init>":()V
         9: return
      LineNumberTable:
        line 178: 0
      LocalVariableTable:
        Start  Length  Slot  Name   Signature
            0      10     0  this   Lakka/http/impl/engine/server/GracefulTerminatorStage$ConnectionTerminator;
            0      10     1 $outer   Lakka/http/impl/engine/server/GracefulTerminatorStage;
            0      10     2 triggerTermination   Lscala/concurrent/Promise;
    Signature: #78                          // (Lakka/http/impl/engine/server/GracefulTerminatorStage;Lscala/concurrent/Promise<Lscala/Function1<Lscala/concurrent/duration/FiniteDuration;Lscala/concurrent/Future<Lakka/http/scaladsl/Http$HttpTerminated;>;>;>;)V
    MethodParameters:
      Name                           Flags
      $outer                         final synthetic
      triggerTermination             final
}

2.12.9:

  public akka.http.impl.engine.server.GracefulTerminatorStage$ConnectionTerminator(scala.concurrent.Promise<scala.Function1<scala.concurrent.duration.FiniteDuration, scala.concurrent.Future<akka.http.scaladsl.Http$HttpTerminated>>>);
    descriptor: (Lakka/http/impl/engine/server/GracefulTerminatorStage;Lscala/concurrent/Promise;)V
    flags: ACC_PUBLIC
    Code:
      stack=2, locals=3, args_size=3
         0: aload_0
         1: aload_2
         2: putfield      #28                 // Field triggerTermination:Lscala/concurrent/Promise;
         5: aload_0
         6: invokespecial #82                 // Method akka/http/impl/engine/server/ServerTerminator."<init>":()V
         9: return
      LineNumberTable:
        line 178: 0
      LocalVariableTable:
        Start  Length  Slot  Name   Signature
            0      10     0  this   Lakka/http/impl/engine/server/GracefulTerminatorStage$ConnectionTerminator;
            0      10     1 $outer   Lakka/http/impl/engine/server/GracefulTerminatorStage;
            0      10     2 triggerTermination   Lscala/concurrent/Promise;
    Signature: #78                          // (Lscala/concurrent/Promise<Lscala/Function1<Lscala/concurrent/duration/FiniteDuration;Lscala/concurrent/Future<Lakka/http/scaladsl/Http$HttpTerminated;>;>;>;)V
    MethodParameters:
      Name                           Flags
      $outer                         final synthetic
      triggerTermination             final
}

https://docs.oracle.com/javase/specs/jvms/se12/html/jvms-4.html#jvms-4.7.9 says:

A method signature encoded by the Signature attribute may not correspond exactly to the method descriptor in the method_info structure (§4.3.3). In particular, there is no assurance that the number of formal parameter types in the method signature is the same as the number of parameter descriptors in the method descriptor. The numbers are the same for most methods, but certain constructors in the Java programming language have an implicitly declared parameter which a compiler represents with a parameter descriptor but may omit from the method signature.

... so this is perhaps intentional - scala/scala#7975?

raboof added a commit to lightbend-labs/mima that referenced this pull request Aug 21, 2019
Before Scala 2.12.9/2.13.1, the `Signature` attribute of an inner class
constructor would also contain the first, synthetic parameter.

This was fixed in scala/scala#7975, which course leads
to mima warnings about inconsistent signatures. Since the descriptor remains
the same, and the previous signature was wrong anyway (so anything relying on
it can not have worked in the first place) this specific change can be safely
ignored

Tested with Akka HTTP, akka/akka-http#2655 (comment)
@raboof
Copy link
Contributor Author

raboof commented Aug 21, 2019

(fixed in lightbend-labs/mima#378)

@raboof
Copy link
Contributor Author

raboof commented Aug 26, 2019

(now just needs #2656 I think)

@jrudolph
Copy link
Contributor

Can you rebase on master to trigger a recheck with the mima updates in?

@raboof
Copy link
Contributor Author

raboof commented Aug 27, 2019

willdo

@akka-ci akka-ci added validating PR that is currently being validated by Jenkins tested PR that was successfully built and tested by Jenkins and removed needs-attention Indicates a PR validation failure (set by CI infrastructure) validating PR that is currently being validated by Jenkins labels Aug 27, 2019
@akka-ci
Copy link

akka-ci commented Aug 27, 2019

Test PASSed.

Copy link
Contributor

@jrudolph jrudolph left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jrudolph jrudolph merged commit b2a89c3 into master Aug 27, 2019
@jrudolph jrudolph deleted the scala2.12.9 branch August 27, 2019 12:15
@jrudolph jrudolph added this to the 10.1.10 milestone Aug 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tested PR that was successfully built and tested by Jenkins
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants