-
Notifications
You must be signed in to change notification settings - Fork 71
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Exploring inner modules for binary incompatibilities. Fix #127
The former implementation of PackageInfo#accessibleClasses expects that for any module `Foo` compiled by scalac, both `Foo.class` and `Foo$.class` classfiles are produced. Because `Foo$.class` and `Foo.class` are essentially mirrors, and users never access directly `Foo$.class`, MiMa only traverses the `Foo.class`. This works well for top-level modules, but it breaks for inner modules, because no mirror class is created for inner modules (only the module class is created). The fix consist in treating inner modules differently, hence making sure inner modules are part of the set returned by PackageInfo#accessibleClasses.
- Loading branch information
Showing
8 changed files
with
44 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 2 additions & 0 deletions
2
reporter/functional-tests/src/test/class-removing-inner-object-nok/problems.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
object A#B does not have a correspondent in new version | ||
method B()A#B# in class A does not have a correspondent in new version |
5 changes: 5 additions & 0 deletions
5
reporter/functional-tests/src/test/class-removing-inner-object-nok/v1/A.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
class A { | ||
object B { | ||
def foo: Int = 2 | ||
} | ||
} |
2 changes: 2 additions & 0 deletions
2
reporter/functional-tests/src/test/class-removing-inner-object-nok/v2/A.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
class A { | ||
} |
1 change: 1 addition & 0 deletions
1
reporter/functional-tests/src/test/object-removing-inner-object-nok/problems.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
object A#B does not have a correspondent in new version |
5 changes: 5 additions & 0 deletions
5
reporter/functional-tests/src/test/object-removing-inner-object-nok/v1/A.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
object A { | ||
object B { | ||
def foo: Int = 2 | ||
} | ||
} |
2 changes: 2 additions & 0 deletions
2
reporter/functional-tests/src/test/object-removing-inner-object-nok/v2/A.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
object A { | ||
} |