forked from lightbend-labs/mima
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
lightbend-labs#170 Add filter file support
- Loading branch information
Showing
37 changed files
with
153 additions
and
34 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
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
4 changes: 1 addition & 3 deletions
4
sbtplugin/src/sbt-test/sbt-mima-plugin/backward-abstract-method/build.sbt
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 |
---|---|---|
@@ -1,8 +1,6 @@ | ||
import com.typesafe.tools.mima.core._ | ||
|
||
mimaPreviousArtifacts := Set("0.0.1-SNAPSHOT") map { v => organization.value %% name.value % v } | ||
|
||
val issueFilters = SettingKey[Map[String, Seq[ProblemFilter]]]("") | ||
issueFilters := Map( | ||
mimaBackwardIssueFilters := Map( | ||
"0.0.1-SNAPSHOT" -> Seq(ProblemFilters.exclude[MissingMethodProblem]("A.bar")) | ||
) |
File renamed without changes.
File renamed without changes.
11 changes: 7 additions & 4 deletions
11
sbtplugin/src/sbt-test/sbt-mima-plugin/backward-abstract-method/test
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 |
---|---|---|
@@ -1,10 +1,13 @@ | ||
> set scalaSource in Compile := baseDirectory.value /"src" /"v1" | ||
> set scalaSource in Compile := baseDirectory.value /"src" /"main" /"scala" /"v1" | ||
> set version := s"0.0.1-SNAPSHOT" | ||
> publishLocal | ||
|
||
> set scalaSource in Compile := baseDirectory.value /"src" /"main" | ||
> set scalaSource in Compile := baseDirectory.value /"src" /"main" /"scala" /"v2" | ||
> set version := s"0.0.2-SNAPSHOT" | ||
|
||
-> mimaReportBinaryIssues | ||
> set mimaBackwardIssueFilters := issueFilters.value | ||
# filters are set in the build file, so mima check should pass | ||
> mimaReportBinaryIssues | ||
|
||
# remove all filters so mima check fails | ||
> set mimaBackwardIssueFilters := Map.empty | ||
-> mimaReportBinaryIssues |
1 change: 1 addition & 0 deletions
1
sbtplugin/src/sbt-test/sbt-mima-plugin/backward-filters-from-file/build.sbt
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 @@ | ||
mimaPreviousArtifacts := Set(organization.value %% name.value % "0.0.1-SNAPSHOT") |
1 change: 1 addition & 0 deletions
1
sbtplugin/src/sbt-test/sbt-mima-plugin/backward-filters-from-file/project/plugins.sbt
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 @@ | ||
addSbtPlugin("com.typesafe" % "sbt-mima-plugin" % System.getProperty("plugin.version")) |
1 change: 1 addition & 0 deletions
1
...-plugin/backward-filters-from-file/src/main/mima-filters/0.0.1-SNAPSHOT.backward.excludes
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 @@ | ||
ProblemFilters.exclude[MissingMethodProblem]("A.foz") |
1 change: 1 addition & 0 deletions
1
...plugin/backward-filters-from-file/src/main/mima-filters/0.0.1-SNAPSHOT.backwards.excludes
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 @@ | ||
ProblemFilters.exclude[MissingMethodProblem]("A.bar") |
1 change: 1 addition & 0 deletions
1
...mima-plugin/backward-filters-from-file/src/main/mima-filters/0.0.1-SNAPSHOT.both.excludes
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 @@ | ||
ProblemFilters.exclude[MissingMethodProblem]("A.baz") |
6 changes: 6 additions & 0 deletions
6
sbtplugin/src/sbt-test/sbt-mima-plugin/backward-filters-from-file/src/main/scala/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,6 @@ | ||
class A { | ||
def foo = 1 | ||
def bar = foo | ||
def baz = foo | ||
def foz = foo | ||
} |
File renamed without changes.
13 changes: 13 additions & 0 deletions
13
sbtplugin/src/sbt-test/sbt-mima-plugin/backward-filters-from-file/test
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,13 @@ | ||
> set scalaSource in Compile := baseDirectory.value /"src" /"main" /"scala" /"v1" | ||
> set version := s"0.0.1-SNAPSHOT" | ||
> publishLocal | ||
|
||
> set scalaSource in Compile := baseDirectory.value /"src" /"main" /"scala" /"v2" | ||
> set version := s"0.0.2-SNAPSHOT" | ||
|
||
# filters are read from file, so mima check should pass | ||
> mimaReportBinaryIssues | ||
|
||
# remove all filters so mima check fails | ||
> set mimaBackwardIssueFilters := Map.empty | ||
-> mimaReportBinaryIssues |
4 changes: 1 addition & 3 deletions
4
sbtplugin/src/sbt-test/sbt-mima-plugin/backward-multiple-versions/build.sbt
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 |
---|---|---|
@@ -1,9 +1,7 @@ | ||
import com.typesafe.tools.mima.core._ | ||
|
||
mimaPreviousArtifacts := Set("0.0.1-SNAPSHOT", "0.0.2-SNAPSHOT") map { v => organization.value %% name.value % v } | ||
|
||
val issueFilters = SettingKey[Map[String, Seq[ProblemFilter]]]("") | ||
issueFilters := Map( | ||
mimaBackwardIssueFilters := Map( | ||
"0.0.1-SNAPSHOT" -> Seq(ProblemFilters.exclude[MissingMethodProblem]("A.fooBar")), | ||
"0.0.2-SNAPSHOT" -> Seq(ProblemFilters.exclude[MissingMethodProblem]("A.bar")) | ||
) |
File renamed without changes.
File renamed without changes.
File renamed without changes.
13 changes: 8 additions & 5 deletions
13
sbtplugin/src/sbt-test/sbt-mima-plugin/backward-multiple-versions/test
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 |
---|---|---|
@@ -1,14 +1,17 @@ | ||
> set scalaSource in Compile := baseDirectory.value /"src" /"v1" | ||
> set scalaSource in Compile := baseDirectory.value /"src" /"main" /"scala" /"v1" | ||
> set version := s"0.0.1-SNAPSHOT" | ||
> publishLocal | ||
|
||
> set scalaSource in Compile := baseDirectory.value /"src" /"v2" | ||
> set scalaSource in Compile := baseDirectory.value /"src" /"main" /"scala" /"v2" | ||
> set version := s"0.0.2-SNAPSHOT" | ||
> publishLocal | ||
|
||
> set scalaSource in Compile := baseDirectory.value /"src" /"main" | ||
> set scalaSource in Compile := baseDirectory.value /"src" /"main" /"scala" /"v2" | ||
> set version := s"0.0.3-SNAPSHOT" | ||
|
||
-> mimaReportBinaryIssues | ||
> set mimaBackwardIssueFilters := issueFilters.value | ||
# filters are set in the build file, so mima check should pass | ||
> mimaReportBinaryIssues | ||
|
||
# remove all filters so mima check fails | ||
> set mimaBackwardIssueFilters := Map.empty | ||
-> mimaReportBinaryIssues |
2 changes: 2 additions & 0 deletions
2
sbtplugin/src/sbt-test/sbt-mima-plugin/forward-filters-from-file/build.sbt
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 @@ | ||
mimaCheckDirection := "forward" | ||
mimaPreviousArtifacts := Set(organization.value %% name.value % "0.0.1-SNAPSHOT") |
1 change: 1 addition & 0 deletions
1
sbtplugin/src/sbt-test/sbt-mima-plugin/forward-filters-from-file/project/plugins.sbt
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 @@ | ||
addSbtPlugin("com.typesafe" % "sbt-mima-plugin" % System.getProperty("plugin.version")) |
1 change: 1 addition & 0 deletions
1
...-mima-plugin/forward-filters-from-file/src/main/mima-filters/0.0.1-SNAPSHOT.both.excludes
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 @@ | ||
ProblemFilters.exclude[MissingMethodProblem]("A.baz") |
1 change: 1 addition & 0 deletions
1
...ma-plugin/forward-filters-from-file/src/main/mima-filters/0.0.1-SNAPSHOT.forward.excludes
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 @@ | ||
ProblemFilters.exclude[MissingMethodProblem]("A.foz") |
1 change: 1 addition & 0 deletions
1
...a-plugin/forward-filters-from-file/src/main/mima-filters/0.0.1-SNAPSHOT.forwards.excludes
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 @@ | ||
ProblemFilters.exclude[MissingMethodProblem]("A.bar") |
File renamed without changes.
6 changes: 6 additions & 0 deletions
6
sbtplugin/src/sbt-test/sbt-mima-plugin/forward-filters-from-file/src/main/scala/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,6 @@ | ||
class A { | ||
def foo = 1 | ||
def bar = foo | ||
def baz = foo | ||
def foz = foo | ||
} |
13 changes: 13 additions & 0 deletions
13
sbtplugin/src/sbt-test/sbt-mima-plugin/forward-filters-from-file/test
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,13 @@ | ||
> set scalaSource in Compile := baseDirectory.value /"src" /"main" /"scala" /"v1" | ||
> set version := s"0.0.1-SNAPSHOT" | ||
> publishLocal | ||
|
||
> set scalaSource in Compile := baseDirectory.value /"src" /"main" /"scala" /"v2" | ||
> set version := s"0.0.2-SNAPSHOT" | ||
|
||
# filters are read from file, so mima check should pass | ||
> mimaReportBinaryIssues | ||
|
||
# remove all filters so mima check fails | ||
> set mimaForwardIssueFilters := Map.empty | ||
-> mimaReportBinaryIssues |
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
3 changes: 3 additions & 0 deletions
3
sbtplugin/src/sbt-test/sbt-mima-plugin/forward-multiple-versions/src/main/scala/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,3 @@ | ||
class A { | ||
def foo = 1 | ||
} |
File renamed without changes.
File renamed without changes.
13 changes: 8 additions & 5 deletions
13
sbtplugin/src/sbt-test/sbt-mima-plugin/forward-multiple-versions/test
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 |
---|---|---|
@@ -1,14 +1,17 @@ | ||
> set scalaSource in Compile := baseDirectory.value /"src" /"v1" | ||
> set scalaSource in Compile := baseDirectory.value /"src" /"main" /"scala" /"v1" | ||
> set version := s"0.0.1-SNAPSHOT" | ||
> publishLocal | ||
|
||
> set scalaSource in Compile := baseDirectory.value /"src" /"v2" | ||
> set scalaSource in Compile := baseDirectory.value /"src" /"main" /"scala" /"v2" | ||
> set version := s"0.0.2-SNAPSHOT" | ||
> publishLocal | ||
|
||
> set scalaSource in Compile := baseDirectory.value /"src" /"main" | ||
> set scalaSource in Compile := baseDirectory.value /"src" /"main" /"scala" /"v3" | ||
> set version := s"0.0.3-SNAPSHOT" | ||
|
||
-> mimaReportBinaryIssues | ||
> set mimaForwardIssueFilters := issueFilters.value | ||
# filters are set in the build file, so mima check should pass | ||
> mimaReportBinaryIssues | ||
|
||
# remove all filters so mima check fails | ||
> set mimaForwardIssueFilters := Map.empty | ||
-> mimaReportBinaryIssues |
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 |
---|---|---|
@@ -1,8 +1,6 @@ | ||
import com.typesafe.tools.mima.core._ | ||
|
||
mimaPreviousArtifacts := Set(organization.value %% name.value % "0.0.1-SNAPSHOT") | ||
|
||
val issueFilters = SettingKey[Seq[ProblemFilter]]("") | ||
issueFilters := Seq( | ||
mimaBinaryIssueFilters := Seq( | ||
ProblemFilters.exclude[MissingMethodProblem]("A.bar") | ||
) |
File renamed without changes.
3 changes: 3 additions & 0 deletions
3
sbtplugin/src/sbt-test/sbt-mima-plugin/minimal/src/main/scala/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,3 @@ | ||
class A { | ||
def foo = 1 | ||
} |
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 |
---|---|---|
@@ -1,10 +1,13 @@ | ||
> set scalaSource in Compile := baseDirectory.value /"src" /"v1" | ||
> set scalaSource in Compile := baseDirectory.value /"src" /"main" /"scala" /"v1" | ||
> set version := s"0.0.1-SNAPSHOT" | ||
> publishLocal | ||
|
||
> set scalaSource in Compile := baseDirectory.value /"src" /"main" | ||
> set scalaSource in Compile := baseDirectory.value /"src" /"main" /"scala" /"v2" | ||
> set version := s"0.0.2-SNAPSHOT" | ||
|
||
-> mimaReportBinaryIssues | ||
> set mimaBinaryIssueFilters := issueFilters.value | ||
# filters are set in the build file, so mima check should pass | ||
> mimaReportBinaryIssues | ||
|
||
# remove all filters so mima check fails | ||
> set mimaBinaryIssueFilters := Seq.empty | ||
-> mimaReportBinaryIssues |