Skip to content

Conversation

retronym
Copy link
Owner

$ sbt junit/testOnly scala.tools.nsc.DeterminismTest
...
java.lang.AssertionError: assertion failed: Difference detected between recompiling List(b.scala, Annot1.java) Run:
jardiff -r /var/folders/tz/p8vd07wn7wxck3b9v54grlzw0000gp/T/reference814657788418452571 /var/folders/tz/p8vd07wn7wxck3b9v54grlzw0000gp/T/recompileOutput4882243280168823330

$ jardiff -r /var/folders/tz/p8vd07wn7wxck3b9v54grlzw0000gp/T/reference814657788418452571 /var/folders/tz/p8vd07wn7wxck3b9v54grlzw0000gp/T/recompileOutput4882243280168823330
diff --git a/Test.class.asm b/Test.class.asm
index 98bfd80..a056f9a 100644
--- a/Test.class.asm
+++ b/Test.class.asm
@@ -4,10 +4,10 @@

   // compiled from: b.scala

-  @LAnnot2;(value=java.lang.Object.class)
-
   @LAnnot1;(value="foo")

+  @LAnnot2;(value=java.lang.Object.class)
+
   @Lscala/reflect/ScalaSignature;(bytes="\u0006\u0001u1AAA\u0002\u0001\r!)Q\u0002\u0001C\u0001\u001d\u0009!A+Z:u\u0015\u0005!\u0011a\u0002\u001ff[B$\u0018PP\u0002\u0001'\u0009\u0001q\u0001\u0005\u0002\u0009\u00175\u0009\u0011BC\u0001\u000b\u0003\u0015\u00198-\u00197b\u0013\u0009a\u0011B\u0001\u0004B]f\u0014VMZ\u0001\u0007y%t\u0017\u000e\u001e \u0015\u0003=\u0001\"\u0001\u0005\u0001\u000e\u0003\rAC\u0001\u0001\n\u0016-A\u0011\u0001cE\u0005\u0003)\r\u0011a!\u00118o_R\u0014\u0014!\u0002<bYV,7%A\u0004)\u0009\u0001ARc\u0007\u0009\u0003!eI!AG\u0002\u0003\r\u0005sgn\u001c;2C\u0005a\u0012a\u00014p_\u0002")

@retronym retronym force-pushed the topic/rt-annotations branch from 4302b8a to a9f9cbe Compare November 14, 2018 07:49
Regressed in scala#6846, which added support for encoding repeated
annotations.

Test failure before replacing `groupBy` with `LinkedHashMap`:

```
$ sbt junit/testOnly scala.tools.nsc.DeterminismTest
...
java.lang.AssertionError: assertion failed: Difference detected between recompiling List(b.scala, Annot1.java) Run:
jardiff -r /var/folders/tz/p8vd07wn7wxck3b9v54grlzw0000gp/T/reference814657788418452571 /var/folders/tz/p8vd07wn7wxck3b9v54grlzw0000gp/T/recompileOutput4882243280168823330

$ jardiff -r /var/folders/tz/p8vd07wn7wxck3b9v54grlzw0000gp/T/reference814657788418452571 /var/folders/tz/p8vd07wn7wxck3b9v54grlzw0000gp/T/recompileOutput4882243280168823330
diff --git a/Test.class.asm b/Test.class.asm
index 98bfd80..a056f9a 100644
--- a/Test.class.asm
+++ b/Test.class.asm
@@ -4,10 +4,10 @@

   // compiled from: b.scala

-  @LAnnot2;(value=java.lang.Object.class)
-
   @LAnnot1;(value="foo")

+  @LAnnot2;(value=java.lang.Object.class)
+
   @Lscala/reflect/ScalaSignature;(bytes="\u0006\u0001u1AAA\u0002\u0001\r!)Q\u0002\u0001C\u0001\u001d\u0009!A+Z:u\u0015\u0005!\u0011a\u0002\u001ff[B$\u0018PP\u0002\u0001'\u0009\u0001q\u0001\u0005\u0002\u0009\u00175\u0009\u0011BC\u0001\u000b\u0003\u0015\u00198-\u00197b\u0013\u0009a\u0011B\u0001\u0004B]f\u0014VMZ\u0001\u0007y%t\u0017\u000e\u001e \u0015\u0003=\u0001\"\u0001\u0005\u0001\u000e\u0003\rAC\u0001\u0001\n\u0016-A\u0011\u0001cE\u0005\u0003)\r\u0011a!\u00118o_R\u0014\u0014!\u0002<bYV,7%A\u0004)\u0009\u0001ARc\u0007\u0009\u0003!eI!AG\u0002\u0003\r\u0005sgn\u001c;2C\u0005a\u0012a\u00014p_\u0002")
```

WIP stabilize annotation ordering
@retronym retronym force-pushed the topic/rt-annotations branch from a9f9cbe to 954c5d3 Compare November 19, 2018 04:36
@retronym retronym merged commit 954c5d3 into 2.12.x Jan 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant